Commit 9077ae2d by 孙亚楠

d

parent f19544e9
...@@ -74,6 +74,9 @@ class ActionAPI extends APIBase { ...@@ -74,6 +74,9 @@ class ActionAPI extends APIBase {
case "businessscopePage": case "businessscopePage":
opResult = await this.businessscopeSve.apiPage(action_body); opResult = await this.businessscopeSve.apiPage(action_body);
break; break;
case "listbusinessscopeAll": //所有的经营范围 (没有分页)
opResult = await this.businessscopeSve.listbusinessscopeAll(action_body);
break;
case "businessscopeSave": case "businessscopeSave":
opResult = await this.businessscopeSve.apiSave(action_body); opResult = await this.businessscopeSve.apiSave(action_body);
break; break;
......
...@@ -172,11 +172,24 @@ class BusinessscopeService extends ServiceBase { ...@@ -172,11 +172,24 @@ class BusinessscopeService extends ServiceBase {
this.handleDate(item.domicile, ["created_at"], null, -8); this.handleDate(item.domicile, ["created_at"], null, -8);
} }
} }
/**
* fn:所有经营范围
* @returns {Promise<void>}
*/
async listbusinessscopeAll(){
try{
let list = await this.dao.model.findAll({
where:{
isEnabled:true
},
attributes:['id','businessType','businessscope']
});
return system.getResult(list);
}catch (e) {
console.log(e);
return system.getResult(null, `系统错误`);
}
}
} }
module.exports = BusinessscopeService; module.exports = BusinessscopeService;
// var task=new UserService(); \ No newline at end of file
// task.getUserStatisticGroupByApp().then(function(result){
// console.log((result));
// }).catch(function(e){
// console.log(e);
// });
\ No newline at end of file
...@@ -21,7 +21,7 @@ var settings = { ...@@ -21,7 +21,7 @@ var settings = {
cacheprefix: "sjb", cacheprefix: "sjb",
usertimeout: 3600, //单位秒 usertimeout: 3600, //单位秒
basepath: path.normalize(path.join(__dirname, '../..')), basepath: path.normalize(path.join(__dirname, '../..')),
port: process.env.NODE_PORT || 3102, port: process.env.NODE_PORT || 3109,
defaultPassWord: "987456", defaultPassWord: "987456",
paasUrl: function () { paasUrl: function () {
if (this.env == "dev") { if (this.env == "dev") {
......
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