| | |
| | | if (ToolUtil.isNotEmpty(pointMercharsPayedVo.getStatus())) { |
| | | userPointsMerchandiseLambdaQueryWrapper.eq(UserPointsMerchandise::getStatus, pointMercharsPayedVo.getStatus()); |
| | | } |
| | | List<UserPointsMerchandise> list = upmseService.list(userPointsMerchandiseLambdaQueryWrapper); |
| | | List<UserPointsMerchandise> list = upmseService.list(userPointsMerchandiseLambdaQueryWrapper.orderByDesc(UserPointsMerchandise::getPaymentTime)); |
| | | System.out.println(list); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | if (list.size() > 0) { |
| | | for (UserPointsMerchandise pointsMerchandise : list) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", pointsMerchandise.getId()); |
| | | map.put("userId", pointsMerchandise.getUserId()); |
| | | map.put("status", pointsMerchandise.getStatus()); |
| | | map.put("payTime", sdf.format(pointsMerchandise.getPaymentTime())); |
| | | mapList.add(map); |
| | | } |
| | | } |
| | |
| | | @PostMapping("/base/pointMerchars/updateGoodsDetail") |
| | | public boolean updateGoodsDetail(@RequestBody Map<String, Object> map) { |
| | | try { |
| | | String name = (String) map.get("name"); |
| | | Integer pointMerchandiseId = (Integer) map.get("pointMerchandiseId"); |
| | | PointsMerchandise byId1 = pmdsService.getById(pointMerchandiseId); |
| | | if (Integer.valueOf(map.get("type").toString()) != 1) { |
| | | byId1.setStatus(2); |
| | | } |
| | | if(StringUtils.hasLength(name)){ |
| | | byId1.setName(name); |
| | | } |
| | | Integer quantityIssued = (Integer) map.get("quantityIssued"); |
| | | Integer pickUpQuantity = (Integer) map.get("pickUpQuantity"); |
| | | String redemptionInstructions = (String) map.get("redemptionInstructions"); |