liujie
2023-09-28 f0f6bd6f7499d1fa737f705091337befb98f5112
cloud-server-activity/src/main/java/com/dsh/activity/controller/PointMercharsController.java
@@ -925,4 +925,49 @@
    }
    @ResponseBody
    @PostMapping("/base/pointMerchars/getIntegralGoodsListOfSearchAudit")
    public List<Map<String,Object>> getIntegralGoodsListOfSearchAudit(@RequestBody IntegralGoodsOfSearch ofSearch){
        System.out.println(ofSearch);
        List<Map<String, Object>> mapList = pmdsService.queryGoodsListOfSearchAudit(ofSearch);
        if (mapList.size() > 0){
            for (Map<String, Object> stringObjectMap : mapList) {
                Integer o = (Integer) stringObjectMap.get("id");
                String startTime = (String) stringObjectMap.get("startTime");
                String endTime = (String) stringObjectMap.get("endTime");
                stringObjectMap.put("timeValue",startTime + "至"+endTime);
                int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
                        .eq(UserPointsMerchandise::getPointsMerchandiseId, o));
                int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>()
                        .eq(UserPointsMerchandise::getPointsMerchandiseId, o)
                        .eq(UserPointsMerchandise::getStatus,2));
                stringObjectMap.put("hasExchangeQty",count1);
                stringObjectMap.put("hasPickQty",count2);
                stringObjectMap.put("activeStatus",dealTimeStatus(startTime,endTime));
            }
            if (ToolUtil.isNotEmpty(ofSearch.getActiveStatus())){
                mapList = dealTimeData(mapList,ofSearch.getActiveStatus());
            }
        }
        System.out.println("mapList->"+mapList);
        return mapList;
    }
    @PostMapping("/base/pointMerchars/updateType")
    @ResponseBody
    public Object updateType(@RequestBody String s){
        String[] split = s.split("_");
        PointsMerchandise byId = pmdsService.getById(split[0]);
        byId.setStatus(Integer.valueOf(split[1]));
        if(Integer.valueOf(split[1])==3){
            byId.setRemark(split[2]);
        }
        return   pmdsService.updateById(byId);
    }
}