Commit d3e572bb by 兰国旗

laolan

parent 8e7f5451
......@@ -47,24 +47,5 @@ class RotationchartService extends ServiceBase {
async updates(pobj) {
return system.getResultSuccess(this.dao.update(pobj));
}
async getProductTypeInfo(obj){
var typeones = await this.dao.model.findAll({
attributes:["id","code","name","pic_url","jump_link_type","jump_link"],
where:{p_id:0},raw:true,
order:[["sequence","desc"]]
});
for(var i=0;i<typeones.length;i++){
if(typeones[i] && typeones[i].id)
var typetwos = await this.dao.model.findAll({
attributes:["id","code","name","pic_url"],
where:{p_id:typeones[i].id},raw:true,
order:[["sequence","desc"]]
});
typeones[i]["children"] = typetwos
}
return system.getResultSuccess(typeones);
}
}
module.exports = RotationchartService;
\ No newline at end of file
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