| 对比新文件 |
| | |
| | | package com.mzl.flower.dto.request.flower; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FlowerMarkupPsSpCgBatchSaveDTO { |
| | | @ApiModelProperty(value = "合伙人id") |
| | | private Long partnerId; |
| | | |
| | | @ApiModelProperty(value = "分类id列表") |
| | | private List<Long> categoryId; |
| | | |
| | | @ApiModelProperty(value = "A级金额") |
| | | private BigDecimal levelA; |
| | | |
| | | @ApiModelProperty(value = "B级金额") |
| | | private BigDecimal levelB; |
| | | |
| | | @ApiModelProperty(value = "C级金额") |
| | | private BigDecimal levelC; |
| | | |
| | | @ApiModelProperty(value = "D级金额") |
| | | private BigDecimal levelD; |
| | | |
| | | @ApiModelProperty(value = "E级金额") |
| | | private BigDecimal levelE; |
| | | |
| | | @ApiModelProperty(value = "O级金额") |
| | | private BigDecimal levelO; |
| | | } |
| | |
| | | @Autowired |
| | | private CouponRecordService couponRecordService; |
| | | |
| | | @Scheduled(cron = "1 0/20 * * * ?") |
| | | @Scheduled(cron = "1 0/30 * * * ?") |
| | | public void calculateAvePrice() { |
| | | log.info("均价计算开始:" + DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss")); |
| | | List<FlowerCategory> cLs = categoryMapper.selectList(new QueryWrapper<FlowerCategory>() |
| | |
| | | markupCacheClient.deleteAllPsSpCg(id); |
| | | } |
| | | |
| | | public void saveMarkupSpCgBatch(FlowerMarkupPsSpCgBatchSaveDTO dto){ |
| | | List<Long> categoryIds = dto.getCategoryId(); |
| | | if(categoryIds == null || categoryIds.size() == 0){ |
| | | throw new ValidationException("分类列表不能为空"); |
| | | } |
| | | for(Long categoryId : categoryIds) { |
| | | FlowerMarkupPsSpCgSaveDTO cg = new FlowerMarkupPsSpCgSaveDTO(); |
| | | BeanUtils.copyProperties(dto, cg); |
| | | |
| | | cg.setCategoryId(categoryId); |
| | | |
| | | saveMarkupSpCg(cg); |
| | | } |
| | | } |
| | | |
| | | public void saveMarkupSpCg(FlowerMarkupPsSpCgSaveDTO dto){ |
| | | Long cId = dto.getCategoryId(); |
| | | FlowerMarkupPsSpCg cg = spCgMapper.selectOne(new QueryWrapper<FlowerMarkupPsSpCg>() |
| | |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @PostMapping("/spcg/list/save/batch") |
| | | @ApiOperation(value = "批量新增商品分类加价") |
| | | public ResponseEntity<ReturnDataDTO> saveMarkupSpCgBatch(@RequestBody FlowerMarkupPsSpCgBatchSaveDTO dto) { |
| | | psService.saveMarkupSpCgBatch(dto); |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @PostMapping("/spcg/list/save") |
| | | @ApiOperation(value = "新增商品分类加价") |
| | | public ResponseEntity<ReturnDataDTO> saveMarkupSpCg(@RequestBody FlowerMarkupPsSpCgSaveDTO dto) { |