| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | } |
| | | @GetMapping("/statistics/list") |
| | | @ApiOperation(value = "门店积分明细必传门店id", tags = {"后台"}) |
| | | public R<Page<ShopPoint>> statisticslist(ShopPoint shopPoint,Integer pageNum,Integer pageSize) { |
| | | Page<ShopPoint> page = shopPointService.lambdaQuery() |
| | | .eq(ShopPoint::getShopId, shopPoint.getShopId()) |
| | | .eq(shopPoint.getType()!=null && shopPoint.getType()!=0,ShopPoint::getType, shopPoint.getType()) |
| | | .like(shopPoint.getOrderNum()!=null,ShopPoint::getOrderNum, shopPoint.getOrderNum()) |
| | | .orderByDesc(ShopPoint::getCreateTime) |
| | | .page(Page.of(pageNum, pageSize)); |
| | | public R<IPage<ShopPoint>> statisticslist(ShopPoint shopPoint,Integer pageNum,Integer pageSize) { |
| | | IPage<ShopPoint> page = shopPointService.getShopPointPage(Page.of(pageNum, pageSize), shopPoint); |
| | | page.getRecords().forEach(s->s.setVariablePoint(s.getVariablePoint() * s.getChangeDirection())); |
| | | return R.ok(page); |
| | | } |
| | | |
| | |
| | | shopPointCopyMapper.insert(shopPoint); |
| | | } |
| | | |
| | | @DeleteMapping("/shop-point/deleteShopPointCopy") |
| | | public void deleteShopPointCopy(@RequestParam("orderId") Long orderId){ |
| | | shopPointCopyMapper.delete(new LambdaQueryWrapper<ShopPointCopy>() |
| | | @DeleteMapping("/deleteShopPointCopy") |
| | | public void deleteShopPointCopy(@RequestParam("orderId") Long orderId, @RequestParam("type") List<Integer> type){ |
| | | shopPointCopyMapper.delete(new LambdaQueryWrapper<ShopPointCopy>().in(ShopPointCopy::getType, type) |
| | | .eq(ShopPointCopy::getObjectId, orderId)); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("/deleteShopPointCopyByIds") |
| | | public void deleteShopPointCopyByIds(@RequestParam("ids") List<Long> ids){ |
| | | shopPointCopyMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/getShopPointCopy") |
| | | public R<List<ShopPointCopy>> getShopPointCopy(@RequestParam("orderId") Long orderId, @RequestParam("type") List<Integer> type){ |
| | | List<ShopPointCopy> shopPointCopies = shopPointCopyMapper.selectList(new LambdaQueryWrapper<ShopPointCopy>().in(ShopPointCopy::getType, type) |
| | | .eq(ShopPointCopy::getObjectId, orderId)); |
| | | return R.ok(shopPointCopies); |
| | | } |
| | | |
| | | } |
| | | |