Commit f6112ec3 by 孙亚楠

提交上架下架功能

parent 5f845af4
...@@ -320,9 +320,9 @@ class LaoActionApi extends APIBase { ...@@ -320,9 +320,9 @@ class LaoActionApi extends APIBase {
*/ */
async UpdateCurStatus(obj){ async UpdateCurStatus(obj){
//当前状态代码-1:展示中、2:已下架、3:已过期、4:审核未通过 cur_type //当前状态代码-1:展示中、2:已下架、3:已过期、4:审核未通过 cur_type
if(!this.trim(obj.curStatus)){ // if(!this.trim(obj.curStatus)){
return system.getResult(-1,`参数错误 状态不能为空`); // return system.getResult(-1,`参数错误 状态不能为空`);
} // }
if(!Number(this.trim(obj.curType))){ if(!Number(this.trim(obj.curType))){
return system.getResult(-1,`参数错误 状态码不能为空`); return system.getResult(-1,`参数错误 状态码不能为空`);
} }
......
...@@ -110,15 +110,11 @@ class RecruitService extends ServiceBase { ...@@ -110,15 +110,11 @@ class RecruitService extends ServiceBase {
async UpdateCurStatus(params){ async UpdateCurStatus(params){
try { try {
let cur_type = params.curType; let cur_type = params.curType;
let cur_status = params.curStatus;
let id = Number(params.id); let id = Number(params.id);
let data = {}; let data = {};
if(curType){ if(cur_type){
data.cur_type=cur_type; data.cur_type=cur_type;
} }
if(curStatus){
data.cur_status=cur_status;
}
let res = await this.dao.model.update(data,{where:{id:id}}); let res = await this.dao.model.update(data,{where:{id:id}});
return system.getResult(res); return system.getResult(res);
} catch (error) { } catch (error) {
......
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