Commit 825db4f9 by 蒋勇

d

parent 0b795957
......@@ -25,6 +25,14 @@ class AccessAuthAPI extends APIBase {
let appkey=req.xctx.appkey;
}
async getBizUserForBizChance(p,q,req){
let s= await this.userSve.getBizUserForBizChance(p.clientMobile,p.spName,p.productCatName)
return system.getResult(s)
}
async getBizUserForDelivery(p,q,req){
let s= await this.userSve.getBizUserForDelivery(p.clientMobile,p.spName,p.productCatName,p.skucode)
return system.getResult(s)
}
classDesc() {
return {
groupName: "auth",
......
......@@ -123,5 +123,6 @@ class UserCtl extends CtlBase {
let rtn = await this.service.sendVCode(pobj, qobj);
return system.getResult(rtn);
}
}
module.exports = UserCtl;
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class ClientBindBizUserCache extends CacheBase{
constructor(){
super();
}
isdebug(){
return settings.env=="dev";
}
desc(){
return "缓存本地应用对象";
}
prefix(){
return "g_client2bizuser_"
}
async buildCacheVal(cachekey,inputkey, val, ex, ...items) {
return JSON.stringify(val);
}
}
module.exports=ClientBindBizUserCache;
\ No newline at end of file
......@@ -56,6 +56,9 @@ class DbFactory{
this.db.models.user.belongsTo(this.db.models.company,{constraints: false,});
this.db.models.company.hasMany(this.db.models.user,{as:'us',constraints: false,});
this.db.models.role.belongsTo(this.db.models.company, {constraints: false,});
// this.db.models.org.belongsTo(this.db.models.company,{constraints: false,});
......@@ -77,7 +80,7 @@ class DbFactory{
this.db.models.productprice.belongsTo(this.db.models.company,{constraints: false,});
//成本项目属于productprice
this.db.models.productcost.belongsTo(this.db.models.productprice,{constraints: false,});
this.db.models.productprice.hasMany(this.db.models.productcost,{as:"costs",constraints: false,});
}
//async getCon(){,用于使用替换table模型内字段数据使用
getCon(){
......
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