Commit a2d7ec03 by 庄冰

icp

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