Commit 10f38c18 by 王勇飞

gyq

parent fa903c92
...@@ -344,16 +344,16 @@ class BizOptCtl extends CtlBase { ...@@ -344,16 +344,16 @@ class BizOptCtl extends CtlBase {
var pobj = nobj.actionBody.messageBody; var pobj = nobj.actionBody.messageBody;
if (pobj.intentionBizId && pobj.intentionBizId != 'undefined') { if (pobj.intentionBizId && pobj.intentionBizId != 'undefined') {
try { try {
var  cachestr  =  sha235(JSON.stringify(nobj));       var cachestr = sha235(JSON.stringify(nobj));
var  cacheInfo  =  await  this.cacheManager["TxCache"].getCache(cachestr);  var cacheInfo = await this.cacheManager["TxCache"].getCache(cachestr);
if  (cacheInfo  &&  cacheInfo  !=  'undefined')  {         if (cacheInfo && cacheInfo != 'undefined') {
return  {           return {
"status":  1, "status": 1,
  //1代表成功,否则失败 //1代表成功,否则失败
"msg": "已处理成功!", "msg": "已处理成功!",
"data": cachestr , "data": cachestr,
"requestId": nobj.requestId "requestId": nobj.requestId
}       }
} else { } else {
pobj.businessStatus = 'received'; pobj.businessStatus = 'received';
pobj.sourceNumber = 'tx'; pobj.sourceNumber = 'tx';
...@@ -395,6 +395,34 @@ class BizOptCtl extends CtlBase { ...@@ -395,6 +395,34 @@ class BizOptCtl extends CtlBase {
} }
} }
/*根据需求编号更新需求状态*/
async updatepayStatusByDemandCode(mobj, qobj, req) {
var pobj = mobj.actionBody;
if (pobj.solutionBizId && pobj.solutionBizId != 'undefined') {
try {
pobj.demand_code = pobj.solutionBizId;
if (pobj.operateType == 'PAID') {
pobj.business_status = 'isFinished';
}
var res = await this.service.findInfoByDemandCode(pobj);
if (res) {
Object.assign(res.business_info, { "payStatus": "已支付" })
await res.update({ business_info: res.business_info })
await this.service.updateStatusByDemandCode(pobj);
return system.getResult("操作成功!");
} else {
return system.getResultError("更新需求状态出错");
}
} catch (error) {
return system.getResultError(error);
}
} else {
return system.getResultError("参数错误!");
}
}
timeFormat(date) { timeFormat(date) {
let localTime = moment.utc(date).toDate(); let localTime = moment.utc(date).toDate();
localTime = moment(localTime).format("YYYY-MM-DD"); localTime = moment(localTime).format("YYYY-MM-DD");
......
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