Commit 6c435b25 by 兰国旗

laolan

parent 2a1c4d54
......@@ -52,8 +52,6 @@ class BottommenuconfigService extends ServiceBase {
async update(pobj) {
var functionName = "bottomMenuConfig";
await this.redisdel.redisInfo(functionName);
return system.getResultSuccess(this.dao.update(pobj));
}
}
......
......@@ -5,19 +5,7 @@ class CluemaintenanceService extends ServiceBase {
constructor() {
super("aggregation", ServiceBase.getDaoName(CluemaintenanceService));
}
async getImgList(pobj) {
let res = await this.dao.findAndCountAll(pobj);
return system.getResultSuccess(res);
}
async createImginfo(pobj) {
let code = await this.getBusUid("img");
pobj.imginfo.code = code;
if (pobj.imginfo.company_id === undefined) {
pobj.imginfo.company_id = 10;
}
let res = await this.dao.create(pobj.imginfo);
return system.getResultSuccess(res);
}
async create(pobj) {
let code = await this.getBusUid("img");
pobj.code = code;
......
......@@ -4,7 +4,6 @@ const settings = require("../../../../config/settings");
class CycleproductService extends ServiceBase {
constructor() {
super("aggregation", ServiceBase.getDaoName(CycleproductService));
this.redisdel = system.getObject("service.aggregation.redisdelSve");
}
async update(pobj) {
......@@ -17,20 +16,6 @@ class CycleproductService extends ServiceBase {
if (pobj.pic_describe && pobj.pic_describe.length > 19) {
return system.getResultFail(-105, "图片描述最多20位字符");
}
try {
var functionName = "cycleProduct";
await this.redisdel.redisInfo(functionName);
var functionName1 = "productTypeFirst";
await this.redisdel.redisInfo(functionName1);
var functionName2 = "productTypeSecend";
await this.redisdel.redisInfo(functionName2);
var functionName3 = "productList";
await this.redisdel.redisInfo(functionName3);
var functionName4 = "productDetail";
await this.redisdel.redisInfo(functionName4);
} catch (error) {
console.log(error)
}
return system.getResultSuccess(this.dao.update(pobj));
}
}
......
......@@ -4,7 +4,6 @@ const settings = require("../../../../config/settings");
class PicturewarehouseService extends ServiceBase {
constructor() {
super("aggregation", ServiceBase.getDaoName(PicturewarehouseService));
this.redisdel = system.getObject("service.aggregation.redisdelSve");
}
async create(pobj) {
......@@ -21,22 +20,10 @@ class PicturewarehouseService extends ServiceBase {
if (!pobj.pic_url) {
return system.getResultFail(-123, "图片不能为空");
}
try {
var functionName = "productDetail";
await this.redisdel.redisInfo(functionName);
} catch (error) {
console.log(error)
}
return system.getResultSuccess(this.dao.update(pobj));
}
async delete(pobj) {
try {
var functionName = "productDetail";
await this.redisdel.redisInfo(functionName);
} catch (error) {
console.log(error)
}
return system.getResultSuccess(this.dao.delete(pobj));
}
}
......
......@@ -4,7 +4,6 @@ const settings = require("../../../../config/settings");
class PopularrecommendationService extends ServiceBase {
constructor() {
super("aggregation", ServiceBase.getDaoName(PopularrecommendationService));
this.redisdel = system.getObject("service.aggregation.redisdelSve");
}
async update(pobj) {
......@@ -18,17 +17,6 @@ class PopularrecommendationService extends ServiceBase {
if (pobj.pic_describe && pobj.pic_describe.length > 19) {
return system.getResultFail(-105, "图片描述最多20位字符");
}
var functionName = "popularRecommendationList";
await this.redisdel.redisInfo(functionName);
var functionName1 = "productTypeFirst";
await this.redisdel.redisInfo(functionName1);
var functionName2 = "productTypeSecend";
await this.redisdel.redisInfo(functionName2);
var functionName3 = "productList";
await this.redisdel.redisInfo(functionName3);
var functionName4 = "productDetail";
await this.redisdel.redisInfo(functionName4);
return system.getResultSuccess(this.dao.update(pobj));
}
}
......
......@@ -15,14 +15,6 @@ class ProductService extends ServiceBase {
async update(pobj) {
var functionName1 = "productTypeFirst";
await this.redisdel.redisInfo(functionName1);
var functionName2 = "productTypeSecend";
await this.redisdel.redisInfo(functionName2);
var functionName3 = "productList";
await this.redisdel.redisInfo(functionName3);
var functionName4 = "productDetail";
await this.redisdel.redisInfo(functionName4);
return system.getResultSuccess(this.dao.update(pobj));
}
......
......@@ -73,18 +73,6 @@ class ProducttypeService extends ServiceBase {
// return system.getResultFail(-106, "名称最多4位字符");
// }
try {
var functionName1 = "productTypeFirst";
await this.redisdel.redisInfo(functionName1);
var functionName2 = "productTypeSecend";
await this.redisdel.redisInfo(functionName2);
var functionName3 = "productList";
await this.redisdel.redisInfo(functionName3);
var functionName4 = "productDetail";
await this.redisdel.redisInfo(functionName4);
} catch (error) {
console.log(error)
}
return system.getResultSuccess(this.dao.update(pobj));
}
//获取产品类型信息-用于后台管理页面
......@@ -110,18 +98,6 @@ class ProducttypeService extends ServiceBase {
}
async delete(pobj){
try {
var functionName1 = "productTypeFirst";
await this.redisdel.redisInfo(functionName1);
var functionName2 = "productTypeSecend";
await this.redisdel.redisInfo(functionName2);
var functionName3 = "productList";
await this.redisdel.redisInfo(functionName3);
var functionName4 = "productDetail";
await this.redisdel.redisInfo(functionName4);
} catch (error) {
console.log(error)
}
return system.getResultSuccess(this.dao.delete(pobj));
}
}
......
......@@ -6,11 +6,11 @@ class RedisdelService extends ServiceBase {
this.redisClient = system.getObject("util.redisClient");
}
async redisInfo(functionName) {
async redisInfo(functionName, params) {
var template = "mediaaggregation";
let shaStr;
let rtn;
shaStr = template + "_" + functionName;
let shaStr;
let rtn;
shaStr = template + "_" + params + "_" + functionName;
rtn = await this.redisClient.get(shaStr);
if (rtn) {
var res = await this.redisClient.delete(shaStr);
......
......@@ -5,7 +5,6 @@ const { json } = require("sequelize");
class RotationchartService extends ServiceBase {
constructor() {
super("aggregation", ServiceBase.getDaoName(RotationchartService));
this.redisdel = system.getObject("service.aggregation.redisdelSve");
}
async create(pobj) {
let code = await this.getBusUid("mmc");
......@@ -53,38 +52,12 @@ class RotationchartService extends ServiceBase {
return system.getResultFail(-102, "排序不能为空");
}
}
try {
var functionName = "rotationChartList";
await this.redisdel.redisInfo(functionName);
var functionName1 = "productTypeFirst";
await this.redisdel.redisInfo(functionName1);
var functionName2 = "productTypeSecend";
await this.redisdel.redisInfo(functionName2);
var functionName3 = "productList";
await this.redisdel.redisInfo(functionName3);
var functionName4 = "productDetail";
await this.redisdel.redisInfo(functionName4);
} catch (error) {
console.log(error)
}
return system.getResultSuccess(this.dao.update(pobj));
}
async delete(pobj) {
try {
var functionName = "rotationChartList";
await this.redisdel.redisInfo(functionName);
var functionName1 = "productTypeFirst";
await this.redisdel.redisInfo(functionName1);
var functionName2 = "productTypeSecend";
await this.redisdel.redisInfo(functionName2);
var functionName3 = "productList";
await this.redisdel.redisInfo(functionName3);
var functionName4 = "productDetail";
await this.redisdel.redisInfo(functionName4);
} catch (error) {
console.log(error)
}
return system.getResultSuccess(this.dao.delete(pobj));
}
}
......
......@@ -16,20 +16,7 @@ class SecondlevelneedconfigService extends ServiceBase {
if (!pobj.recommend_product_quantity) {
return system.getResultFail(-103, "推荐产品数量不能为空");
}
try {
var functionName = "popularRecommendationList";
await this.redisdel.redisInfo(functionName);
var functionName1 = "productTypeFirst";
await this.redisdel.redisInfo(functionName1);
var functionName2 = "productTypeSecend";
await this.redisdel.redisInfo(functionName2);
var functionName3 = "productList";
await this.redisdel.redisInfo(functionName3);
var functionName4 = "productDetail";
await this.redisdel.redisInfo(functionName4);
} catch (error) {
console.log(error)
}
return system.getResultSuccess(this.dao.update(pobj));
}
}
......
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