| | |
| | | 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)); |
| | | int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, o) |
| | | ); |
| | | stringObjectMap.put("hasExchangeQty",count1); |
| | | stringObjectMap.put("hasPickQty",count2); |
| | | |
| | |
| | | |
| | | @PostMapping("/base/pointMerchars/queryPointMerchaseById") |
| | | public PointsMerchandise queryPointMerchaseById(@RequestBody Integer id){ |
| | | return pmdsService.getById(id); |
| | | PointsMerchandise byId = pmdsService.getById(id); |
| | | int count1 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, byId.getId()) |
| | | .eq(UserPointsMerchandise::getStatus,2)); |
| | | int count2 = upmseService.count(new LambdaQueryWrapper<UserPointsMerchandise>() |
| | | .eq(UserPointsMerchandise::getPointsMerchandiseId, byId.getId()) |
| | | ); |
| | | byId.setPickUpQuantity3(count2); |
| | | byId.setPickUpQuantity4(count1); |
| | | return byId; |
| | | } |
| | | |
| | | @PostMapping("/base/pointMerchars/getshopName") |
| | |
| | | @PostMapping("/base/pointMerchars/add") |
| | | public Integer add(@RequestBody PointsMerchandise pointsMerchandise){ |
| | | Integer storeId = pointsMerchandise.getShelves(); |
| | | pointsMerchandise.setShelves(2); |
| | | pointsMerchandise.setShelves(1); |
| | | boolean save = pmdsService.save(pointsMerchandise); |
| | | if(save && ToolUtil.isNotEmpty(storeId) && pointsMerchandise.getType()==2){ |
| | | PointsMerchandiseStore pointsMerchandiseStore = new PointsMerchandiseStore(); |