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

Commit 59e6151d authored by liuran's avatar liuran

Merge remote-tracking branch 'origin/dev_draw_change' into dev_draw_change

parents 103e03a8 fa41f436
...@@ -44,11 +44,11 @@ liquidnet: ...@@ -44,11 +44,11 @@ liquidnet:
port: 6379 port: 6379
password: 3Xa%8p password: 3Xa%8p
sweet: sweet:
dbs: 0,16 dbs: 0,256
database: 15 database: 255
host: 39.107.71.112 host: r-2ze7002ckw5u75fgukpd.redis.rds.aliyuncs.com
port: 6379 port: 6380
password: 3Xa%8p password: PO@B!Iud32
adam: adam:
dbs: 0,16 dbs: 0,16
database: 15 database: 15
......
...@@ -16,7 +16,7 @@ liquidnet: ...@@ -16,7 +16,7 @@ liquidnet:
pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level: debug level: debug
mysql: mysql:
database-name: dev_ln_scene database-name: test_ln_scene
mongodb: mongodb:
sslEnabled: false sslEnabled: false
database: dev_ln_scene database: test_ln_scene
...@@ -35,7 +35,7 @@ public class StoneItemController { ...@@ -35,7 +35,7 @@ public class StoneItemController {
@ApiOperation("积分商品列表(simpleType)") @ApiOperation("积分商品列表(simpleType)")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<PageInfo<List<StoneItemListVo>>> itemListSimpleType(@RequestParam("page") @Valid Integer page, @RequestParam("simpleType") @Valid Integer simpleType) { public ResponseDto<PageInfo<List<StoneItemListVo>>> itemListSimpleType(@RequestParam("page") @Valid Integer page, @RequestParam("simpleType") @Valid Integer simpleType) {
return ResponseDto.success(stoneScoreItemsService.itemListSimpleType(simpleType, page, 40)); return ResponseDto.success(stoneScoreItemsService.itemListSimpleType(simpleType, page, 1000));
} }
@GetMapping("details") @GetMapping("details")
......
...@@ -85,10 +85,10 @@ public class StoneScoreItemsServiceImpl implements IStoneScoreItemsService { ...@@ -85,10 +85,10 @@ public class StoneScoreItemsServiceImpl implements IStoneScoreItemsService {
List<StoneScoreItems> voList; List<StoneScoreItems> voList;
long count; long count;
if (page == 1) { if (page == 1) {
voList = redisUtils.getListSimple(simpleType.toString()); voList = redisUtils.getListSimple(simpleType);
count = voList.size(); count = voList.size();
} else { } else {
HashMap<String, Object> info = mongoUtils.itemListPage(page, size, simpleType.toString()); HashMap<String, Object> info = mongoUtils.itemListPage(page, size, simpleType);
try { try {
voList = (List<StoneScoreItems>) info.get("data"); voList = (List<StoneScoreItems>) info.get("data");
} catch (Exception e) { } catch (Exception e) {
......
...@@ -46,7 +46,7 @@ public class StoneMongoUtils { ...@@ -46,7 +46,7 @@ public class StoneMongoUtils {
* *
* @return * @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(); LocalDateTime now = LocalDateTime.now();
HashMap<String, Object> info = CollectionUtil.mapStringObject(); HashMap<String, Object> info = CollectionUtil.mapStringObject();
// 排序 分页 // 排序 分页
...@@ -54,7 +54,7 @@ public class StoneMongoUtils { ...@@ -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)); 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) { if (simpleType != null) {
criteria.and("simpleType").is(simpleType); criteria = criteria.and("simpleType").is(simpleType);
} }
Query query = Query.query(criteria); Query query = Query.query(criteria);
// 查询总数 // 查询总数
......
...@@ -37,9 +37,9 @@ public class StoneRedisUtils { ...@@ -37,9 +37,9 @@ public class StoneRedisUtils {
} }
} }
public List<StoneScoreItems> getListSimple(String simpleType) { public List<StoneScoreItems> getListSimple(Integer simpleType) {
try { try {
String redisKey = StoneConstant.ITEM_LIST_SIMPLE.concat(simpleType); String redisKey = StoneConstant.ITEM_LIST_SIMPLE.concat(simpleType.toString());
Object obj = redisUtil.get(redisKey); Object obj = redisUtil.get(redisKey);
if (obj == null) { if (obj == null) {
List<StoneScoreItems> list = (List<StoneScoreItems>) mongoUtils.itemListPage(1, 40, simpleType).get("data"); 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