| | |
| | | } |
| | | |
| | | |
| | | |
| | | /* @ApiOperation(value = "统计当前用户订单", response = OrderStatisticsVO.class) |
| | | @PostMapping("orderStatistics") |
| | | public R orderStatistics() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (loginUserInfo == null) { |
| | | return R.fail("请重新登陆"); |
| | | } |
| | | return communityService.orderStatistics(loginUserInfo.getUserId()); |
| | | }*/ |
| | | |
| | | @ApiOperation(value = "小程序微信调起支付") |
| | | @PostMapping("wxpay") |
| | | public R wxPay(@RequestBody OrderPayDTO orderPayDTO) { |
| | |
| | | return communityService.pageOrderByStoreId(pageComFlowerOrderListDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "查询我的店铺各类统计数据") |
| | | @GetMapping("/selectCountByStoreId") |
| | | public R selectCountByStoreId(Long storeId){ |
| | | return communityService.selectCountByStoreId(storeId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 创建退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("createRefundOrder") |
| | | @ApiOperation(value = "创建退款订单") |
| | | public R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){ |
| | | return communityService.createRefundOrder(comShopFlowerRefundOrderDTO); |
| | | } |
| | | |
| | | /** |
| | | * 用户 分页查询退款订单 |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("pageRefundOrder") |
| | | @ApiOperation(value = "退款订单分页查询 用户",response = ComShopFlowerRefundOrderVO.class) |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO){ |
| | | pageComOrderRefundDTO.setUserId(this.getUserId()); |
| | | return communityService.pageRefundOrder(pageComOrderRefundDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("updateRefundOrder") |
| | | @ApiOperation(value = "修改退款订单") |
| | | public R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){ |
| | | return communityService.updateRefundOrder(comShopFlowerRefundOrderDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("selectCountGroupStatus") |
| | | @ApiOperation(value = "商家后台-退款申请统计") |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | return communityService.selectCountGroupStatus(storeId); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "商家用户id", hidden = true) |
| | | private Long backstageUserId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.shop; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @auther yh |
| | | * @create 2022-11-08 17:25:45 |
| | | * @describe 统计订单数VO |
| | | */ |
| | | @Data |
| | | @ApiModel("根据商品统计日、月、年、累计订单量") |
| | | public class ComShopOrderStoreIdCountVO { |
| | | |
| | | |
| | | |
| | | /** |
| | | * 订 |
| | | */ |
| | | @ApiModelProperty("订单数量") |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 统计名称 |
| | | */ |
| | | @ApiModelProperty("统计名称") |
| | | private String countName; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/selectCountByDeliveryType") |
| | | R selectCountByDeliveryType(Integer deliveryType); |
| | | R selectCountByDeliveryType(Integer deliveryType,Long storeId); |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/selectCountByStoreId") |
| | | R selectCountByStoreId(Long storeId); |
| | | |
| | | |
| | | /** |
| | | * 创建退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/shopFlower/createRefundOrder") |
| | | R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/shopFlower/pageRefundOrder") |
| | | R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO); |
| | | |
| | | /** |
| | | * 修改退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/shopFlower/updateRefundOrder") |
| | | R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO); |
| | | |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/selectCountGroupStatus") |
| | | R selectCountGroupStatus(Long storeId); |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopFlowerRefundOrderDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComOrderRefundDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopFlowerGoodsDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopOrderSearchDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | return communityService.getAllGoodsCategories(); |
| | | } |
| | | |
| | | @ApiOperation(value = "统计查询订单数量") |
| | | @GetMapping("/order/selectCountByDeliveryType") |
| | | public R selectCountByDeliveryType(Integer deliveryType){ |
| | | return communityService.selectCountByDeliveryType(deliveryType); |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "deliveryType", value = "1.自提 2.快递"), |
| | | @ApiImplicitParam(name = "storeId", value = "商店id")}) |
| | | public R selectCountByDeliveryType(Integer deliveryType,Long storeId){ |
| | | return communityService.selectCountByDeliveryType(deliveryType,storeId); |
| | | } |
| | | |
| | | @ApiOperation(value = "商家查询 订单_分页列表", response = ComShopOrderSearchVO.class) |
| | |
| | | return communityService.orderDetailFlower(orderId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("pageRefundOrder") |
| | | @ApiOperation(value = "分页查询",response = ComShopFlowerRefundOrderVO.class) |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO){ |
| | | return communityService.pageRefundOrder(pageComOrderRefundDTO); |
| | | } |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("selectCountGroupStatus") |
| | | @ApiOperation(value = "商家后台-退款申请统计") |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | return communityService.selectCountGroupStatus(storeId); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | private ComShopFlowerEvaluateService comShopFlowerEvaluateService; |
| | | @Resource |
| | | private ComShopFlowerOrderDeliveryService comShopFlowerOrderDeliveryService; |
| | | @Resource |
| | | private ComShopFlowerRefundOrderService comShopFlowerRefundOrderService; |
| | | |
| | | |
| | | /** |
| | |
| | | return comShopFlowerOrderService.wxPay(orderPayDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询订单总数 |
| | | * @param deliveryType |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectCountByDeliveryType") |
| | | public R selectCountByDeliveryType(Integer deliveryType){ |
| | | return comShopFlowerOrderService.selectCountByDeliveryType(deliveryType); |
| | | public R selectCountByDeliveryType(Integer deliveryType,Long storeId){ |
| | | return comShopFlowerOrderService.selectCountByDeliveryType(deliveryType,storeId); |
| | | } |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectCountByStoreId") |
| | | public R selectCountByStoreId(Long storeId){ |
| | | return comShopFlowerOrderService.selectCountByStoreId(storeId); |
| | | } |
| | | |
| | | /** |
| | | * 创建退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("createRefundOrder") |
| | | public R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){ |
| | | return comShopFlowerRefundOrderService.createRefundOrder(comShopFlowerRefundOrderDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("pageRefundOrder") |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO){ |
| | | return comShopFlowerRefundOrderService.pageRefundOrder(pageComOrderRefundDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改退款订单 |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("updateRefundOrder") |
| | | public R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){ |
| | | return comShopFlowerRefundOrderService.updateRefundOrder(comShopFlowerRefundOrderDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("selectCountGroupStatus") |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | return comShopFlowerRefundOrderService.selectCountGroupStatus(storeId); |
| | | } |
| | | |
| | | |
| | |
| | | * @return 商品列表 |
| | | */ |
| | | IPage<ComShopFlowerGoodsVO> pageShopGoodByApps(@Param("page") Page page, @Param("comShopFlowerGoodsDTO") ComShopFlowerGoodsDTO comShopFlowerGoodsDTO); |
| | | |
| | | /** |
| | | * 商店内在售商品 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | Integer selectCountSaleByStoreId(@Param("storeId") Long storeId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.shop.PageComFlowerOrderListDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopOrderSearchDTO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderPageVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderStoreListVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopOrderCountVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopOrderSearchVO; |
| | | import com.panzhihua.common.model.vos.shop.*; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | * @param deliveryType |
| | | * @return |
| | | */ |
| | | List<ComShopOrderCountVO> selectCountByDeliveryType(@Param("deliveryType") Integer deliveryType); |
| | | List<ComShopOrderCountVO> selectCountByDeliveryType(@Param("deliveryType") Integer deliveryType,@Param("storeId") Long storeId); |
| | | |
| | | |
| | | List<ComShopOrderStoreIdCountVO> selectCountByStoreId(@Param("storeId") Long storeId,@Param("deliveryType") Integer deliveryType); |
| | | |
| | | List<ComShopOrderStoreIdCountVO> selectSumAmountByStoreId(@Param("storeId") Long storeId); |
| | | } |
| | |
| | | */ |
| | | @Mapper |
| | | public interface ComShopFlowerOrderPayDAO extends BaseMapper<ComShopFlowerOrderPayDO> { |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.shop.PageComOrderRefundDTO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerRefundOrderVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopOrderCountVO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerRefundOrderDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName: ComShopFlowerRefundOrderMapper |
| | |
| | | @Mapper |
| | | public interface ComShopFlowerRefundOrderDAO extends BaseMapper<ComShopFlowerRefundOrderDO> { |
| | | /** |
| | | * 分页查询 |
| | | * 用户 分页查询退款订单 |
| | | * @param page |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | IPage<ComShopFlowerRefundOrderVO> pageRefundOrder(@Param("page") Page page, @Param("pageComOrderRefundDTO") PageComOrderRefundDTO pageComOrderRefundDTO); |
| | | |
| | | Integer selectCountByStoreId(@Param("storeId") Long storeId); |
| | | |
| | | List<ComShopOrderCountVO> selectCountGroupStatus(@Param("storeId") Long storeId); |
| | | |
| | | } |
| | |
| | | * @param deliveryType |
| | | * @return |
| | | */ |
| | | R selectCountByDeliveryType(Integer deliveryType); |
| | | R selectCountByDeliveryType(Integer deliveryType,Long storeId); |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | R selectCountByStoreId(Long storeId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R updateRefundOrder(ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO); |
| | | |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | R selectCountGroupStatus(Long storeId); |
| | | } |
| | |
| | | private ConvenientElevatingPointDAO convenientElevatingPointDAO; |
| | | @Resource |
| | | private ComShopFlowerEvaluateDAO comShopFlowerEvaluateDAO; |
| | | @Resource |
| | | private ComShopFlowerRefundOrderDAO comShopFlowerRefundOrderDAO; |
| | | |
| | | |
| | | @Value("${hcMin.app.isTest}") |
| | |
| | | shopOrderDO.setOrderNo(orderNo); |
| | | shopOrderDO.setStoreId(storeId); |
| | | shopOrderDO.setUserId(userId); |
| | | //TODO |
| | | shopOrderDO.setStatus(ComShopFlowerOrderDO.status.dfk); |
| | | shopOrderDO.setPayStatus(ComShopFlowerOrderDO.payStatus.no); |
| | | shopOrderDO.setReceiverId(orderCreateDTO.getReceiverId()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R selectCountByDeliveryType(Integer deliveryType) { |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountByDeliveryType(deliveryType); |
| | | public R selectCountByDeliveryType(Integer deliveryType,Long storeId) { |
| | | //1.等待配送 2.配送中 3.待收货 4.待评价 5.已完成 6.已取消 7.已退款 8.总订单 |
| | | String[] statusStr = {"ddps","psz","dsh","dpj","ywc","yqx","ytk"}; |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountByDeliveryType(deliveryType,storeId); |
| | | Map<Integer, Integer> collect = comShopOrderCountVOS.stream().collect(Collectors.toMap(ComShopOrderCountVO::getStatus, ComShopOrderCountVO::getAmount)); |
| | | ComShopOrderCountVO comShopOrderCountVO = new ComShopOrderCountVO(); |
| | | comShopOrderCountVO.setStatus(8); |
| | | comShopOrderCountVO.setAmount(0); |
| | | for (int i = 1; i < 8; i++) { |
| | | Map<String,Integer> retMap = new HashMap<>(); |
| | | int amountTotal = 0; |
| | | for (int i = 0; i < statusStr.length; i++) { |
| | | if (collect.containsKey(i)) { |
| | | Integer amount = collect.get(i); |
| | | comShopOrderCountVO.setAmount(amount + comShopOrderCountVO.getAmount()); |
| | | amountTotal = amountTotal + amount; |
| | | retMap.put(statusStr[i],amount); |
| | | }else { |
| | | collect.put(i,0); |
| | | retMap.put(statusStr[i],0); |
| | | } |
| | | } |
| | | collect.put(comShopOrderCountVO.getStatus(),comShopOrderCountVO.getAmount()); |
| | | retMap.put("zdd",amountTotal); |
| | | |
| | | return R.ok(collect); |
| | | return R.ok(retMap); |
| | | } |
| | | |
| | | @Override |
| | | public R selectCountByStoreId(Long storeId){ |
| | | Map<String,Object> retMap = new HashMap<>(); |
| | | //查询我的店铺订单量 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS = this.baseMapper.selectCountByStoreId(storeId, null); |
| | | Map<String, Integer> zddlMap = comShopOrderStoreIdCountVOS.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCount)); |
| | | retMap.put("zddl",zddlMap); |
| | | //查询我的店铺拼单订单 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS1 = this.baseMapper.selectCountByStoreId(storeId, ComShopFlowerOrderDO.deliveryType.store); |
| | | Map<String, Integer> pdddMap = comShopOrderStoreIdCountVOS1.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCount)); |
| | | retMap.put("pddd",pdddMap); |
| | | //查询我的店铺快递订单 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS2 = this.baseMapper.selectCountByStoreId(storeId, ComShopFlowerOrderDO.deliveryType.express); |
| | | Map<String, Integer> kdddMap = comShopOrderStoreIdCountVOS2.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCount)); |
| | | retMap.put("kddd",kdddMap); |
| | | |
| | | //拼单订单各状态 |
| | | R r = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.store,storeId); |
| | | retMap.put("pdddStatus",r.getData()); |
| | | |
| | | //快递订单各状态 |
| | | R r1 = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.express,storeId); |
| | | retMap.put("kdddStatus",r1.getData()); |
| | | //营业额 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS3 = this.baseMapper.selectSumAmountByStoreId(storeId); |
| | | Map<String, Integer> yyeMap = comShopOrderStoreIdCountVOS3.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCount)); |
| | | retMap.put("yye",yyeMap); |
| | | //在售商品 |
| | | Integer countSale = comShopFlowerGoodsDAO.selectCountSaleByStoreId(storeId); |
| | | retMap.put("countSale",countSale); |
| | | //退款申请 |
| | | Integer refundOrder = comShopFlowerRefundOrderDAO.selectCountByStoreId(storeId); |
| | | retMap.put("refundOrder",refundOrder); |
| | | |
| | | return R.ok(retMap); |
| | | } |
| | | |
| | | |
| | |
| | | import com.panzhihua.common.model.dtos.shop.PageComOrderRefundDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerRefundOrderVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopOrderCountVO; |
| | | import com.panzhihua.common.utlis.OrderNoUtils; |
| | | import com.panzhihua.common.utlis.WxPayUtils; |
| | | import com.panzhihua.common.utlis.wx.WXPayUtil; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @ClassName: ComShopFlowerRefundOrderServiceImpl |
| | |
| | | this.baseMapper.updateById(comShopFlowerRefundOrderDO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | String[] statusStr = {"clz","tkcg","tksb","yqx","tkz"}; |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountGroupStatus(storeId); |
| | | Map<Integer, Integer> collect = comShopOrderCountVOS.stream().collect(Collectors.toMap(ComShopOrderCountVO::getStatus, ComShopOrderCountVO::getAmount)); |
| | | Map<String,Integer> retMap = new HashMap<>(); |
| | | int amountTotal = 0; |
| | | for (int i = 0; i < statusStr.length; i++) { |
| | | if (collect.containsKey(i)) { |
| | | Integer amount = collect.get(i); |
| | | amountTotal = amountTotal + amount; |
| | | retMap.put(statusStr[i],amount); |
| | | }else { |
| | | retMap.put(statusStr[i],0); |
| | | } |
| | | } |
| | | retMap.put("zdd",amountTotal); |
| | | return R.ok(retMap); |
| | | } |
| | | } |
| | |
| | | <if test='comShopFlowerGoodsDTO.categoriesId != null '>AND cgs.goods_category_id = #{comShopFlowerGoodsDTO.categoriesId}</if> |
| | | order by sale desc,create_at desc |
| | | </select> |
| | | <select id="selectCountSaleByStoreId" resultType="java.lang.Integer"> |
| | | select count(1) from com_shop_flower_goods where store_id = #{storeId} and `status` = 1 and delete_status = 1 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | <select id="selectCountByDeliveryType" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderCountVO"> |
| | | SELECT count(1) amount , `status` FROM com_shop_flower_order WHERE delivery_type = #{deliveryType} GROUP BY `status` |
| | | SELECT count(1) amount , `status` FROM com_shop_flower_order WHERE delivery_type = #{deliveryType} and store_id = #{storeId} GROUP BY `status` |
| | | </select> |
| | | <select id="selectCountByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> |
| | | |
| | | SELECT count(1) as count,'dayCount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | <if test="deliveryType != null"> |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | union all |
| | | SELECT count(1) as count,'monthCount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | <if test="deliveryType != null"> |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | union all |
| | | SELECT count(1) as count,'yearCount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | <if test="deliveryType != null"> |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | union all |
| | | SELECT count(1) as count,'allCount' as count_name FROM com_shop_flower_order WHERE 1=1 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | <if test="deliveryType != null"> |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | </select> |
| | | <select id="selectSumAmountByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> |
| | | SELECT IFNULL(sum(pay_amount),0) as count,'dayAmount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) and `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) as count,'monthAmount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') and `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) as count,'yearAmount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) and `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) as count,'allAmount' as count_name FROM com_shop_flower_order WHERE `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | refund_time, handle_result, remark |
| | | </sql> |
| | | <select id="pageRefundOrder" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerRefundOrderVO"> |
| | | select * from com_shop_flower_refund_order where 1=1 |
| | | select ro.* from com_shop_flower_refund_order ro left join com_convenient_merchants cm on ro.store_id = cm.id where 1=1 |
| | | <if test="pageComOrderRefundDTO.status != null"> |
| | | and status = #{pageComOrderRefundDTO.status} |
| | | and ro.status = #{pageComOrderRefundDTO.status} |
| | | </if> |
| | | <if test="pageComOrderRefundDTO.storeId != null"> |
| | | and store_id = #{pageComOrderRefundDTO.storeId} |
| | | and ro.store_id = #{pageComOrderRefundDTO.storeId} |
| | | </if> |
| | | <if test="pageComOrderRefundDTO.userId != null"> |
| | | and user_id = #{pageComOrderRefundDTO.userId} |
| | | and ro.user_id = #{pageComOrderRefundDTO.userId} |
| | | </if> |
| | | <if test="pageComOrderRefundDTO.backstageUserId != null"> |
| | | and cm.user_id = #{pageComOrderRefundDTO.backstageUserId} |
| | | </if> |
| | | </select> |
| | | <select id="selectCountByStoreId" resultType="java.lang.Integer"> |
| | | select count(1) from com_shop_flower_refund_order where 1=1 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectCountGroupStatus" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderCountVO"> |
| | | SELECT count(1) amount , `status` FROM `com_shop_flower_refund_order` WHERE 1=1 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | GROUP BY `status` |
| | | </select> |
| | | </mapper> |