Commit 4c468b20 by Sxy

fix: 代码规范

parent f2d0cc91
...@@ -49,10 +49,10 @@ class AppCtl extends CtlBase { ...@@ -49,10 +49,10 @@ class AppCtl extends CtlBase {
const rtn = await this.service.saveFuncTree(p); const rtn = await this.service.saveFuncTree(p);
return system.getResult(rtn); return system.getResult(rtn);
} }
async create(pobj, queryobj, req) { // async create(pobj, queryobj, req) {
pobj.creator_id = pobj.userid;// 设置创建者 // pobj.creator_id = pobj.userid;// 设置创建者
return super.create(pobj, queryobj, req); // return super.create(pobj, queryobj, req);
} // }
async update(pobj, queryobj, req) { async update(pobj, queryobj, req) {
return super.update(pobj, queryobj, req); return super.update(pobj, queryobj, req);
} }
......
...@@ -12,13 +12,13 @@ class CacheManager { ...@@ -12,13 +12,13 @@ class CacheManager {
const files = fs.readdirSync(cachePath); const files = fs.readdirSync(cachePath);
if (files) { if (files) {
files.forEach((r) => { files.forEach((r) => {
const classObj = require(`${cachePath}/${r}`); const ClassObj = require(`${cachePath}/${r}`);
self[classObj.name] = new classObj(); self[ClassObj.name] = new ClassObj();
const refTmp = self[classObj.name]; const refTmp = self[ClassObj.name];
if (refTmp.prefix) { if (refTmp.prefix) {
self.doc[refTmp.prefix] = refTmp.desc; self.doc[refTmp.prefix] = refTmp.desc;
} else { } else {
console.log(`请在${classObj.name}缓存中定义prefix`); console.log(`请在${ClassObj.name}缓存中定义prefix`);
} }
}); });
} }
......
...@@ -51,6 +51,7 @@ class PricestrategyService extends ServiceBase { ...@@ -51,6 +51,7 @@ class PricestrategyService extends ServiceBase {
const one = rows[i]; const one = rows[i];
const two = rows[++i]; const two = rows[++i];
console.log(two, '..........'); console.log(two, '..........');
// eslint-disable-next-line no-loop-func
one.forEach((item) => { one.forEach((item) => {
two.forEach((c) => { two.forEach((c) => {
mid.push(`${item}|${c}`); mid.push(`${item}|${c}`);
...@@ -71,20 +72,3 @@ class PricestrategyService extends ServiceBase { ...@@ -71,20 +72,3 @@ class PricestrategyService extends ServiceBase {
} }
} }
module.exports = PricestrategyService; module.exports = PricestrategyService;
// (async ()=>{
// let u=new AppService();
// // let x=await u.cregister("jiangong")
// // console.log(x)
// // let x=await u.cunregister("jiangong")
// // console.log(x)
// // let t=await u.cmakejwt()
// // console.log(t)
// //let ux=await u.cjsonregister(AppService.newRouteUrl("test-service2"),{name:"test-service2",hosts:["ttest1.com"]})
// //let ux=await u.cjsonregister(AppService.newServiceUrl(),{name:"test-service3",url:"http://zhichan.gongsibao.com"})
// //let ux=await u.cdel(AppService.routeUrl("test-service2"))
// //let ux=await u.cdel(AppService.serviceUrl("test-service2"))
// // let ux=await u.create({name:"test4-service",backend:"zhichan-service",domainName:"domain.com"})
// // console.log(ux);
// // let delrtn=await u.delete({id:2,name:"test4-service"})
// // console.log(delrtn);
// })()
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