Commit a2d7ec03 by 庄冰

icp

parent f418de83
...@@ -48,6 +48,9 @@ class IcpAPI extends APIBase { ...@@ -48,6 +48,9 @@ class IcpAPI extends APIBase {
case "getIcpProgrammeDetail"://获取icp方案 case "getIcpProgrammeDetail"://获取icp方案
opResult = await this.needsolutionSve.getIcpProgrammeDetail(pobj); opResult = await this.needsolutionSve.getIcpProgrammeDetail(pobj);
break; break;
case "getNeedSolutionDetailByUser"://获取方案详情
opResult = await this.needsolutionSve.getNeedSolutionDetailByUser(pobj);
break;
// case "updateStausByRefundOrder"://修改退款方案状态 // case "updateStausByRefundOrder"://修改退款方案状态
// opResult = await this.needsolutionSve.updateStausByRefundOrder(pobj); // opResult = await this.needsolutionSve.updateStausByRefundOrder(pobj);
// break; // break;
......
...@@ -1116,19 +1116,35 @@ class NeedsolutionService extends ServiceBase { ...@@ -1116,19 +1116,35 @@ class NeedsolutionService extends ServiceBase {
await this.dao.update(updateObj);//方案状态修改 await this.dao.update(updateObj);//方案状态修改
return system.getResultSuccess(); return system.getResultSuccess();
} }
// //获取方案详情(内部调用)
async getIcpProgrammeDetail(pobj){ async getIcpProgrammeDetail(pobj){
var ab = pobj.actionBody; var ab = pobj.actionBody;
if(!ab.BizId){ if(!ab.BizId){
return system.getResultFail(-101,"方案编号不能为空"); return system.getResultFail(-101,"方案编号不能为空");
} }
//获取方案信息 //获取方案信息
var ns = await this.dao.model.findAll({ var ns = await this.dao.model.findAll({
where:{channelSolutionNo:ab.BizId},raw:true where:{channelSolutionNo:ab.BizId},raw:true
}); });
return system.getResultSuccess(ns); return system.getResultSuccess(ns);
} }
//获取方案详情(前端调用)
async getNeedSolutionDetailByUser(pobj){
var ab = pobj.actionBody;
var user = pobj.userInfo;
if(!user || !user.id){
return system.getResultFail(-100,"未知用户");
}
// ab["createUserId"]=user.id;
if(!ab.solutionNo){
return system.getResultFail(-101,"方案编号不能为空");
}
//获取方案信息
var ns = await this.dao.model.findAll({
where:{solutionNo:ab.solutionNo,createUserId:user.id},raw:true
});
return system.getResultSuccess(ns);
}
//---------------------icp注册-end----------------------------------------------------------------- //---------------------icp注册-end-----------------------------------------------------------------
......
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