Commit 2099b35c by 庄冰

link

parent b265fa81
......@@ -28,6 +28,20 @@ class TemplatelinkCtl extends CtlBase {
let result = await this.templatelinkSve.createTemplateLink(pobj);
return result;
}
/**
* 修改投放状态
* @param {*} pobj
*/
async updateLaunchStatus(pobj){
let result = await this.templatelinkSve.updateLaunchStatus(pobj);
return result;
}
async delete(pobj, qobj, req) {
const up = await this.templatelinkSve.deleteTemplateLink(pobj);
return system.getResult(up);
}
}
module.exports = TemplatelinkCtl;
......@@ -205,8 +205,7 @@ class TemplatelinkService extends ServiceBase {
* @param {*} pobj
*/
async updateLaunchStatus(pobj){
var ab = pobj.actionBody;
var xctx = pobj.xctx;
var ab = pobj;
if(!ab){
return system.getResultFail(-100,"参数错误");
}
......@@ -233,16 +232,15 @@ class TemplatelinkService extends ServiceBase {
* @param {*} pobj
*/
async deleteTemplateLink(pobj){
var ab = pobj.actionBody;
var xctx = pobj.xctx;
var ab = pobj;
if(!ab){
return system.getResultFail(-100,"参数错误");
}
if(!ab.code){
if(!ab.id){
return system.getResultFail(-101,"链接编码不能为空");
}
var linkinfo = await this.dao.model.findOne({
where:{code:ab.code},raw:true
where:{id:ab.id},raw:true
});
if(!linkinfo || !linkinfo.id){
return system.getResultFail(-300,"未知模板链接");
......
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