Commit 2c932ab7 by 蒋勇

d

parent 8c7a7ced
......@@ -18,7 +18,7 @@ class UserCache extends CacheBase{
async buildCacheVal(cachekey,inputkey, val, ex, ...items) {
const configValue = await this.userDao.model.findAll({
where: { userName: inputkey, app_id: settings.pmappid,isEnabled:true},
attributes: ['id','userName', 'nickName','headUrl','jwtkey','jwtsecret','created_at','isSuper','isAdmin','isAllocated','mail','opath','ptags'],
attributes: ['id','userName', 'nickName','headUrl','jwtkey','jwtsecret','created_at','isSuper','isAdmin','isAllocated','mail','mobile','opath','ptags'],
include: [
{ model: this.db.models.company,attributes:['id','name','companykey','appids'],raw:true},
{model:this.db.models.role,as:"Roles",attributes:["id","code"],}
......
......@@ -29,7 +29,8 @@ class ProductService extends ServiceBase {
let tmpdic=await self.findPriceStrategys(stragetyids,t)
stragetyids.forEach(stragetyid => {
if(skucodemap){
p.skucode=skucodemap[stragetyid]
p.skucode=skucodemap[stragetyid].pricecode
}
let pps = {
product_id: pnew.id,
......@@ -39,6 +40,7 @@ class ProductService extends ServiceBase {
company_id:p.company_id,
skucode:p.skucode?p.skucode:self.getUUID(),
skuname:p.skuname?p.skuname:p.name,
sptags:p.sptags
}
productprices.push(pps)
})
......
......@@ -11,7 +11,7 @@ class XProductService extends ServiceBase {
}
}
module.exports = XProductService;
/*
function findTitlePath(items, findstr, results) {
items.forEach(item => {
if (item.title.indexOf(findstr) < 0) {
......@@ -50,7 +50,7 @@ function findTitlePath(items, findstr, results) {
let straid=[]
let skucodemap={}
for(let stinfo of stsinfos){
let tg=stinfo.price_name.replace("EDI","").replace("ICP","").replace("(",",").replace(")","").replace("章","").replace("税控","").replace("完成","").replace("\t\r\n","")
let tg=stinfo.price_name.replace("EDI","").replace("ICP","").replace("(",",").replace(")","").replace("章","").replace("税控","").replace("完成","").replace("\t\r\n","").replace("天","工作日")
//按照price_name去策略表中查询策略id
let strategy=await ps.db.models.pricestrategy.findOne({where:{optionunion:tg}})
if(!strategy){
......@@ -139,4 +139,3 @@ function findTitlePath(items, findstr, results) {
// })
// console.log(JSON.stringify(root))
}) ()
*/
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment