记得上下班打卡 | git大法好,push需谨慎

Commit bf7591b9 authored by 胡佳晨's avatar 胡佳晨

提交 积分商品增加 字段 simpleType 区别于 TYPE字段 用作局 类别分组

parent f71507a8
......@@ -44,11 +44,11 @@ liquidnet:
port: 6379
password: 3Xa%8p
sweet:
dbs: 0,16
database: 15
host: 39.107.71.112
port: 6379
password: 3Xa%8p
dbs: 0,256
database: 255
host: r-2ze7002ckw5u75fgukpd.redis.rds.aliyuncs.com
port: 6380
password: PO@B!Iud32
adam:
dbs: 0,16
database: 15
......
......@@ -16,7 +16,7 @@ liquidnet:
pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level: debug
mysql:
database-name: dev_ln_scene
database-name: test_ln_scene
mongodb:
sslEnabled: false
database: dev_ln_scene
database: test_ln_scene
......@@ -85,10 +85,10 @@ public class StoneScoreItemsServiceImpl implements IStoneScoreItemsService {
List<StoneScoreItems> voList;
long count;
if (page == 1) {
voList = redisUtils.getListSimple(simpleType.toString());
voList = redisUtils.getListSimple(simpleType);
count = voList.size();
} else {
HashMap<String, Object> info = mongoUtils.itemListPage(page, size, simpleType.toString());
HashMap<String, Object> info = mongoUtils.itemListPage(page, size, simpleType);
try {
voList = (List<StoneScoreItems>) info.get("data");
} catch (Exception e) {
......
......@@ -46,7 +46,7 @@ public class StoneMongoUtils {
*
* @return
*/
public HashMap<String, Object> itemListPage(int page, int size, String simpleType) {
public HashMap<String, Object> itemListPage(int page, int size, Integer simpleType) {
LocalDateTime now = LocalDateTime.now();
HashMap<String, Object> info = CollectionUtil.mapStringObject();
// 排序 分页
......@@ -54,7 +54,7 @@ public class StoneMongoUtils {
//条件
Criteria criteria = new Criteria().orOperator(Criteria.where("status").is(1), Criteria.where("status").is(2).and("startTime").lte(now).and("endTime").gte(now));
if (simpleType != null) {
criteria.and("simpleType").is(simpleType);
criteria = criteria.and("simpleType").is(simpleType);
}
Query query = Query.query(criteria);
// 查询总数
......
......@@ -37,9 +37,9 @@ public class StoneRedisUtils {
}
}
public List<StoneScoreItems> getListSimple(String simpleType) {
public List<StoneScoreItems> getListSimple(Integer simpleType) {
try {
String redisKey = StoneConstant.ITEM_LIST_SIMPLE.concat(simpleType);
String redisKey = StoneConstant.ITEM_LIST_SIMPLE.concat(simpleType.toString());
Object obj = redisUtil.get(redisKey);
if (obj == null) {
List<StoneScoreItems> list = (List<StoneScoreItems>) mongoUtils.itemListPage(1, 40, simpleType).get("data");
......
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