Commit a0283552 by v_vjyjiang

Merge branch 'gsb-center-manage' of gitlab.gongsibao.com:jiangyong/zhichan into gsb-center-manage

parents fb4a4c14 7f59f757
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class AliCache extends CacheBase {
constructor() {
super();
//this.userDao = system.getObject("db.auth.userDao");
}
isdebug() {
return settings.env == "dev";
}
desc() {
return "缓存缓存阿里队列信息";
}
prefix() {
return "g_aliInfo_cm:"
}
async buildCacheVal(cachekey, inputkey, val, ex, ...items) {
if (val) {
return val;
}
return null;
}
}
module.exports = AliCache;
\ No newline at end of file
const CacheBase = require("../cache.base");
const system = require("../../system");
const settings = require("../../../config/settings");
class LoopDistributionUserCache extends CacheBase {
constructor() {
super();
this.userDao = system.getObject("db.auth.userDao");
this.channelDao = system.getObject("db.common.channelDao");
}
isdebug() {
return settings.env == "dev";
}
desc() {
return "缓存阿里订单轮循环分配的业务员信息";
}
prefix() {
return "g_loopDistributionUserInfo_cm:"
}
async buildCacheVal(cachekey, inputkey, val, ex, ...items) {
if (val) {
return val;
}
return null;
}
}
module.exports = LoopDistributionUserCache;
\ No newline at end of file
......@@ -9,11 +9,11 @@ class UserService extends ServiceBase {
this.roleDao = system.getObject("db.auth.roleDao");
this.authS = system.getObject("service.auth.authSve");
}
async pmgetUserByCode (code) {
async pmgetUserByCode(code) {
let ux = await this.cacheManager["CodeCache"].getCache(code);
return ux;
}
async loginApp (appkey, uname) {
async loginApp(appkey, uname) {
let rtn = {}
let app = await this.cacheManager["AppCache"].cache(appkey);
let userLogined = await this.cacheManager["UserCache"].cache(uname);
......@@ -38,7 +38,7 @@ class UserService extends ServiceBase {
//和租户绑定同一家公司
//按照用户名和密码进行注册
//控制器端检查用户名和密码非空
async registerByTantent (p, q) {
async registerByTantent(p, q) {
// 需要默认添加访客角色,为了控制单点从平台登录时看到的菜单和功能
if (p.roles && p.roles.length > 0) {
if (p.roles.indexOf(settings.pmroleid["pr"]) < 0) {
......@@ -51,7 +51,7 @@ class UserService extends ServiceBase {
}
//应用的自由用户注册,无需验证,需要前端头设置公司KEY
async pmregisterByFreeUser (p, q) {
async pmregisterByFreeUser(p, q) {
p.rolecodes = [settings.pmroleid["pr"]];
let rtn = await this.pmregister(p, q)
return rtn;
......@@ -60,7 +60,7 @@ class UserService extends ServiceBase {
//平台租户注册接口方法
//控制器端检查用户名和密码非空
async pmregister (p, q) {
async pmregister(p, q) {
var self = this;
let tmppwd = p.password;
if (!tmppwd) {
......@@ -133,7 +133,7 @@ class UserService extends ServiceBase {
}
});
}
async logout (pobj) {
async logout(pobj) {
await this.cacheManager["UserCache"].invalidate(pobj.username);
return {}
}
......@@ -141,7 +141,7 @@ class UserService extends ServiceBase {
//登录接口封装kong-url
//登录路由放行
//p里面含有appkey,company_id,userName,password
async pmlogin (p, q, req) {
async pmlogin(p, q, req) {
var self = this;
//先要按照用户名,在统一账户中查找存在性
//如果不存在
......@@ -185,7 +185,7 @@ class UserService extends ServiceBase {
}
})
}
async getUserInfo (uname) {
async getUserInfo(uname) {
// let userfind = await this.dao.model.findOne({
// where: { userName: uname, app_id: settings.pmappid },
// attributes: ['userName', 'nickName',"headUrl",'isSuper','isAdmin'],
......@@ -206,7 +206,7 @@ class UserService extends ServiceBase {
//自由用户的电话登录和注册
//需要存在公司KEY
async pmloginByVCodeForFreeUser (p, q) {
async pmloginByVCodeForFreeUser(p, q) {
p.rolecodes = [settings.pmroleid["pr"]];
let rtn = await this.pmloginByVCode(p, q, req)
return system.getResult(rtn);
......@@ -215,7 +215,7 @@ class UserService extends ServiceBase {
//平台租户注册与登录
//用户验证码登录
//
async pmloginByVCode (p, q, req) {
async pmloginByVCode(p, q, req) {
var rtn = {}
//检查传递过来的手机验证码是否与缓存的一致
let mobile = p.mobile;
......@@ -260,19 +260,19 @@ class UserService extends ServiceBase {
//不一致那么就
}
//发送手机验证码并缓存
async sendVCode (p, q, req) {
async sendVCode(p, q, req) {
let mobile = p.mobile;
let vcodeobj = await this.cacheManager["VCodeCache"].cache(mobile, null, 60);
return vcodeobj.vcode;
}
async reSendVCode (p, q, req) {
async reSendVCode(p, q, req) {
let mobile = p.mobile;
await this.cacheManager["VCodeCache"].invalidate(mobile);
let vcodeobj = await this.cacheManager["VCodeCache"].cache(mobile, null, 60);
return vcodeobj.vcode;
}
//修改中心密码
async cmodifypwd (uname, newpwd, cmpid) {
async cmodifypwd(uname, newpwd, cmpid) {
try {
let rtn = await system.postJsonTypeReq(UserService.consumerUrl(uname), { tags: ["cmp_" + cmpid, "pass_" + newpwd] }, "PATCH")
console.log(rtn)
......@@ -286,7 +286,7 @@ class UserService extends ServiceBase {
}
}
//创建统一账号及jwt身份
async cregister (uname, cmpid, pass, uid) {
async cregister(uname, cmpid, pass, uid) {
try {
var rtn2 = null;
let rtn = await system.postJsonTypeReq(UserService.newConsumerUrl(), { username: uname, custom_id: uid, tags: ["cmp_" + cmpid, "pass_" + pass] })
......@@ -308,7 +308,7 @@ class UserService extends ServiceBase {
}
//plkey--对应消费者jwt身份的key,插件解码token后,获取iss-key,查询出身份,利用
//身份中的secret验证签名
async jwtsign (plkey, secretstr, opts) {
async jwtsign(plkey, secretstr, opts) {
let promise = new Promise(function (resv, rej) {
jwt.sign({ exp: Math.floor(Date.now() / 1000) + (60 * 60), iss: plkey }, secretstr, opts, function (err, rtn) {
if (err) {
......@@ -321,13 +321,13 @@ class UserService extends ServiceBase {
return promise;
}
//只要登录 生成新的访问jwttoken
async cmakejwt (key, secret, opts) {
async cmakejwt(key, secret, opts) {
var token = await this.jwtsign(key, secret, opts);
return token;
}
//删除统一账号
async cunregister (uname) {
async cunregister(uname) {
try {
let rtn = await system.delReq(UserService.consumerUrl(uname))
if (rtn.statusCode == 204) {
......@@ -341,15 +341,15 @@ class UserService extends ServiceBase {
//登录统一账号
async clogin (uname) {
async clogin(uname) {
//检查是否存在重名
}
//按用户名查询统一用户
async findCUser (uname) {
async findCUser(uname) {
}
async resetPassword (uname, pwd) {
async resetPassword(uname, pwd) {
let inpassword = this.getEncryptStr(pwd);
var self = this;
return this.db.transaction(async function (t) {
......@@ -367,7 +367,7 @@ class UserService extends ServiceBase {
});
}
//修改
async update (qobj, tm = null) {
async update(qobj, tm = null) {
var self = this;
return this.db.transaction(async function (t) {
delete qobj['company_id']
......@@ -389,7 +389,7 @@ class UserService extends ServiceBase {
* @param {*} productCatName 产品类型名称
* @param {*} regionName 区域
*/
async getBizUserForBizChance (clientMobile, spName, productCatName, regionName) {
async getBizUserForBizChance(clientMobile, spName, productCatName, regionName) {
var self = this
clientMobile = clientMobile + "_" + spName + "_" + regionName + "_" + productCatName
//按照服务商名字查询到公司,按照公司查询出users,条件是可以接受派单任务,并且技能标签含有,产品类别名称
......@@ -411,7 +411,7 @@ class UserService extends ServiceBase {
let companyFind = await self.companyDao.model.findOne({
where: { name: spName }, include: [
{
model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags'], raw: true
model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags', 'isAllArea', 'isSalesman', 'isDelivery'], raw: true
}
], excludes: ['orgJson'], transaction: t
});
......@@ -469,7 +469,7 @@ class UserService extends ServiceBase {
* @param {*} skucode 最小销售货品编码,来自渠道上架的码
* @param {*} regionName 区域
*/
async getBizUserForDelivery (xclientMobile, spName, productCatName, skucode, regionName) {
async getBizUserForDelivery(xclientMobile, spName, productCatName, skucode, regionName) {
let clientMobile = 'fordeliver' + xclientMobile + "_" + spName + "_" + regionName + "_" + productCatName
var self = this
//按照服务商名字查询到公司,按照公司查询出users,条件是可以接受派单任务,并且技能标签含有,产品类别名称
......@@ -511,7 +511,7 @@ class UserService extends ServiceBase {
let companyFind = await self.companyDao.model.findOne({
where: { name: spName }, include: [
{
model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags'], raw: true
model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags', 'isAllArea', 'isSalesman', 'isDelivery'], raw: true
}
], excludes: ['orgJson'], transaction: t
});
......@@ -562,15 +562,15 @@ class UserService extends ServiceBase {
}
/**
* 阿里交付单分配规则(交付单处理业务员和交付员不是一个同一人)
* 阿里交付单分配规则-轮循分配(交付单处理业务员和交付员不是一个同一人)
* @param {*} xclientMobile 客户电话
* @param {*} spName 服务商名称
* @param {*} productCatName 产品类型名称
* @param {*} skucode 最小销售货品编码,来自渠道上架的码
* @param {*} regionName 区域
*/
async getBizUserForAliDelivery (xclientMobile, spName, productCatName, skucode, regionName) {
let clientMobile = 'fordeliver' + xclientMobile + "_" + spName + "_" + regionName
async getBizUserForAliDelivery(xclientMobile, spName, productCatName, skucode, regionName) {
// let clientMobile = 'fordeliver' + xclientMobile + "_" + spName + "_" + regionName
let self = this
//按照服务商名字查询到公司,按照公司查询出users,条件是可以接受派单任务,并且技能标签含有,产品类别名称
return this.db.transaction(async function (t) {
......@@ -594,29 +594,64 @@ class UserService extends ServiceBase {
costAmount = serviceCost[0].costamount
}
//先检查缓存是否存在bizuser
let resultcache = await self.cacheManager["DeliveryBizUserCache"].getCache(clientMobile)
let isGoExec = false
// console.log('------------1:', JSON.stringify(productpricetmp.costs));
//检查缓存是否存在bizuser
let resultcache = await self.cacheManager["LoopDistributionUserCache"].getCache("LoopDistributionUserCache");
let isGoExec = false;
if (!resultcache) {
isGoExec = true
isGoExec = true;
}
else { //如果有用户数据,那么根据算法分配并返回一条业务员数据
let userArrCache = Object.keys(resultcache);
if (userArrCache == 0) {//如果缓存中没有用户数据,从数据库查找
isGoExec = true;
} else {
let uname = resultcache.userName
let ucache = await self.cacheManager["UserCache"].cache(uname)
let userData;
let userInfo, userKey;
let num = resultcache[userArrCache[0]].num;
for (let key in resultcache) {
if (resultcache[key].num <= num) {
num = resultcache[key].num;
userData = resultcache[key];
userKey = key;
}
}
userInfo = userData.userInfo;
//查看是否接单,该用户是否接单,不接单就使缓存失效,接单就直接返回该业务员
let uname = userKey;
let ucache = await self.cacheManager["UserCache"].cache(uname);
if (!ucache.isAllocated) {//解决修改为不接单
isGoExec = true
await self.cacheManager["DeliveryBizUserCache"].invalidate(clientMobile)
await self.cacheManager["LoopDistributionUserCache"].invalidate("LoopDistributionUserCache");
} else {
userData.num += 1; //该业务员数据+1,并保存到缓存中,返回用户数据
await self.cacheManager["LoopDistributionUserCache"].cache("LoopDistributionUserCache", JSON.stringify(resultcache));
return userInfo;
}
}
}
//TODO 查询数据库user表来获取交付员信息 需要根据是否是"交付员"字段筛选(派单规则是将交付单派给交付员)
//查询数据库user表来获取交付员信息 需要根据是否是"交付员"字段筛选(派单规则是将交付单派给交付员)
if (isGoExec) {
let companyFind = await self.companyDao.model.findOne({
where: { name: spName }, include: [
{
model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags'], raw: true
model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags', 'isAllArea', 'isSalesman', 'isDelivery'], raw: true
}
], excludes: ['orgJson'], transaction: t
});
let users = companyFind.us
let users = companyFind.us;
//按名单筛选
// let deliveryList = ["", "", "", "", ""];
// let cansels = users.filter(u => {
// if (regionName && deliveryList.indexOf(u.userName) >= 0) {
// return true;
// } else {
// return false;
// }
// });
//按条件筛选
let cansels = users.filter(u => {
if (regionName && regionName != "" && u.regiontags) {
if (u.isAllocated && u.isDelivery && u.skilltags.indexOf(productCatName) >= 0 && u.regiontags.indexOf(regionName) >= 0) {
......@@ -632,12 +667,13 @@ class UserService extends ServiceBase {
}
}
})
console.log('------------1', JSON.stringify(cansels) );
let lngth = cansels.length
//TODO 分配规则,需要改成循环分配
if (lngth > 0) {
let randindex = Math.floor(Math.random() * lngth)
let selresult = cansels[randindex]
//添加到缓存,按照客户电话key--缓存到业务员的对象
let obj = {};
for (let i = 0; i < lngth; i++) {
let selresult = cansels[i];
let tmp = {
userId: selresult.id,
userName: selresult.userName,
......@@ -646,18 +682,21 @@ class UserService extends ServiceBase {
cost: costAmount,
compId: companyFind.id
}
await self.cacheManager["DeliveryBizUserCache"].cache(clientMobile, tmp)
return tmp
} else {
return null
obj[selresult.userName] = {
userInfo: tmp,
num: 0
}
}
console.log('------------2', JSON.stringify(obj) );
let resultUserKey = Object.keys(obj)[0];
let resultUser = obj[resultUserKey].userInfo;
obj[resultUserKey].num += 1;
await self.cacheManager["LoopDistributionUserCache"].cache("LoopDistributionUserCache", JSON.stringify(obj));
return resultUser;
} else {
if (resultcache) {//不继续,直接返回缓存
resultcache["cost"] = costAmount
return resultcache
} else {
return null
return null;
}
}
})
......@@ -669,3 +708,18 @@ module.exports = UserService;
// userS.getBizUserForBizChance("13381139519",'好生日','工商注册').then(rtn=>{
// console.log(rtn)
// })
// let cacheManager = system.getObject("db.common.cacheManager");
// start();
// async function start() {
// try {
// // let result = await cacheManager["LoopDistributionUserCache"].cache("wyf", JSON.stringify({name: "test2", idx: 2}));
// let result = await cacheManager["LoopDistributionUserCache"].getCache("LoopDistributionUserCache");
// // let result = await cacheManager["LoopDistributionUserCache"].invalidate("LoopDistributionUserCache");
// console.log('----=-=-=-:' + JSON.stringify(result));
// } catch (error) {
// console.log("err:" + error);
// }
// }
......@@ -64,13 +64,13 @@ class AliHandler {
var j = JSON.parse(rtn.stdout);
console.log(JSON.stringify(j), "RRRRRRRRRRRRRRR");
if (j.status == 1) {
await this.cacheManager["AliCache"].cache(cachestr, null, 1200000);//插入redis缓存
await this.cacheManager["AliCache"].cache(cachestr, null, 600000);//插入redis缓存
//给业务员发信息
var msg = {
"title": "你有新的商机,请尽快处理",
"content": "商机编号" + params.businessMode + ",商机类型是" + params.businessName + ",服务地区是" + params.serviceName,
"sender": "管理员",
"sender_id":0,
"sender_id": 0,
"msgType": "single",
"target": { "id": params.salesmanId, "name": params.clerkName },
}
......@@ -123,7 +123,7 @@ class AliHandler {
var rtn = await rc.execPost3(params, requrl);
var j = JSON.parse(rtn.stdout);
if (j.status == 0) {
await this.cacheManager["AliCache"].cache(cachestr, null, 1200000);//插入缓存
await this.cacheManager["AliCache"].cache(cachestr, null, 600000);//插入缓存
//给业务员发信息
var selUrl = this.icUrl + "/schemeCtl/findInfoByDemandCode";
......@@ -135,12 +135,12 @@ class AliHandler {
rtn = await rc.execPost3(selpar, selUrl);
var jj = JSON.parse(rtn.stdout);
console.log("jj------------------------------" + rtn.stdout);
if (jj.status == 0 && jj.data){
if (jj.status == 0 && jj.data) {
var msg = {
"title": "你有退回的商机,请尽快处理",
"content": "商机编号" + jj.data.businessMode + ",商机类型是" + jj.data.businessName,
"sender": "管理员",
"sender_id":0,
"sender_id": 0,
"msgType": "single",
"target": { "id": jj.data.clerkId, "name": jj.data.clerkName },
}
......@@ -191,6 +191,8 @@ class AliHandler {
else {
var rc = system.getObject("util.execClient");
var requrl = this.icUrl + "/deliverybillCtl/findInfoByDeliverCode";
//TODO 将下面的actionBody中的所有字段都检查一遍
//TODO 确定订单编号的key, 将datajson.actionBody.orderNum替换
var delInfo = await rc.execPost3({ "d": { "deliverNumber": datajson.actionBody.orderNum } }, requrl);
console.log("jdelInfo---------------------------------------------" + delInfo.stdout);
var jdelInfo = JSON.parse(delInfo.stdout);
......@@ -210,7 +212,7 @@ class AliHandler {
ConsultTypeName = datajson.actionBody.productTypeName.split("/")[2];
}
console.log("ConsultTypeName-----------------------------" + ConsultTypeName);
var salesmanInfo = await this.userService.getBizUserForDelivery(datajson.actionBody.orderSnapshot.contactsPhone, datajson.actionBody.servicerName, ConsultTypeName, datajson.actionBody.aliPriceCode, datajson.actionBody.regionName);
var salesmanInfo = await this.userService.getBizUserForAliDelivery(datajson.actionBody.orderSnapshot.contactsPhone, datajson.actionBody.servicerName, ConsultTypeName, datajson.actionBody.aliPriceCode, datajson.actionBody.regionName);
requrl = this.icUrl + "/deliverybillCtl/insertInfo";
var bizurl = this.icUrl + "/bizoptCtl/updateStatusByDemandCode";
var params = {
......@@ -314,7 +316,7 @@ class AliHandler {
if (datajson.actionBody.orderSnapshot.hasOwnProperty("annualReport")) {//年报信息
params.baseInfo.annualReport = datajson.actionBody.orderSnapshot.annualReport;
}
else{
else {
if (datajson.actionBody.orderSnapshot.annual_report && datajson.actionBody.orderSnapshot.annual_report != 'undefined') {
params.baseInfo.annualReport = true;//shifouxuyaonianbao
}
......@@ -400,13 +402,13 @@ class AliHandler {
var j1 = JSON.parse(rtn.stdout);
console.log("j1---------------------------------" + rtn.stdout);
if (j.status == 0 && j1.status == 0) {
await this.cacheManager["AliCache"].cache(cachestr, null, 1200000);
await this.cacheManager["AliCache"].cache(cachestr, null, 600000);
//给业务员发信息
var msg = {
"title": "你有新的交付单,请尽快处理",
"content": "交付单编号" + params.deliverNumber + ",产品类型是" + params.businessName + ",服务地区是" + params.serviceName,
"sender": "管理员",
"sender_id":0,
"sender_id": 0,
"msgType": "single",
"target": { "id": params.clerkId, "name": params.clerkName },
}
......@@ -465,24 +467,24 @@ class AliHandler {
var rtn = await rc.execPost3(params, requrl);
var j = JSON.parse(rtn.stdout);
if (j.status == 0) {
await this.cacheManager["AliCache"].cache(cachestr, null, 1200000);//插入缓存
await this.cacheManager["AliCache"].cache(cachestr, null, 600000);//插入缓存
//给业务员发信息
var selUrl = this.icUrl + "/deliverybillCtl/findInfoByDeliverCode";
var selpar = {
"d":{
"deliverNumber":datajson.actionBody.orderNum
"d": {
"deliverNumber": datajson.actionBody.orderNum
}
}
rtn = await rc.execPost3(selpar, selUrl);
var jj = JSON.parse(rtn.stdout);
console.log("jj-------------------------" + rtn.stdout);
if (jj.status ==0 && jj.data){
if (jj.status == 0 && jj.data) {
var msg = {
"title": "你有关闭的交付单,请尽快处理",
"content": "交付单编号" + jj.data.delivery_code + ",产品类型是" + jj.data.product_name,
"sender": "管理员",
"sender_id":0,
"sender_id": 0,
"msgType": "single",
"target": { "id": jj.data.salesman_id, "name": jj.data.salesman_name },
}
......@@ -514,8 +516,97 @@ class AliHandler {
}
}
//客户状态处理
async deliveryNotify(dtajson) {
try {
var cachestr = sha235(JSON.stringify(datajson));
var cacheInfo = await this.cacheManager["AliCache"].getCache(cachestr);
if (cacheInfo && cacheInfo != 'undefined') {
return {
"status": 1, //1代表成功,否则失败
"msg": "已处理成功!",
"data": "",
"requestId": ""
}
}
else {
var rc = system.getObject("util.execClient");
var requrl = this.icUrl + "/deliverybillCtl/updateFileAndStatusByDelivertCode";
var params = {
"d": {
"deliverNumber": datajson.actionBody.orderNum,
"baseInfo": {}
// "deliverStatus": "closed",
// "statusReason": datajson.actionBody.refusalContent
}
}
title = "";
if (datajson.actionBody.status == "USER_CONFIRMED") {//用户已确认递交文件
title = "用户已确认递交文件";
params.d.deliverStatus = "userConfirmationResolve";
params.d.customerMaterial = datajson.actionBody.customerMaterial;
}
else if (datajson.actionBody.status == "CLOSE") {//方案关闭
title = "方案已关闭";
params.d.deliverStatus = "closed";
}
var rtn = await rc.execPost3(params, requrl);
var j = JSON.parse(rtn.stdout);
if (j.status == 0) {
await this.cacheManager["AliCache"].cache(cachestr, null, 600000);//插入缓存
//给业务员发信息
var selUrl = this.icUrl + "/deliverybillCtl/findInfoByDeliverCode";
var selpar = {
"d": {
"deliverNumber": datajson.actionBody.orderNum
}
}
rtn = await rc.execPost3(selpar, selUrl);
var jj = JSON.parse(rtn.stdout);
console.log("jj-------------------------" + rtn.stdout);
if (jj.status == 0 && jj.data) {
var msg = {
"title": "你有"+ title +"的交付单,请尽快处理",
"content": "交付单编号" + jj.data.delivery_code + ",产品类型是" + jj.data.product_name,
"sender": "管理员",
"sender_id": 0,
"msgType": "single",
"target": { "id": jj.data.salesman_id, "name": jj.data.salesman_name },
}
if (jj.data.product_code == "ICP" || jj.data.product_code == "EDI" || jj.data.product_code == "ICPANNUALREPORT" || jj.data.product_code == "EDIANNUALREPORT") {
msg.app_key = "5ae2da88-0ced-4b7a-98ea-60d5e1ff7e2e";
msg.jump_address = "deliveryAll"
}
else {
msg.app_key = "42d814c1-4daa-4643-88b2-f5dd3ec853f3";
msg.jump_address = "myDeliver"
}
await this.msgService.create(msg);
}
return {
"status": 1, //1代表成功,否则失败
"msg": "",
"data": "",
"requestId": ""
}
}
else {
return j;
}
}
}
catch (error) {
return system.getResultError(error);
}
}
}
module.exports = new AliHandler();
// (async ()=>{
......@@ -526,3 +617,14 @@ module.exports = new AliHandler();
// console.log("dddddddddddddd");
// })()
// let userService = system.getObject("service.auth.userSve");
// start();
// async function start() {
// console.log('开始:')
// try {
// let result = await userService.getBizUserForAliDelivery(" ", "公司宝", "icp", "sv_vat_shareholder_domestic1015", "北京市");
// console.log('=-=-=-=-=-=:'+JSON.stringify(result));
// } catch (error) {
// console.log("getBizUserForAliDelivery err: "+ error);
// }
// }
\ 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