Merge branch 'local_20221104' into huacheng_test
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
# springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
| | |
| | | import com.panzhihua.applets.weixin.CheckService; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientServiceCategoryDTO; |
| | | import com.panzhihua.common.model.dtos.shop.*; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointOrderVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientServiceCategoryVO; |
| | | import com.panzhihua.common.model.vos.shop.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | |
| | | public R shopGoodsDetail(@RequestParam("goodsId") Long goodsId) { |
| | | return communityService.shopFlowerGoodsDetail(goodsId); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除商品") |
| | | @DeleteMapping("/goods/delete") |
| | | public R deleteShopGoods(@RequestParam("goodsId") Long goodsId) { |
| | | return communityService.deleteFlowerShopGoods(goodsId); |
| | | } |
| | | |
| | | @ApiOperation(value = "商品上下架") |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "商品Id"), |
| | | @ApiImplicitParam(name = "status", value = "1.上架 2.下架 ")}) |
| | |
| | | public R changeStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) { |
| | | return communityService.changeFlowerStatus(id, status); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑商品") |
| | | @PostMapping("/goods/edit/{id}") |
| | | public R editShopGoods(@PathVariable("id") Long id, |
| | | @RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) { |
| | | return communityService.editFlowerShopGoods(id, addShopGoodsVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增商品") |
| | | @PostMapping("/goods/save") |
| | | public R saveShopGoods(@RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) { |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "删除用户收货地址列表") |
| | | @PostMapping("shopDelUserAddress") |
| | | @DeleteMapping("shopDelUserAddress") |
| | | @ApiImplicitParam(name = "addressId", value = "收货地址id", required = true) |
| | | public R shopDelUserAddress(@RequestParam("addressId") Long addressId) { |
| | | return communityService.shopFlowerDelUserAddress(addressId); |
| | |
| | | return communityService.orderCreateFlower(orderCreateDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询订单列表", response = ComShopOrderPageVO.class) |
| | | @ApiOperation(value = "分页查询订单列表", response = ComShopFlowerOrderPageVO.class) |
| | | @PostMapping("pageOrderList") |
| | | public R pageOrderList(@RequestBody PageComFlowerOrderListDTO comOrderListDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | return communityService.pageOrderListFlower(comOrderListDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询订单详情", response = ComShopOrderPageVO.class) |
| | | @PostMapping("orderDetail") |
| | | @ApiOperation(value = "查询订单详情", response = ComShopFlowerOrderPageVO.class) |
| | | @GetMapping("orderDetail") |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", required = true) |
| | | public R orderDetail(@RequestParam("orderId") Long orderId) { |
| | | return communityService.orderDetailFlower(orderId); |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "删除订单") |
| | | @PostMapping("orderDelete") |
| | | @DeleteMapping("orderDelete") |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", required = true) |
| | | public R orderDelete(@RequestParam("orderId") Long orderId) { |
| | | return communityService.orderDelete(orderId); |
| | | return communityService.orderDeleteFlower(orderId); |
| | | } |
| | | |
| | | @ApiOperation(value = "订单确认收货") |
| | |
| | | public R saveEvaluate(@RequestBody ComShopFlowerEvaluateDTO comShopFlowerEvaluateDTO) { |
| | | String evaluateContent = comShopFlowerEvaluateDTO.getEvaluateContent(); |
| | | if (StrUtil.isNotBlank(evaluateContent)) { |
| | | String result = checkService.checkMessageBy(evaluateContent,this.getLoginUserInfo().getOpenid(),this.getAppId()); |
| | | String result = checkService.checkMessageBy(evaluateContent, this.getLoginUserInfo().getOpenid(), this.getAppId()); |
| | | if (StrUtil.isNotBlank(result)) { |
| | | return R.fail(501, "填写内容存在 " + result + " 违规信息"); |
| | | } |
| | | } |
| | | comShopFlowerEvaluateDTO.setUserId(this.getUserId()); |
| | | return communityService.saveEvaluate(comShopFlowerEvaluateDTO); |
| | | } |
| | | |
| | |
| | | * @param pageComFlowerOrderListDTO |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "未配送-开始配送-订单列表", response = ComShopFlowerOrderPageVO.class) |
| | | @ApiOperation(value = "未配送-开始配送-订单列表", response = ConvenientElevatingPointOrderVO.class) |
| | | @PostMapping("pageNoDeliveryOrderList") |
| | | public R pageNoDeliveryOrderList(@RequestBody PageComFlowerOrderListDTO pageComFlowerOrderListDTO) { |
| | | return communityService.pageNoDeliveryOrderList(pageComFlowerOrderListDTO); |
| | |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "查询我的店铺各类统计数据") |
| | | @GetMapping("/selectCountByStoreId") |
| | | public R selectCountByStoreId(Long storeId){ |
| | | return communityService.selectCountByStoreId(storeId); |
| | | public R selectCountByUserId(Long storeId) { |
| | | return communityService.selectCountByUserId(storeId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 创建退款订单 |
| | | * |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("createRefundOrder") |
| | | @ApiOperation(value = "创建退款订单") |
| | | public R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){ |
| | | public R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO) { |
| | | comShopFlowerRefundOrderDTO.setUserId(this.getUserId()); |
| | | return communityService.createRefundOrder(comShopFlowerRefundOrderDTO); |
| | | } |
| | | |
| | | /** |
| | | * 用户 分页查询退款订单 |
| | | * |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("pageRefundOrder") |
| | | @ApiOperation(value = "退款订单分页查询 用户",response = ComShopFlowerRefundOrderVO.class) |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO){ |
| | | pageComOrderRefundDTO.setUserId(this.getUserId()); |
| | | @ApiOperation(value = "退款订单分页查询 用户", response = ComShopFlowerRefundOrderVO.class) |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO) { |
| | | if (null == pageComOrderRefundDTO.getStoreId()){ |
| | | pageComOrderRefundDTO.setUserId(this.getUserId()); |
| | | } |
| | | return communityService.pageRefundOrder(pageComOrderRefundDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改退款订单 |
| | | * |
| | | * @param comShopFlowerRefundOrderDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("updateRefundOrder") |
| | | @ApiOperation(value = "修改退款订单") |
| | | public R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO){ |
| | | public R updateRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO) { |
| | | return communityService.updateRefundOrder(comShopFlowerRefundOrderDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("selectCountGroupStatus") |
| | | @ApiOperation(value = "商家后台-退款申请统计") |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | public R selectCountGroupStatus(Long storeId) { |
| | | return communityService.selectCountGroupStatus(storeId); |
| | | } |
| | | |
| | | @ApiOperation(value = "商品分类") |
| | | @GetMapping("/goodsCategory/getAllGoodsCategories") |
| | | public R getAllGoodsCategories() { |
| | | return communityService.getAllGoodsCategories(); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询便民服务分类", response = ConvenientServiceCategoryVO.class) |
| | | @PostMapping("/service-category/page") |
| | | public R pageServiceCategory(@RequestBody PageConvenientServiceCategoryDTO pageConvenientServiceCategoryDTO) { |
| | | pageConvenientServiceCategoryDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageServiceCategory(pageConvenientServiceCategoryDTO); |
| | | } |
| | | |
| | | /** |
| | | * 新增商品浏览量 |
| | | * |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | @GetMapping("incrGoodsView") |
| | | @ApiOperation(value = "新增商品浏览量") |
| | | public R incrGoodsView(@RequestParam("goodsId") Long goodsId) { |
| | | return communityService.incrGoodsView(goodsId); |
| | | } |
| | | |
| | | @ApiOperation(value = "增加商家咨询量") |
| | | @GetMapping("/merchant/incr-consult") |
| | | public R incrMerchantConsult(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.consultMerchant(merchantId); |
| | | } |
| | | |
| | | @ApiOperation(value = "增加商家浏览量") |
| | | @GetMapping("/merchant/incr-view") |
| | | public R incrMerchantView(@RequestParam("merchantId") Long merchantId) { |
| | | return communityService.incrMerchantView(merchantId); |
| | | } |
| | | |
| | | @ApiOperation(value = "出入账分页", response = ComShopFlowerOrderPayVO.class) |
| | | @PostMapping("pageOrderPay") |
| | | public R pageOrderPay(@RequestBody PageComShopFlowerOrderPayDTO pageComShopFlowerOrderPayDTO) { |
| | | return communityService.pageOrderPay(pageComShopFlowerOrderPayDTO); |
| | | } |
| | | |
| | | /** |
| | | * 获取商家的营业额和可结算金额 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取商家的营业额和可结算金额") |
| | | @GetMapping("getQuota") |
| | | public R getQuota(@RequestParam("storeId") Long storeId){ |
| | | return communityService.getQuota(storeId); |
| | | } |
| | | |
| | | /** |
| | | * 取消退款 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "取消退款") |
| | | @GetMapping("refundOrderCancel") |
| | | public R refundOrderCancel(@RequestParam("id") Long id){ |
| | | return communityService.refundOrderCancel(id); |
| | | } |
| | | |
| | | /** |
| | | * 退款订单详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "退款订单详情",response = ComShopFlowerRefundOrderVO.class) |
| | | @GetMapping("refundOrderDetail") |
| | | public R refundOrderDetail(Long id){ |
| | | return communityService.refundOrderDetail(id); |
| | | } |
| | | |
| | | /** |
| | | * 清点商品 确认送达详情 |
| | | * @param pageComFlowerOrderListDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("pageOrderByDeliveryNo") |
| | | @ApiOperation(value = "清点商品 确认送达详情",response = ComShopFlowerOrderDeliveryNoListVO.class) |
| | | public R pageOrderByDeliveryNo(@RequestBody PageComFlowerOrderListDTO pageComFlowerOrderListDTO){ |
| | | return communityService.pageOrderByDeliveryNo(pageComFlowerOrderListDTO); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("服务范围") |
| | | private Integer serviceRange; |
| | | |
| | | @ApiModelProperty("微信手机号") |
| | | private String mobilePhone; |
| | | |
| | | @ApiModelProperty("详细地址") |
| | | private String detailedAddress; |
| | | |
| | | public String getPeriod() { |
| | | return period.name(); |
| | | } |
| | |
| | | /** |
| | | * 自提点id |
| | | */ |
| | | @ApiModelProperty(value = "自提点id", required = true) |
| | | @ApiModelProperty(value = "自提点id") |
| | | private Long pointId; |
| | | |
| | | /** |
| | | * 自提点id |
| | | */ |
| | | @ApiModelProperty(value = "自提点名称", required = true) |
| | | @ApiModelProperty(value = "自提点名称") |
| | | private String pointName; |
| | | |
| | | /** |
| | | * 配送订单数量 |
| | | */ |
| | | @ApiModelProperty(value = "配送订单数量", required = true) |
| | | @ApiModelProperty(value = "配送订单数量") |
| | | private Integer deliveryOrderNum; |
| | | |
| | | /** |
| | | * 配送商品数量 |
| | | */ |
| | | @ApiModelProperty(value = "配送商品数量", required = true) |
| | | @ApiModelProperty(value = "配送商品数量") |
| | | private Integer deliveryGoodsNum; |
| | | |
| | | /** |
| | | * 价值 |
| | | */ |
| | | @ApiModelProperty(value = "价值", required = true) |
| | | @ApiModelProperty(value = "价值") |
| | | private BigDecimal deliveryAmount; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "订单id集合", required = true) |
| | | @ApiModelProperty(value = "订单id集合") |
| | | private List<Long> orderIds; |
| | | |
| | | @ApiModelProperty(value = "商品id") |
| | | private Long storeId; |
| | | } |
| | |
| | | package com.panzhihua.common.model.dtos.shop; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | |
| | | @ApiModelProperty(value = "购物车记录id集合(当提交类型为2时,此字段必填)") |
| | | private List<Long> cartIds; |
| | | /** |
| | | * 配送方式(1.自提 2.快递) |
| | | */ |
| | | @ApiModelProperty(value = "配送方式(1.自提 2.快递)") |
| | | private Integer deliveryType; |
| | | |
| | | /** |
| | | * 提交类型(1.商品详情提交 2.购物车提交) |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @auther lyq |
| | | * @create 2021-04-14 15:02:14 |
| | |
| | | |
| | | @ApiModelProperty(value = "购买数量") |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty(value = "价格") |
| | | private BigDecimal price; |
| | | } |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long storeId; |
| | | |
| | | @ApiModelProperty(value = "配送单id") |
| | | private Long deliveryId; |
| | | |
| | | @ApiModelProperty(value = "配送方式(1.自提 2.快递)") |
| | | private Integer deliveryType; |
| | | |
| | | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | } |
| | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "订单状态(1.处理中 2.退款成功 3.退款失败 4.已取消 5.退款中)") |
| | | @ApiModelProperty(value = "订单状态(9.处理中 10.退款成功 11.退款失败 12.已取消 13.退款中)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "店铺id") |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.shop; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @auther yh |
| | | * @create 2022-11-08 17:25:45 |
| | | * @describe 分页查询支付记录 |
| | | */ |
| | | @Data |
| | | @ApiModel("支付退款记录") |
| | | public class PageComShopFlowerOrderPayDTO { |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | private Long pageNum = 1L; |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize = 10L; |
| | | |
| | | @ApiModelProperty(value = "类型:1.入账 2 出账") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long storeId; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("配送方式(1.自提 2.快递)") |
| | | private Integer deliveryType; |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyWord; |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructAreaVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructHouseVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopUserAddressVO; |
| | | import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO; |
| | | import com.panzhihua.common.model.vos.user.RoleVO; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | |
| | | |
| | | @ApiModelProperty("商家后台账号id") |
| | | private Long backstageUserId; |
| | | |
| | | @ApiModelProperty("是否为自提点") |
| | | private Boolean isPoint; |
| | | |
| | | @ApiModelProperty("默认地址") |
| | | private ComShopUserAddressVO comShopUserAddressVO; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.convenient; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @ClassName: ConvenientElevatingPointVO |
| | | * @Author: yh |
| | | * @Date: 2022/11/8 9:54 |
| | | * @Description: 便民服自提点 |
| | | */ |
| | | @Data |
| | | @ApiModel("开始配送/未配送详情") |
| | | public class ConvenientElevatingPointOrderVO { |
| | | |
| | | @ApiModelProperty("自提点信息") |
| | | private ConvenientElevatingPointVO convenientElevatingPointVO; |
| | | @ApiModelProperty("订单分页") |
| | | private Object iPage; |
| | | } |
| | |
| | | @ApiModelProperty("店铺销售额") |
| | | private BigDecimal saleVolume; |
| | | |
| | | @ApiModelProperty("详细地址") |
| | | private String detailedAddress; |
| | | |
| | | @ApiModelProperty("商家评分") |
| | | private BigDecimal score; |
| | | |
| | | public void setPeriod(String period) { |
| | | this.period = MerchantBusinessPeriod.valueOf(period); |
| | | } |
| | |
| | | * 配送方式(1.商家配送 2.快递物流) |
| | | */ |
| | | @ApiModelProperty(value = "配送方式(1.自提 2.快递)") |
| | | private Integer deliveryType; |
| | | private String deliveryType; |
| | | |
| | | @ApiModelProperty("商品规格") |
| | | @Valid |
| | |
| | | */ |
| | | @ApiModelProperty("评价图片") |
| | | private String evaluatePic; |
| | | |
| | | /** |
| | | * 用户昵称 |
| | | */ |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
| | | /** |
| | | * 用户头像 |
| | | */ |
| | | @ApiModelProperty("用户头像") |
| | | private String imageUrl; |
| | | |
| | | } |
| | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | private BigDecimal originalPrice; |
| | | |
| | | /** |
| | | * 商品现价 |
| | | * 包邮价 |
| | | */ |
| | | @ApiModelProperty("商品现价") |
| | | private BigDecimal price; |
| | | @ApiModelProperty("包邮价") |
| | | private BigDecimal freeShippingPrice; |
| | | /** |
| | | * 拼单价 |
| | | */ |
| | | @ApiModelProperty("拼单价") |
| | | private BigDecimal collatePrice; |
| | | |
| | | /** |
| | | * 商品单位 |
| | |
| | | * 配送方式(1.商家配送 2.快递物流) |
| | | */ |
| | | @ApiModelProperty("配送方式(1.商家配送 2.快递物流)") |
| | | private Integer deliveryType; |
| | | private String deliveryType; |
| | | |
| | | /** |
| | | * 商品规格列表 |
| | |
| | | private Integer orderNum; |
| | | |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewNum; |
| | | |
| | | /** |
| | | * 商品规格列表 |
| | | */ |
| | | @ApiModelProperty("评价列表,最新三条") |
| | | private List<ComShopFlowerEvaluateVO> shopFlowerEvaluateVOList; |
| | | |
| | | @ApiModelProperty("商品分类") |
| | | @NotEmpty(groups = {AddGroup.class}, message = "商品分类不能为空") |
| | | private List<Long> categoryIds; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.shop; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("商家配送单订单VO") |
| | | public class ComShopFlowerOrderDeliveryNoListVO { |
| | | |
| | | @ApiModelProperty(value = "配送单VO") |
| | | private ComShopFlowerOrderDeliveryVO comShopFlowerOrderDeliveryVO; |
| | | |
| | | @ApiModelProperty(value = "分页数据") |
| | | private Object page; |
| | | } |
| | |
| | | * 自提点名称 |
| | | */ |
| | | @ApiModelProperty(value = "自提点名称") |
| | | private Long pointName; |
| | | private String pointName; |
| | | |
| | | /** |
| | | * 配送订单数量 |
| | |
| | | @ApiModelProperty(value = "配送单号") |
| | | private String deliveryNo; |
| | | |
| | | @ApiModelProperty(value = "退款时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date refundTime; |
| | | |
| | | @ApiModelProperty(value = "退款金额") |
| | | private BigDecimal refundAmount; |
| | | |
| | | @ApiModelProperty(value = "规格名称") |
| | | private String goodsAttrName; |
| | | |
| | | @ApiModelProperty(value = "购买数量") |
| | | private Integer amount; |
| | | |
| | | @ApiModelProperty(value = "商品规格价格") |
| | | private BigDecimal goodsAttrPrice; |
| | | |
| | | @ApiModelProperty(value = "商品规格图") |
| | | private String goodsAttrPic; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.shop; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName: ComShopFlowerOrderPay |
| | | * @Author: yh |
| | | * @Date: 2022/11/9 16:46 |
| | | * @Description: 花城订单支付记录表 |
| | | */ |
| | | @Data |
| | | @ApiModel("花城订单支付记录") |
| | | public class ComShopFlowerOrderPayVO { |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @ApiModelProperty(value = "主键id") |
| | | private Long id; |
| | | |
| | | /** |
| | | * 订单号 |
| | | */ |
| | | @ApiModelProperty(value = "订单号") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 支付单号 |
| | | */ |
| | | @ApiModelProperty(value = "支付单号") |
| | | private String payNo; |
| | | |
| | | /** |
| | | * 微信交易号 |
| | | */ |
| | | @ApiModelProperty(value = "微信交易号") |
| | | private String wxTradeNo; |
| | | |
| | | /** |
| | | * 支付状态(1.未支付 2.已支付) |
| | | */ |
| | | @ApiModelProperty(value = "支付状态(1.未支付 2.已支付)") |
| | | private Integer payStatus; |
| | | |
| | | /** |
| | | * 订单金额 |
| | | */ |
| | | @ApiModelProperty(value = "订单金额") |
| | | private BigDecimal orderAmount; |
| | | |
| | | /** |
| | | * 支付金额 |
| | | */ |
| | | @ApiModelProperty(value = "支付金额") |
| | | private BigDecimal payAmount; |
| | | |
| | | /** |
| | | * 支付时间 |
| | | */ |
| | | @ApiModelProperty(value = "支付时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date payTime; |
| | | |
| | | /** |
| | | * 商家id |
| | | */ |
| | | @ApiModelProperty(value = "商家id") |
| | | private Long storeId; |
| | | /** |
| | | * 配送方式(1.自提 2.快递) |
| | | */ |
| | | @ApiModelProperty(value = "配送方式(1.自提 2.快递)") |
| | | private Integer deliveryType; |
| | | /** |
| | | * 原始订单id |
| | | */ |
| | | @ApiModelProperty(value = "原始订单id") |
| | | private Long orderId; |
| | | /** |
| | | * 退款订单号 |
| | | */ |
| | | @ApiModelProperty(value = "退款订单号") |
| | | private String refundOrderNo; |
| | | /** |
| | | * 退款状态(1.处理中 2.退款成功 3.退款失败 4.已取消 5.退款中) |
| | | */ |
| | | @ApiModelProperty(value = "退款状态(1.处理中 2.退款成功 3.退款失败 4.已取消 5.退款中)") |
| | | private Integer refundStatus; |
| | | /** |
| | | * 类型(1.支付 2.退款 3.取消) |
| | | */ |
| | | @ApiModelProperty(value = "类型(1.支付 2.退款 3.取消)") |
| | | private Integer payType; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.shop; |
| | | |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | |
| | | @ApiModelProperty(value = "收货人详细地址") |
| | | private String detailAddress; |
| | | @ApiModelProperty(value = "自提点id") |
| | | private Long pointId; |
| | | @ApiModelProperty(value = "自提点信息") |
| | | private ConvenientElevatingPointVO convenientElevatingPointVO; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.model.vos.shop; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName: ComShopFlowerRefundOrderVO |
| | |
| | | private String refundOrderNo; |
| | | |
| | | /** |
| | | * 订单状态(1.处理中 2.退款成功 3.退款失败 4.已取消 5.退款中) |
| | | * 订单状态(9.处理中 10.退款成功 11.退款失败 12.已取消 13.退款中) |
| | | */ |
| | | @ApiModelProperty("订单状态(1.处理中 2.退款成功 3.退款失败 4.已取消 5.退款中)") |
| | | @ApiModelProperty("订单状态(9.处理中 10.退款成功 11.退款失败 12.已取消 13.退款中)") |
| | | private Integer status; |
| | | |
| | | /** |
| | |
| | | * 申请时间 |
| | | */ |
| | | @ApiModelProperty("申请时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty("修改时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateAt; |
| | | |
| | | /** |
| | | * 处理时间 |
| | | */ |
| | | @ApiModelProperty("处理时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date handleTime; |
| | | |
| | | /** |
| | | * 退款时间 |
| | | */ |
| | | @ApiModelProperty("退款时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date refundTime; |
| | | |
| | | /** |
| | | * 取消时间 |
| | | */ |
| | | @ApiModelProperty("取消时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date cancelTime; |
| | | |
| | | /** |
| | | * 处理结果 |
| | |
| | | */ |
| | | @ApiModelProperty("商家备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "订单下店铺信息") |
| | | private ConvenientMerchantVO convenientMerchantVO; |
| | | |
| | | @ApiModelProperty(value = "订单下商品信息") |
| | | private List<ComShopFlowerOrderGoodsVO> orderGoodsVOList; |
| | | |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | @ApiModelProperty("商品名称") |
| | | private String goodsName; |
| | | } |
| | |
| | | @ApiModelProperty("微信交易单号") |
| | | private String wxTardeNo; |
| | | |
| | | @ApiModelProperty("订单状态(1.待付款 2.代发货 3.待收货 4.待评价 5.已完成 6.已取消)") |
| | | @ApiModelProperty(value = "订单状态(1.等待配送 2.配送中 3.待收货 4.待评价 5.已完成 6.已取消 7.已退款)") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("支付状态(1.未支付 2.已支付)") |
| | |
| | | * 订 |
| | | */ |
| | | @ApiModelProperty("订单数量") |
| | | private Integer count; |
| | | private Integer countNum; |
| | | |
| | | /** |
| | | * 统计名称 |
New file |
| | |
| | | package com.panzhihua.common.model.vos.shop; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @auther yh |
| | | * @create 2022-11-08 17:25:45 |
| | | * @describe 商家后台经营数据统计 |
| | | */ |
| | | @Data |
| | | @ApiModel("商家后台经营数据统计") |
| | | public class ComShopOrderStoreIdNumVO { |
| | | |
| | | |
| | | |
| | | /** |
| | | * 订 |
| | | */ |
| | | @ApiModelProperty("订单数量") |
| | | private BigDecimal countNum; |
| | | |
| | | /** |
| | | * 统计名称 |
| | | */ |
| | | @ApiModelProperty("统计名称") |
| | | private String countName; |
| | | } |
| | |
| | | * 收货地址id |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/shopFlower/shopDelUserAddress") |
| | | @DeleteMapping("/shopFlower/shopDelUserAddress") |
| | | R shopFlowerDelUserAddress(@RequestParam("addressId") Long addressId); |
| | | |
| | | /** |
| | |
| | | * @param orderId 订单id |
| | | * @return 订单详情 |
| | | */ |
| | | @PostMapping("/shopFlower/orderDetail") |
| | | @GetMapping("/shopFlower/orderDetail") |
| | | R orderDetailFlower(@RequestParam("orderId") Long orderId); |
| | | |
| | | /** |
| | |
| | | * @param orderId 订单id |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("/shopFlower/orderDelete") |
| | | @DeleteMapping("/shopFlower/orderDelete") |
| | | R orderDeleteFlower(@RequestParam("orderId") Long orderId); |
| | | |
| | | /** |
| | |
| | | * @param pageComShopFlowerEvaluateDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/pageEvaluate") |
| | | @PostMapping("/shopFlower/pageEvaluate") |
| | | R pageEvaluate(@RequestBody PageComShopFlowerEvaluateDTO pageComShopFlowerEvaluateDTO); |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 统计查询订单数量 |
| | | * @param deliveryType |
| | | * @param storeId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/selectCountByDeliveryType") |
| | | R selectCountByDeliveryType(@RequestParam("deliveryType") Integer deliveryType,@RequestParam("storeId") Long storeId); |
| | | R selectCountByDeliveryType(@RequestParam("deliveryType") Integer deliveryType,@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * @param storeId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/selectCountByStoreId") |
| | | R selectCountByStoreId(Long storeId); |
| | | @GetMapping("/shopFlower/selectCountByUserId") |
| | | R selectCountByUserId(@RequestParam("userId") Long userId); |
| | | |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/selectCountGroupStatus") |
| | | R selectCountGroupStatus(Long storeId); |
| | | R selectCountGroupStatus(@RequestParam("storeId") Long storeId); |
| | | |
| | | /** |
| | | * 新增商品浏览量 |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/incrGoodsView") |
| | | R incrGoodsView(@RequestParam("goodsId") Long goodsId); |
| | | |
| | | /** |
| | | * 出入账分页 |
| | | * @param pageComShopFlowerOrderPayDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/shopFlower/pageOrderPay") |
| | | R pageOrderPay(@RequestBody PageComShopFlowerOrderPayDTO pageComShopFlowerOrderPayDTO); |
| | | |
| | | /** |
| | | * 获取商家的营业额和可结算金额 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/getQuota") |
| | | R getQuota(@RequestParam("storeId") Long storeId); |
| | | |
| | | /** |
| | | * 取消退款 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/refundOrderCancel") |
| | | R refundOrderCancel(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 退款订单详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/refundOrderDetail") |
| | | R refundOrderDetail(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 清点商品 确认送达详情 |
| | | * @param pageComFlowerOrderListDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/shopFlower/pageOrderByDeliveryNo") |
| | | R pageOrderByDeliveryNo(@RequestBody PageComFlowerOrderListDTO pageComFlowerOrderListDTO); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | Date date= getLastMonthFirst(); |
| | | Date after = getLastMonthEnd(); |
| | | System.out.println(date); |
| | | System.out.println(after); |
| | | System.out.println(getMonthTwentyDay()); |
| | | // List<String> beforeDays = getBeforeDays(15); |
| | | // System.out.println(beforeDays); |
| | | List<String> yearMonths = getYearMonths(); |
| | | System.out.println(yearMonths); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | public static List<String> getBeforeDays(int before) { |
| | | List<String> dates = new ArrayList<>(); |
| | | for (int i = before; i >= 0; i--) { |
| | | dates.add(getBeforeDay(i)); |
| | | } |
| | | return dates; |
| | | } |
| | | |
| | | /** |
| | | * 获取当年所有月份 |
| | | * |
| | | * @return |
| | | */ |
| | | public static List<String> getYearMonths() { |
| | | Calendar instance = Calendar.getInstance(); |
| | | int year = instance.get(Calendar.YEAR); |
| | | List<String> months = new ArrayList<>(); |
| | | for (int i = 1; i <= 12; i++) { |
| | | String result = String.valueOf(year); |
| | | if (i < 10) { |
| | | result = result + "-0" +i; |
| | | } else { |
| | | result = result + "-"+i; |
| | | } |
| | | months.add(result); |
| | | } |
| | | return months; |
| | | } |
| | | } |
| | |
| | | + getRandomNumber(); |
| | | } |
| | | |
| | | public static String NextOrderNoFlower(Long userId) { |
| | | DateFormat df = new SimpleDateFormat("MMddHHmmss"); |
| | | return df.format(new Date()) + padRight(String.valueOf(userId), 3, '0') |
| | | + getRandomNumber(); |
| | | } |
| | | |
| | | public static String nextDeliveryNo() { |
| | | if (sn == 999) |
| | | sn = 0; |
| | |
| | | @ApiOperation(value = "统计查询订单数量") |
| | | @GetMapping("/order/selectCountByDeliveryType") |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "deliveryType", value = "1.自提 2.快递"), |
| | | @ApiImplicitParam(name = "storeId", value = "商店id")}) |
| | | public R selectCountByDeliveryType(Integer deliveryType,Long storeId){ |
| | | return communityService.selectCountByDeliveryType(deliveryType,storeId); |
| | | @ApiImplicitParam(name = "userId", value = "商店用户id")}) |
| | | public R selectCountByDeliveryType(Integer deliveryType,Long userId){ |
| | | return communityService.selectCountByDeliveryType(deliveryType,userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "商家查询 订单_分页列表", response = ComShopOrderSearchVO.class) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * 商家后台 分页查询 |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("pageRefundOrder") |
| | | @ApiOperation(value = "分页查询",response = ComShopFlowerRefundOrderVO.class) |
| | | @ApiOperation(value = "商家后台-退款订单 分页查询",response = ComShopFlowerRefundOrderVO.class) |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO){ |
| | | pageComOrderRefundDTO.setBackstageUserId(this.getUserId()); |
| | | return communityService.pageRefundOrder(pageComOrderRefundDTO); |
| | | } |
| | | |
| | | /** |
| | | * 商家后台 分页查询 |
| | | * @param refundId |
| | | * @return |
| | | */ |
| | | @PostMapping("refundOrderDetail") |
| | | @ApiOperation(value = "商家后台-退款订单 详情",response = ComShopFlowerRefundOrderVO.class) |
| | | public R refundOrderDetail(@RequestParam("refundId") Long refundId){ |
| | | return communityService.refundOrderDetail(refundId); |
| | | } |
| | | |
| | | /** |
| | | * 商家后台-退款申请统计 |
| | | * @param storeId |
| | | * @return |
| | |
| | | |
| | | @Resource |
| | | private ComShopFlowerGoodsService comShopFlowerGoodsService; |
| | | // @Resource |
| | | // private ComShopOperLogService comShopOperLogService; |
| | | @Resource |
| | | private ComShopFlowerOrderService comShopFlowerOrderService; |
| | | // @Resource |
| | | // private ComShopCartService comShopCartService; |
| | | @Resource |
| | | private ComShopFlowerUserAddressService comShopUserAddressService; |
| | | |
| | | @Resource |
| | | private ConvenientMerchantService convenientMerchantService; |
| | | @Resource |
| | |
| | | private ComShopFlowerOrderDeliveryService comShopFlowerOrderDeliveryService; |
| | | @Resource |
| | | private ComShopFlowerRefundOrderService comShopFlowerRefundOrderService; |
| | | @Resource |
| | | private ComShopFlowerOrderPayService comShopFlowerOrderPayService; |
| | | |
| | | |
| | | /** |
| | |
| | | * @param addressId 收货地址id |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("shopDelUserAddress") |
| | | @DeleteMapping("shopDelUserAddress") |
| | | public R shopFlowerDelUserAddress(@RequestParam("addressId") Long addressId) { |
| | | return comShopUserAddressService.shopDelUserAddress(addressId); |
| | | } |
| | |
| | | * @param orderId 订单id |
| | | * @return 订单详情 |
| | | */ |
| | | @PostMapping("orderDetail") |
| | | @GetMapping("orderDetail") |
| | | public R orderDetailFlower(@RequestParam("orderId") Long orderId) { |
| | | return comShopFlowerOrderService.orderDetail(orderId); |
| | | } |
| | |
| | | * @param orderId 订单id |
| | | * @return 删除结果 |
| | | */ |
| | | @PostMapping("orderDelete") |
| | | @DeleteMapping("orderDelete") |
| | | public R orderDeleteFlower(@RequestParam("orderId") Long orderId) { |
| | | return comShopFlowerOrderService.orderDelete(orderId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectCountByDeliveryType") |
| | | public R selectCountByDeliveryType(@RequestParam("deliveryType") Integer deliveryType,@RequestParam("storeId") Long storeId){ |
| | | return comShopFlowerOrderService.selectCountByDeliveryType(deliveryType,storeId); |
| | | public R selectCountByDeliveryType(@RequestParam("deliveryType") Integer deliveryType,@RequestParam("userId") Long userId){ |
| | | return comShopFlowerOrderService.selectCountByDeliveryType(deliveryType,userId); |
| | | } |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * @param storeId |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectCountByStoreId") |
| | | public R selectCountByStoreId(Long storeId){ |
| | | return comShopFlowerOrderService.selectCountByStoreId(storeId); |
| | | @GetMapping("/selectCountByUserId") |
| | | public R selectCountByUserId(@RequestParam("userId") Long userId){ |
| | | return comShopFlowerOrderService.selectCountByUserId(userId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("selectCountGroupStatus") |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | public R selectCountGroupStatus(@RequestParam("storeId") Long storeId){ |
| | | return comShopFlowerRefundOrderService.selectCountGroupStatus(storeId); |
| | | } |
| | | |
| | | /** |
| | | * 新增商品浏览量 |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | @GetMapping("incrGoodsView") |
| | | public R incrGoodsView(@RequestParam("goodsId") Long goodsId){ |
| | | return comShopFlowerGoodsService.incrGoodsView(goodsId); |
| | | } |
| | | |
| | | /** |
| | | * 出入账分页 |
| | | * @param pageComShopFlowerOrderPayDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("pageOrderPay") |
| | | public R pageOrderPay(@RequestBody PageComShopFlowerOrderPayDTO pageComShopFlowerOrderPayDTO){ |
| | | return comShopFlowerOrderPayService.pageOrderPay(pageComShopFlowerOrderPayDTO); |
| | | } |
| | | |
| | | /** |
| | | * 获取商家的营业额和可结算金额 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @GetMapping("getQuota") |
| | | public R getQuota(@RequestParam("storeId") Long storeId){ |
| | | return comShopFlowerOrderService.getQuota(storeId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 统计用户订单数量 |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @return 统计结果 |
| | | * 商家后台经营数据统计-上 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | /* @PostMapping("orderStatistics") |
| | | public R orderStatistics(@RequestParam("userId") Long userId) { |
| | | return comShopOrderService.orderStatistics(userId); |
| | | }*/ |
| | | |
| | | |
| | | /* |
| | | |
| | | |
| | | *//** |
| | | * 根据店铺id查询店铺详情 |
| | | * |
| | | * @param comShopStoreDTO |
| | | * 请求参数 |
| | | * @return 店铺详情 |
| | | *//* |
| | | @PostMapping("shopStoreDetail") |
| | | public R shopStoreDetail(@RequestBody PageComShopStoreDTO comShopStoreDTO) { |
| | | return comShopStoreService.shopStoreDetail(comShopStoreDTO); |
| | | @GetMapping("selectSumOrderAndAmountByStoreId") |
| | | public R selectSumOrderAndAmountByStoreId(@RequestParam("storeId") Long storeId){ |
| | | return comShopFlowerOrderService.selectSumOrderAndAmountByStoreId(storeId); |
| | | } |
| | | |
| | | /** |
| | | * 统计时间区域的订单量 15天 30天 一年 |
| | | * @param storeId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @GetMapping("selectOrderLineChart") |
| | | public R selectOrderLineChart(@RequestParam("storeId") Long storeId,@RequestParam("type") Integer type){ |
| | | return comShopFlowerOrderService.selectOrderLineChart(storeId,type); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | *//** |
| | | * 商家资金的订单详情 |
| | | * |
| | | /** |
| | | * 取消退款 |
| | | * @param id |
| | | * @return |
| | | *//* |
| | | @GetMapping("capitalDetailByStore") |
| | | public R capitalDetailByStore(@RequestParam("id") Long id) { |
| | | return comShopOrderService.capitalDetailByStore(id); |
| | | */ |
| | | @GetMapping("refundOrderCancel") |
| | | public R refundOrderCancel(@RequestParam("id") Long id){ |
| | | return comShopFlowerRefundOrderService.orderCancel(id); |
| | | } |
| | | |
| | | |
| | | |
| | | *//** |
| | | * 订单导出信息 |
| | | * |
| | | * @param comShopOrderExportDTO |
| | | * 订单导出信息 |
| | | * @return 订单导出信息 |
| | | *//* |
| | | @PostMapping("/shopOrderExportData") |
| | | R shopOrderExportData(@RequestBody ComShopOrderExportDTO comShopOrderExportDTO) { |
| | | return comShopOrderService.shopOrderExportData(comShopOrderExportDTO); |
| | | } |
| | | |
| | | *//** |
| | | * 资金管理导出信息 |
| | | * |
| | | * @param comShopFundsExportDTO |
| | | * 资金管理导出信息 |
| | | * @return 资金管理导出信息 |
| | | *//* |
| | | @PostMapping("/shopOrderFundsExportData") |
| | | R shopOrderFundsExportData(@RequestBody ComShopFundsExportDTO comShopFundsExportDTO) { |
| | | return comShopOrderService.shopOrderFundsExportData(comShopFundsExportDTO); |
| | | } |
| | | |
| | | *//** |
| | | * 用户资金统计信息 |
| | | * |
| | | * @param userId |
| | | * 用户ID |
| | | * @return 统计信息 |
| | | *//* |
| | | @GetMapping("/getFundsStat") |
| | | R getFundsStat(@RequestParam("userId") Long userId) { |
| | | return comShopOrderService.getFundsStat(userId); |
| | | } |
| | | |
| | | *//** |
| | | * 店铺资金统计信息 |
| | | * |
| | | * @param pageComShopFundsSearchDTO |
| | | * 店铺资金 |
| | | * @return 店铺资金统计信息 |
| | | *//* |
| | | @PostMapping("/pageShopFunds") |
| | | R pageShopFunds(@RequestBody PageComShopFundsSearchDTO pageComShopFundsSearchDTO) { |
| | | return comShopOrderService.pageShopFunds(pageComShopFundsSearchDTO); |
| | | } |
| | | |
| | | *//** |
| | | * 微信支付订单回调 |
| | | * |
| | | * @param wxPayNotifyOrderDTO |
| | | * 订单支付回调参数 |
| | | *//* |
| | | @PostMapping("/wxOrderPayNotify") |
| | | public void wxOrderPayNotify(@RequestBody WxPayNotifyOrderDTO wxPayNotifyOrderDTO) { |
| | | comShopOrderService.wxOrderPayNotify(wxPayNotifyOrderDTO); |
| | | } |
| | | |
| | | *//** |
| | | * 点击去支付订单 |
| | | * |
| | | * @param orderPayDTO |
| | | * 请求参数 |
| | | * @return 支付对象 |
| | | *//* |
| | | @PostMapping("/wxPay") |
| | | public R wxPay(@RequestBody OrderPayDTO orderPayDTO) { |
| | | return comShopOrderService.wxPay(orderPayDTO); |
| | | } |
| | | |
| | | *//** |
| | | * 商城系统配置 |
| | | * |
| | | * @param comShopSysConfDTO |
| | | /** |
| | | * 退款订单详情 |
| | | * @param id |
| | | * @return |
| | | *//* |
| | | @PostMapping("/conf/edit") |
| | | R editShopSysConf(@RequestBody ComShopSysConfDTO comShopSysConfDTO) { |
| | | ComShopSysConfDO comShopSysConfDO = comShopSysConfService.getBaseMapper().selectById(comShopSysConfDTO.getId()); |
| | | switch (comShopSysConfDTO.getHidden()) { |
| | | case 0: |
| | | comShopSysConfDO.setVal("0"); |
| | | comShopSysConfDO.setEnabled("1"); |
| | | break; |
| | | case 1: |
| | | comShopSysConfDO.setVal("1"); |
| | | comShopSysConfDO.setEnabled("1"); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | int updated = comShopSysConfService.getBaseMapper().updateById(comShopSysConfDO); |
| | | if (updated == 1) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | */ |
| | | @GetMapping("refundOrderDetail") |
| | | public R refundOrderDetail(@RequestParam("id") Long id){ |
| | | return comShopFlowerRefundOrderService.refundOrderDetail(id); |
| | | } |
| | | |
| | | *//** |
| | | * 商城系统配置查询 |
| | | * |
| | | * @param pageComShopSysConfDTO |
| | | /** |
| | | * 清点商品 确认送达详情 |
| | | * @param pageComFlowerOrderListDTO |
| | | * @return |
| | | *//* |
| | | @PostMapping("/conf/get") |
| | | R pageShopSysConf(@RequestBody PageComShopSysConfDTO pageComShopSysConfDTO) { |
| | | List<ComShopSysConfDO> confList = |
| | | comShopSysConfService.getBaseMapper().selectList(new LambdaQueryWrapper<ComShopSysConfDO>() |
| | | .eq(ComShopSysConfDO::getName, "SHOP_HIDDEN").orderByDesc(ComShopSysConfDO::getCreate_at)); |
| | | ComShopSysConfVO comShopSysConfVO = new ComShopSysConfVO(); |
| | | if (confList != null && confList.size() > 0) { |
| | | ComShopSysConfDO firstConf = confList.get(0); |
| | | BeanUtils.copyProperties(firstConf, comShopSysConfVO); |
| | | return R.ok(comShopSysConfVO); |
| | | } |
| | | return R.ok(); |
| | | */ |
| | | @PostMapping("pageOrderByDeliveryNo") |
| | | public R pageOrderByDeliveryNo(@RequestBody PageComFlowerOrderListDTO pageComFlowerOrderListDTO){ |
| | | return comShopFlowerOrderService.pageOrderByDeliveryNo(pageComFlowerOrderListDTO); |
| | | } |
| | | |
| | | *//** |
| | | * check商家/店铺是否有效 |
| | | * @param userId |
| | | * @return |
| | | *//* |
| | | @GetMapping("/checkStoreIsValid") |
| | | public R checkStoreIsValid(@RequestParam("userId") Long userId) { |
| | | Boolean isShopValid = comShopStoreService.checkStoreIsValid(userId); |
| | | Boolean isConvenientValid = convenientMerchantService.checkStoreIsValid(userId); |
| | | Boolean isMcsValid = userService.checkUserIsValid(userId, 11); |
| | | return R.ok(isShopValid || isConvenientValid || isMcsValid); |
| | | }*/ |
| | | |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | ComShopFlowerEvaluateVO selectByOrderNo(@Param("orderNo") String orderNo); |
| | | |
| | | |
| | | /** |
| | | * 统计商家评分 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | BigDecimal statisticsScore(@Param("storeId") Long storeId); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerGoodsViewStatisticsDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientViewStatisticsDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ConvenientViewStatisticsDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商品浏览量统计DAO |
| | | * @author: hans |
| | | * @date: 2021/09/23 16:53 |
| | | */ |
| | | @Mapper |
| | | public interface ComShopFlowerGoodsViewStatisticsDAO extends BaseMapper<ComShopFlowerGoodsViewStatisticsDO> { |
| | | |
| | | /** |
| | | * 创建当天统计数据 |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | int createTodayStatistic(@Param("goodsId") Long goodsId); |
| | | |
| | | /** |
| | | * 增加当天浏览量 |
| | | * @param goodsId |
| | | * @param nowDate |
| | | * @return |
| | | */ |
| | | int incrViewNum(@Param("goodsId") Long goodsId, @Param("nowDate") String nowDate); |
| | | |
| | | /** |
| | | * 获取月浏览量 |
| | | * @param goodsId |
| | | * @param moth |
| | | * @return |
| | | */ |
| | | int selectMonthViewNum(@Param("goodsId") Long goodsId, @Param("moth") String moth); |
| | | |
| | | /** |
| | | * 获取当天浏览量 |
| | | * @param goodsId |
| | | * @param day |
| | | * @return |
| | | */ |
| | | int selectDayViewNum(@Param("goodsId") Long goodsId, @Param("day") String day); |
| | | |
| | | /** |
| | | * 获取商品总浏览量 |
| | | * @return |
| | | */ |
| | | List<ConvenientViewStatisticsVO> selectSumForViewNum(); |
| | | |
| | | /** |
| | | * 获取商品总浏览量 |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | int selectTotalViewNum(@Param("goodsId") Long goodsId); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | void updateOrderStatus(@Param("deliveryId") Long deliveryId, @Param("serviceTime") Date serviceTime, @Param("status") int status); |
| | | |
| | | IPage<ComShopFlowerOrderStoreListVO> pageOrderByStoreId(@Param("page") Page page,@Param("comOrderListDTO") PageComFlowerOrderListDTO comOrderListDTO); |
| | | IPage<ComShopFlowerOrderStoreListVO> pageOrderByStoreId(@Param("page") Page page, @Param("comOrderListDTO") PageComFlowerOrderListDTO comOrderListDTO); |
| | | |
| | | /** |
| | | * 根据类型统计订单数量 |
| | | * |
| | | * @param deliveryType |
| | | * @return |
| | | */ |
| | | List<ComShopOrderCountVO> selectCountByDeliveryType(@Param("deliveryType") Integer deliveryType,@Param("storeId") Long storeId); |
| | | List<ComShopOrderCountVO> selectCountByDeliveryType(@Param("deliveryType") Integer deliveryType, @Param("storeId") Long storeId); |
| | | |
| | | |
| | | List<ComShopOrderStoreIdCountVO> selectCountByStoreId(@Param("storeId") Long storeId,@Param("deliveryType") Integer deliveryType); |
| | | List<ComShopOrderStoreIdCountVO> selectCountByStoreId(@Param("storeId") Long storeId, @Param("deliveryType") Integer deliveryType); |
| | | |
| | | List<ComShopOrderStoreIdCountVO> selectSumAmountByStoreId(@Param("storeId") Long storeId); |
| | | |
| | | /** |
| | | * 获取商家总营业额 |
| | | * |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | BigDecimal selectTurnover(@Param("storeId") Long storeId); |
| | | |
| | | /** |
| | | * 获取商家可结算额度 15天以前的完成的订单 |
| | | * |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | BigDecimal selectSettlement(@Param("storeId") Long storeId); |
| | | |
| | | List<ComShopOrderStoreIdNumVO> selectSumOrderAndAmountByStoreId(@Param("storeId") Long storeId); |
| | | |
| | | /** |
| | | * 查询近15天的订单量 |
| | | * |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | List<ComShopOrderStoreIdCountVO> selectCountOrderDayByStoreId(@Param("storeId") Long storeId, @Param("days") Integer days); |
| | | |
| | | /** |
| | | * 查询当年月份的订单量 |
| | | * |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | List<ComShopOrderStoreIdCountVO> selectCountOrderMonthByStoreId(@Param("storeId") Long storeId); |
| | | |
| | | IPage<ComShopFlowerOrderStoreListVO> pageOrderByDeliveryNo(@Param("page") Page page, @Param("comOrderListDTO") PageComFlowerOrderListDTO comOrderListDTO); |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopFlowerOrderPayDTO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderPayVO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderPayDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @ClassName: ComShopFlowerOrderPayMapper |
| | | * @ClassName: ComShopFlowerOrderPayMapper |
| | | * @Author: yh |
| | | * @Date: 2022/11/9 16:46 |
| | | * @Description: TODO |
| | |
| | | @Mapper |
| | | public interface ComShopFlowerOrderPayDAO extends BaseMapper<ComShopFlowerOrderPayDO> { |
| | | |
| | | |
| | | /** |
| | | * 根据类型和商家id分页查询 |
| | | * @param page |
| | | * @param pageComShopFlowerOrderPayDTO |
| | | * @return |
| | | */ |
| | | IPage<ComShopFlowerOrderPayVO> pageOrderPay(@Param("page") Page page, @Param("pageComShopFlowerOrderPayDTO") PageComShopFlowerOrderPayDTO pageComShopFlowerOrderPayDTO); |
| | | |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public interface ComShopFlowerRefundOrderDAO extends BaseMapper<ComShopFlowerRefundOrderDO> { |
| | | /** |
| | | * 用户 分页查询退款订单 |
| | | * |
| | | * @param page |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | |
| | | |
| | | List<ComShopOrderCountVO> selectCountGroupStatus(@Param("storeId") Long storeId); |
| | | |
| | | int updateCancel(@Param("id") Long id, @Param("status") Integer status); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientElevatingPointDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComFlowerOrderDeliveryDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComFlowerOrderListDTO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientElevatingPointDO; |
| | |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param pointId |
| | | * @param operator |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 分页查询未配送的自提点 |
| | | * |
| | | * @param page |
| | | * @param pageComFlowerOrderDeliveryDTO |
| | | * @return |
| | | */ |
| | | IPage<ConvenientElevatingPointVO> pageNoDelivery(@Param("page") Page page, @Param("pageComFlowerOrderDeliveryDTO") PageComFlowerOrderDeliveryDTO pageComFlowerOrderDeliveryDTO); |
| | | |
| | | ConvenientElevatingPointVO selectOrderNum(@Param("pageComFlowerOrderListDTO") PageComFlowerOrderListDTO pageComFlowerOrderListDTO); |
| | | } |
| | |
| | | /** |
| | | * 配送方式(1.自提 2.快递) |
| | | */ |
| | | private Integer deliveryType; |
| | | private String deliveryType; |
| | | |
| | | /** |
| | | * 删除状态(1.未删除 2.已删除) |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: ComShopFlowerGoodsViewStatisticsDO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 便民服务商品浏览量统计DO |
| | | * @author: yh |
| | | * @date: 2022-11-08 17:25:45 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_shop_flower_goods_view_statistics") |
| | | public class ComShopFlowerGoodsViewStatisticsDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.ASSIGN_ID) |
| | | private Long id; |
| | | /** |
| | | * 商家id |
| | | */ |
| | | private Long goodsId; |
| | | /** |
| | | * 统计日期 |
| | | */ |
| | | private Date statisticDate; |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewNum; |
| | | } |
| | |
| | | */ |
| | | private String deliveryNo; |
| | | |
| | | |
| | | /** |
| | | * 订单状态(0.待付款 1.等待配送 2.配送中 3.待收货 4.待评价 5.已完成 6.已取消 7.已退款) |
| | | * 订单状态(1.等待配送 2.配送中 3.待收货 4.待评价 5.已完成 6.已取消 7.已退款 8.待发货) |
| | | */ |
| | | public interface status { |
| | | int dfk = 0; |
| | |
| | | int ywc = 5; |
| | | int yqx = 6; |
| | | int ytk = 7; |
| | | int dfh = 8; |
| | | } |
| | | |
| | | /** |
| | |
| | | * 自提点名称 |
| | | */ |
| | | @TableField(value = "point_name") |
| | | private Long pointName; |
| | | private String pointName; |
| | | |
| | | /** |
| | | * 配送订单数量 |
| | |
| | | private Date refundTime; |
| | | |
| | | /** |
| | | * 取消时间 |
| | | */ |
| | | @TableField(value = "cancel_time") |
| | | private Date cancelTime; |
| | | |
| | | /** |
| | | * 处理结果(1.同意 2.拒绝) |
| | | */ |
| | | @TableField(value = "handle_result") |
| | |
| | | private String remark; |
| | | |
| | | /** |
| | | * 订单状态(1.处理中 2.退款成功 3.退款失败 4.已取消 5.退款中) |
| | | * 订单状态(9.处理中 10.退款成功 11.退款失败 12.已取消 13.退款中) |
| | | */ |
| | | public interface status{ |
| | | int clz = 1; |
| | | int tkcg = 2; |
| | | int tksb = 3; |
| | | int yqx = 4; |
| | | int kkz = 5; |
| | | int clz = 9; |
| | | int tkcg = 10; |
| | | int tksb = 11; |
| | | int yqx = 12; |
| | | int tkz = 13; |
| | | } |
| | | |
| | | /** |
| | |
| | | * 商家地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 详细地址 |
| | | */ |
| | | private String detailedAddress; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | |
| | | * @return |
| | | */ |
| | | R changeStatus(Long id, Integer status); |
| | | |
| | | /** |
| | | * 新增商品浏览量 |
| | | * @param goodsId |
| | | * @return |
| | | */ |
| | | R incrGoodsView(Long goodsId); |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopFlowerOrderPayDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderPayDO; |
| | | |
| | | /** |
| | | * @ClassName: ComShopFlowerOrderPayService |
| | | * @Author: yh |
| | | * @Date: 2022/11/22 10:53 |
| | | * @Description: |
| | | */ |
| | | public interface ComShopFlowerOrderPayService extends IService<ComShopFlowerOrderPayDO> { |
| | | |
| | | /** |
| | | * 分页查询出入账 |
| | | * @param pageComShopFlowerOrderPayDTO |
| | | * @return |
| | | */ |
| | | R pageOrderPay(PageComShopFlowerOrderPayDTO pageComShopFlowerOrderPayDTO); |
| | | } |
| | |
| | | R orderConfirm(Long orderId, String phone); |
| | | |
| | | /** |
| | | * 统计用户订单数量 |
| | | * |
| | | * @param userId |
| | | * 用户id |
| | | * @return 统计结果 |
| | | */ |
| | | R orderStatistics(Long userId); |
| | | |
| | | /** |
| | | * 商家资金的订单详情 |
| | | * |
| | | * @param id |
| | | * 订单id |
| | | * @return |
| | | */ |
| | | R capitalDetailByStore(Long id); |
| | | |
| | | /** |
| | | * 订单发货 |
| | | * |
| | | * @param orderShipDTO |
| | |
| | | */ |
| | | R finishDeliverOrder(ComShopOrderDeliverDTO orderDeliverDTO); |
| | | |
| | | /** |
| | | * 获取订单导出数据 |
| | | * |
| | | * @param comShopOrderExportDTO |
| | | * 订单导出参数 |
| | | * @return 订单数据 |
| | | */ |
| | | R shopOrderExportData(ComShopOrderExportDTO comShopOrderExportDTO); |
| | | |
| | | /** |
| | | * 获取资金导出数据 |
| | | * |
| | | * @param comShopFundsExportDTO |
| | | * 资金导出参数 |
| | | * @return 资金数据 |
| | | */ |
| | | R shopOrderFundsExportData(ComShopFundsExportDTO comShopFundsExportDTO); |
| | | |
| | | /** |
| | | * 获取用户资金信息 |
| | | * |
| | | * @param userId |
| | | * 用户ID |
| | | * @return 统计结果 |
| | | */ |
| | | R getFundsStat(Long userId); |
| | | |
| | | /** |
| | | * 获取分页 资金订单数据 |
| | | * |
| | | * @param pageComShopFundsSearchDTO |
| | | * 资金导出参数 |
| | | * @return 资金订单数据 |
| | | */ |
| | | R pageShopFunds(PageComShopFundsSearchDTO pageComShopFundsSearchDTO); |
| | | |
| | | /** |
| | | * 微信支付订单回调 |
| | |
| | | * @param deliveryType |
| | | * @return |
| | | */ |
| | | R selectCountByDeliveryType(Integer deliveryType,Long storeId); |
| | | R selectCountByDeliveryType(Integer deliveryType,Long userId); |
| | | |
| | | /** |
| | | * 查询我的店铺各类统计数据 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | R selectCountByStoreId(Long storeId); |
| | | R selectCountByUserId(Long storeId); |
| | | |
| | | /** |
| | | * 获取商家的营业额和可结算金额 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | R getQuota(Long storeId); |
| | | |
| | | /** |
| | | * 商家后台经营数据统计-上 |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | R selectSumOrderAndAmountByStoreId(Long storeId); |
| | | |
| | | /** |
| | | * 统计时间区域的订单量 15天 30天 一年 |
| | | * @param storeId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | R selectOrderLineChart(Long storeId,Integer type); |
| | | |
| | | /** |
| | | * 清点商品 确认送达详情 |
| | | * @param pageComFlowerOrderListDTO |
| | | * @return |
| | | */ |
| | | R pageOrderByDeliveryNo(PageComFlowerOrderListDTO pageComFlowerOrderListDTO); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R selectCountGroupStatus(Long storeId); |
| | | |
| | | /** |
| | | * 取消退款 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R orderCancel(Long id); |
| | | |
| | | /** |
| | | * 退款订单详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R refundOrderDetail(Long id); |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerEvaluateVO; |
| | | import com.panzhihua.service_community.dao.ComShopFlowerEvaluateDAO; |
| | | import com.panzhihua.service_community.dao.ComShopFlowerOrderDAO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerEvaluateDO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderDO; |
| | | import com.panzhihua.service_community.service.ComShopFlowerEvaluateService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @auther yh |
| | |
| | | public class ComShopFlowerEvaluateServiceImpl extends ServiceImpl<ComShopFlowerEvaluateDAO, ComShopFlowerEvaluateDO> |
| | | implements ComShopFlowerEvaluateService { |
| | | |
| | | @Resource |
| | | private ComShopFlowerOrderDAO comShopFlowerOrderDAO; |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R saveEvaluate(ComShopFlowerEvaluateDTO comShopFlowerEvaluateDTO) { |
| | | ComShopFlowerEvaluateDO comShopFlowerEvaluateDO = new ComShopFlowerEvaluateDO(); |
| | | BeanUtils.copyProperties(comShopFlowerEvaluateDO,comShopFlowerEvaluateDTO); |
| | | BeanUtils.copyProperties(comShopFlowerEvaluateDTO,comShopFlowerEvaluateDO); |
| | | //评价时间 |
| | | comShopFlowerEvaluateDO.setEvaluateTime(new Date()); |
| | | ComShopFlowerOrderDO comShopFlowerOrderDO = comShopFlowerOrderDAO.selectOne(new LambdaQueryWrapper<ComShopFlowerOrderDO>().eq(ComShopFlowerOrderDO::getOrderNo, comShopFlowerEvaluateDTO.getOrderNo())); |
| | | if (Objects.isNull(comShopFlowerOrderDO)){ |
| | | R.fail("未找到该订单"); |
| | | } |
| | | comShopFlowerOrderDO.setStatus(ComShopFlowerOrderDO.status.ywc); |
| | | comShopFlowerOrderDAO.updateById(comShopFlowerOrderDO); |
| | | this.baseMapper.insert(comShopFlowerEvaluateDO); |
| | | return R.ok(); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R deleteEvaluate(Long id) { |
| | | return R.ok(this.baseMapper.deleteById(id)); |
| | | } |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | |
| | | private ComShopFlowerOrderGoodsDAO comShopFlowerOrderGoodsDAO; |
| | | @Resource |
| | | private ComShopFlowerEvaluateDAO comShopFlowerEvaluateDAO; |
| | | @Resource |
| | | private ComShopFlowerGoodsViewStatisticsDAO comShopFlowerGoodsViewStatisticsDAO; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R saveShopFlowerGoods(AddShopFlowerGoodsVO addShopFlowerGoodsVO) { |
| | | if (addShopFlowerGoodsVO == null) { |
| | | return R.ok("500", "数据为空!"); |
| | |
| | | goodsVo.setGoodsAttrList(goodsAttrList); |
| | | goodsVo.setGoodsPic(comShopFlowerGoodsAttrVO.getAttrPic()); |
| | | goodsVo.setOriginalPrice(comShopFlowerGoodsAttrVO.getPrice()); |
| | | goodsVo.setPrice(comShopFlowerGoodsAttrVO.getCollatePrice()); |
| | | goodsVo.setCollatePrice(comShopFlowerGoodsAttrVO.getCollatePrice()); |
| | | goodsVo.setFreeShippingPrice(comShopFlowerGoodsAttrVO.getFreeShippingPrice()); |
| | | } |
| | | |
| | | //设置商品总浏览量 |
| | | goodsVo.setViewNum(comShopFlowerGoodsViewStatisticsDAO.selectTotalViewNum(goodsId)); |
| | | }); |
| | | } |
| | | return R.ok(goodsVOIPage); |
| | |
| | | List<ComShopFlowerGoodsAttrDO> goodsAttrDOS = |
| | | shopFlowerGoodsAttrDAO.selectList(new QueryWrapper<ComShopFlowerGoodsAttrDO>().eq("goods_id", goodsId)); |
| | | List<String> images = new ArrayList<>(); |
| | | goodsAttrDOS.forEach(attrDO -> { |
| | | int stock = 0; |
| | | for (ComShopFlowerGoodsAttrDO attrDO : goodsAttrDOS) { |
| | | ComShopFlowerGoodsAttrVO goodsAttrVO = new ComShopFlowerGoodsAttrVO(); |
| | | BeanUtils.copyProperties(attrDO, goodsAttrVO); |
| | | String attrPic = attrDO.getAttrPic(); |
| | | images.add(attrPic); |
| | | goodsAttrList.add(goodsAttrVO); |
| | | }); |
| | | |
| | | |
| | | stock = stock +attrDO.getStock(); |
| | | } |
| | | // 查询商品店铺信息 |
| | | ConvenientMerchantDO convenientMerchantDO = convenientMerchantDAO.selectById(goodsDO.getStoreId()); |
| | | ConvenientMerchantVO convenientMerchantVO = new ConvenientMerchantVO(); |
| | |
| | | shopGoods.setOrderNum(orderNum); |
| | | List<ComShopFlowerEvaluateVO> comShopFlowerEvaluateVOList = comShopFlowerEvaluateDAO.selectListLimit(goodsId); |
| | | shopGoods.setShopFlowerEvaluateVOList(comShopFlowerEvaluateVOList); |
| | | |
| | | List<Long> categoryIds = convenientGoodsCategoryDAO.selectCategoryIdsForGoods(goodsId); |
| | | shopGoods.setCategoryIds(categoryIds); |
| | | ComShopFlowerGoodsAttrVO comShopFlowerGoodsAttrVO = goodsAttrList.get(0); |
| | | shopGoods.setOriginalPrice(comShopFlowerGoodsAttrVO.getPrice()); |
| | | shopGoods.setCollatePrice(comShopFlowerGoodsAttrVO.getCollatePrice()); |
| | | shopGoods.setFreeShippingPrice(comShopFlowerGoodsAttrVO.getFreeShippingPrice()); |
| | | shopGoods.setStock(stock); |
| | | |
| | | |
| | | return R.ok(shopGoods); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R editFlowerShopGoods(Long id, AddShopFlowerGoodsVO addShopFlowerGoodsVO) { |
| | | if (addShopFlowerGoodsVO == null) { |
| | | return R.ok("500", "数据为空!"); |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R deleteShopFlowerGoods(Long id) { |
| | | ComShopFlowerGoodsDO comShopFlowerGoodsDO = this.baseMapper.selectById(id); |
| | | comShopFlowerGoodsDO.setDeleteStatus(ComShopFlowerGoodsDO.deleteStatus.yes); |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R changeStatus(Long id, Integer status) { |
| | | ComShopFlowerGoodsDO shopGoodsDO = this.baseMapper.selectById(id); |
| | | if (shopGoodsDO == null) { |
| | |
| | | this.baseMapper.updateById(shopGoodsDO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R incrGoodsView(Long goodsId) { |
| | | ComShopFlowerGoodsDO comShopFlowerGoodsDO = this.baseMapper.selectById(goodsId); |
| | | if (isNull(comShopFlowerGoodsDO)) { |
| | | return R.fail("商品不存在"); |
| | | } |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String nowDate = simpleDateFormat.format(new Date()); |
| | | ComShopFlowerGoodsViewStatisticsDO statisticsDO = comShopFlowerGoodsViewStatisticsDAO.selectOne(new LambdaQueryWrapper<ComShopFlowerGoodsViewStatisticsDO>() |
| | | .eq(ComShopFlowerGoodsViewStatisticsDO::getGoodsId, goodsId).eq(ComShopFlowerGoodsViewStatisticsDO::getStatisticDate, nowDate)); |
| | | if (isNull(statisticsDO)) { |
| | | comShopFlowerGoodsViewStatisticsDAO.createTodayStatistic(goodsId); |
| | | } else { |
| | | comShopFlowerGoodsViewStatisticsDAO.incrViewNum(goodsId, nowDate); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.shop.PageComFlowerOrderDeliveryDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComFlowerOrderListDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointOrderVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderDeliveryVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderPageVO; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R saveDelivery(ComShopFlowerOrderDeliveryDTO comShopFlowerOrderDeliveryDTO) { |
| | | ComShopFlowerOrderDeliveryDO comShopFlowerOrderDeliveryDO = new ComShopFlowerOrderDeliveryDO(); |
| | | BeanUtils.copyProperties(comShopFlowerOrderDeliveryDTO,comShopFlowerOrderDeliveryDO); |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R updateDelivery(ComShopFlowerOrderDeliveryDTO comShopFlowerOrderDeliveryDTO) { |
| | | Long id = comShopFlowerOrderDeliveryDTO.getId(); |
| | | if (null == id){ |
| | |
| | | return R.fail("不存在该配送单"); |
| | | } |
| | | comShopFlowerOrderDeliveryDO.setServiceTime(new Date()); |
| | | comShopFlowerOrderDeliveryDO.setDeleteStatus(ComShopFlowerOrderDeliveryDO.deliveryStatus.ysd); |
| | | comShopFlowerOrderDeliveryDO.setDeliveryStatus(ComShopFlowerOrderDeliveryDO.deliveryStatus.ysd); |
| | | int update = this.baseMapper.updateById(comShopFlowerOrderDeliveryDO); |
| | | if (update > 0){ |
| | | comShopFlowerOrderDAO.updateOrderStatus(comShopFlowerOrderDeliveryDO.getId(),comShopFlowerOrderDeliveryDO.getServiceTime(),ComShopFlowerOrderDO.status.dsh); |
| | |
| | | public R pageNoDeliveryOrderList(PageComFlowerOrderListDTO pageComFlowerOrderListDTO) { |
| | | Page page = new Page<>(pageComFlowerOrderListDTO.getPageNum(),pageComFlowerOrderListDTO.getPageSize()); |
| | | IPage<ComShopFlowerOrderPageVO> iPage = comShopFlowerOrderDAO.pageOrderListNoDelivery(page, pageComFlowerOrderListDTO); |
| | | return R.ok(iPage); |
| | | ConvenientElevatingPointVO convenientElevatingPointVO = convenientElevatingPointDAO.selectOrderNum(pageComFlowerOrderListDTO); |
| | | ConvenientElevatingPointOrderVO convenientElevatingPointOrderVO = new ConvenientElevatingPointOrderVO(); |
| | | convenientElevatingPointOrderVO.setConvenientElevatingPointVO(convenientElevatingPointVO); |
| | | convenientElevatingPointOrderVO.setIPage(iPage); |
| | | return R.ok(convenientElevatingPointOrderVO); |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopFlowerOrderPayDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderPayVO; |
| | | import com.panzhihua.service_community.dao.ComShopFlowerOrderPayDAO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderPayDO; |
| | | import com.panzhihua.service_community.service.ComShopFlowerOrderPayService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * @ClassName: ComShopFlowerOrderPayServiceImpl |
| | | * @Author: yh |
| | | * @Date: 2022/11/22 10:53 |
| | | * @Description: 流水 |
| | | */ |
| | | @Service |
| | | public class ComShopFlowerOrderPayServiceImpl extends ServiceImpl<ComShopFlowerOrderPayDAO, ComShopFlowerOrderPayDO> implements ComShopFlowerOrderPayService { |
| | | |
| | | @Override |
| | | public R pageOrderPay(PageComShopFlowerOrderPayDTO pageComShopFlowerOrderPayDTO) { |
| | | Page page = new Page<>(pageComShopFlowerOrderPayDTO.getPageNum(),pageComShopFlowerOrderPayDTO.getPageSize()); |
| | | IPage<ComShopFlowerOrderPayVO> comShopFlowerOrderPayVOIPage = this.baseMapper.pageOrderPay(page, pageComShopFlowerOrderPayDTO); |
| | | return R.ok(comShopFlowerOrderPayVOIPage); |
| | | } |
| | | } |
| | |
| | | private ComShopFlowerEvaluateDAO comShopFlowerEvaluateDAO; |
| | | @Resource |
| | | private ComShopFlowerRefundOrderDAO comShopFlowerRefundOrderDAO; |
| | | @Resource |
| | | private ComShopFlowerOrderDeliveryDAO comShopFlowerOrderDeliveryDAO; |
| | | |
| | | |
| | | @Value("${hcMin.app.isTest}") |
| | |
| | | // 店铺id |
| | | Long storeId = 0L; |
| | | // 生成订单号 |
| | | String orderNo = OrderNoUtils.NextOrderNo(userId); |
| | | String orderNo = OrderNoUtils.NextOrderNoFlower(userId); |
| | | // 配送方式 |
| | | Integer deliveryType = 0; |
| | | Integer deliveryType = 1; |
| | | // 订单总金额 |
| | | BigDecimal orderTotal = BigDecimal.ZERO; |
| | | // 创建订单商品信息 |
| | |
| | | continue; |
| | | } |
| | | storeId = goodsDO.getStoreId(); |
| | | deliveryType = goodsDO.getDeliveryType(); |
| | | deliveryType = orderCreateDTO.getDeliveryType(); |
| | | ComShopFlowerOrderGoodsDO orderGoodsDO = new ComShopFlowerOrderGoodsDO(); |
| | | orderGoodsDO.setGoodsId(goodsDO.getId()); |
| | | orderGoodsDO.setGoodsName(goodsDO.getName()); |
| | |
| | | return R.fail("该规格库存不足,无法下单"); |
| | | } |
| | | orderGoodsDO.setGoodsAttrId(goodsAttrDO.getId()); |
| | | orderGoodsDO.setGoodsAttrPrice(goodsAttrDO.getPrice()); |
| | | orderGoodsDO.setGoodsAttrPrice(createGoodsDTO.getPrice()); |
| | | orderGoodsDO.setPrice(goodsAttrDO.getPrice()); |
| | | orderGoodsDO.setCollatePrice(goodsAttrDO.getCollatePrice()); |
| | | orderGoodsDO.setFreeShippingPrice(goodsAttrDO.getFreeShippingPrice()); |
| | |
| | | orderGoodsDOList.add(orderGoodsDO); |
| | | // 将商品金额计算到订单总金额 |
| | | orderTotal = orderTotal |
| | | .add(orderGoodsDO.getGoodsAttrPrice().multiply(BigDecimal.valueOf(orderGoodsDO.getAmount()))); |
| | | .add(createGoodsDTO.getPrice().multiply(BigDecimal.valueOf(createGoodsDTO.getNum()))); |
| | | } |
| | | } |
| | | // 如果是购物车提交,需要将购物车内商品移除 |
| | | /*if (orderCreateDTO.getSubmitType().equals(ComShopOrderCreateDTO.submitType.cart)) { |
| | | comShopCartDAO.deleteBatchIds(orderCreateDTO.getCartIds()); |
| | | }*/ |
| | | // 创建订单信息 |
| | | ComShopFlowerOrderDO shopOrderDO = new ComShopFlowerOrderDO(); |
| | | shopOrderDO.setOrderNo(orderNo); |
| | |
| | | BeanUtils.copyProperties(convenientMerchantDO, shopStoreVO); |
| | | } |
| | | orderVo.setConvenientMerchantVO(shopStoreVO); |
| | | //已完成、已退款才有评论 TODO |
| | | // if (ComShopFlowerOrderDO.status.ywc == shopOrderDO.getStatus() || ComShopFlowerOrderDO.status.ytk == shopOrderDO.getStatus()) { |
| | | ComShopFlowerEvaluateVO comShopFlowerEvaluateVO = comShopFlowerEvaluateDAO.selectByOrderNo(orderVo.getOrderNo()); |
| | | if (nonNull(comShopFlowerEvaluateVO)) { |
| | | orderVo.setComShopFlowerEvaluateVO(comShopFlowerEvaluateVO); |
| | | } |
| | | // } |
| | | }); |
| | | } |
| | | return R.ok(orderPageVOIPage); |
| | |
| | | } |
| | | BeanUtils.copyProperties(shopOrderDO, orderVO); |
| | | orderVO.setOrderTotal(shopOrderDO.getTotalAmount()); |
| | | |
| | | orderVO.setOrderId(orderId); |
| | | ConvenientMerchantVO shopStoreVO = new ConvenientMerchantVO(); |
| | | // 查询店铺信息 |
| | | ConvenientMerchantDO shopStoreDO = convenientMerchantDAO.selectById(shopOrderDO.getStoreId()); |
| | |
| | | BeanUtils.copyProperties(convenientElevatingPointDO, convenientElevatingPointVO); |
| | | orderVO.setConvenientElevatingPointVO(convenientElevatingPointVO); |
| | | } |
| | | //已完成、已退款才有评论 |
| | | if (ComShopFlowerOrderDO.status.ywc == shopOrderDO.getStatus() || ComShopFlowerOrderDO.status.ytk == shopOrderDO.getStatus()) { |
| | | //已完成、已退款才有评论 TODO |
| | | // if (ComShopFlowerOrderDO.status.ywc == shopOrderDO.getStatus() || ComShopFlowerOrderDO.status.ytk == shopOrderDO.getStatus()) { |
| | | ComShopFlowerEvaluateVO comShopFlowerEvaluateVO = comShopFlowerEvaluateDAO.selectByOrderNo(shopOrderDO.getOrderNo()); |
| | | if (nonNull(comShopFlowerEvaluateVO)) { |
| | | orderVO.setComShopFlowerEvaluateVO(comShopFlowerEvaluateVO); |
| | | } |
| | | // } |
| | | //设置退款金额 |
| | | ComShopFlowerRefundOrderDO comShopFlowerRefundOrderDO = comShopFlowerRefundOrderDAO.selectOne(new LambdaQueryWrapper<ComShopFlowerRefundOrderDO>().eq(ComShopFlowerRefundOrderDO::getOrderId, shopOrderDO.getOrderNo())); |
| | | if (nonNull(comShopFlowerRefundOrderDO)){ |
| | | orderVO.setRefundAmount(comShopFlowerRefundOrderDO.getRefundAmount()); |
| | | } |
| | | |
| | | |
| | | return R.ok(orderVO); |
| | | } |
| | |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R orderDelete(Long orderId) { |
| | | // 查询订单 |
| | | ComShopFlowerOrderDO shopOrderDO = this.baseMapper.selectById(orderId); |
| | |
| | | return R.fail("该订单状态不可确认收货"); |
| | | } |
| | | // 订单确认收货 |
| | | shopOrderDO.setStatus(ComShopOrderDO.status.ywc); |
| | | shopOrderDO.setStatus(ComShopFlowerOrderDO.status.dpj); |
| | | shopOrderDO.setReceivingTime(new Date()); |
| | | if (this.baseMapper.updateById(shopOrderDO) > 0) { |
| | | // 添加订单操作记录 |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 统计用户订单数量 |
| | | * |
| | | * @param userId 用户id |
| | | * @return 统计结果 |
| | | */ |
| | | @Override |
| | | public R orderStatistics(Long userId) { |
| | | /*OrderStatisticsVO orderStatisticsVO = new OrderStatisticsVO(); |
| | | // 待付款订单数 |
| | | Integer paymentNum = 0; |
| | | // 待发货订单数 |
| | | Integer deliverNum = 0; |
| | | // 待收货订单数 |
| | | Integer receivingNum = 0; |
| | | List<ComShopOrderDO> shopOrderList = this.baseMapper.selectList(new QueryWrapper<ComShopOrderDO>() |
| | | .eq("user_id", userId).eq("delete_status", ComShopOrderDO.deleteStatus.no)); |
| | | if (!shopOrderList.isEmpty()) { |
| | | for (ComShopOrderDO orderDO : shopOrderList) { |
| | | if (orderDO.getStatus().equals(ComShopOrderDO.status.dfk)) { |
| | | paymentNum++; |
| | | } else if (orderDO.getStatus().equals(ComShopOrderDO.status.dfh)) { |
| | | deliverNum++; |
| | | } else if (orderDO.getStatus().equals(ComShopOrderDO.status.dsh)) { |
| | | receivingNum++; |
| | | } |
| | | } |
| | | } |
| | | orderStatisticsVO.setPaymentNum(paymentNum); |
| | | orderStatisticsVO.setDeliverNum(deliverNum); |
| | | orderStatisticsVO.setReceivingNum(receivingNum); |
| | | return R.ok(orderStatisticsVO);*/ |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 订单发货 |
| | |
| | | if (!(comShopOrderDO.getStatus() == 2) || !(comShopOrderDO.getDeliveryStatus() == 1)) { |
| | | return R.fail("当前订单不能配送"); |
| | | } |
| | | /*ComShopStoreDO storeDO = comShopStoreDAO.selectById(comShopOrderDO.getStoreId()); |
| | | if (storeDO.getDeliveryType() != 1) { |
| | | return R.fail("该商家不支持通过商家配送"); |
| | | }*/ |
| | | |
| | | comShopOrderDO.setDeliveryStatus(4); |
| | | comShopOrderDO.setDeliveryType(1); |
| | | comShopOrderDO.setStatus(3); |
| | |
| | | return R.fail("订单还未发货"); |
| | | } |
| | | // comShopOrderDO.setStatus(4); |
| | | comShopOrderDO.setDeliveryStatus(5); |
| | | comShopOrderDO.setDeliveryStatus(2); |
| | | int updated = comShopFlowerOrderDAO.updateById(comShopOrderDO); |
| | | if (updated == 1) { |
| | | // 创建订单操作记录 |
| | |
| | | return R.fail("操作失败!"); |
| | | } |
| | | |
| | | @Override |
| | | public R shopOrderExportData(ComShopOrderExportDTO comShopOrderExportDTO) { |
| | | // Page page = new Page(); |
| | | // page.setSize(10000); |
| | | // page.setCurrent(1); |
| | | // IPage<ExcelShopOrderDTO> excelShopOrderDTO = comShopOrderDAO.selectOrderExport(page, comShopOrderExportDTO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R shopOrderFundsExportData(ComShopFundsExportDTO comShopFundsExportDTO) { |
| | | // Page page = new Page(); |
| | | // page.setSize(10000); |
| | | // page.setCurrent(1); |
| | | // IPage<ExcelShopFundsDTO> excelShopFundsDTO = comShopOrderDAO.selectFundsExport(page, comShopFundsExportDTO); |
| | | return R.ok(null); |
| | | } |
| | | |
| | | @Override |
| | | public R getFundsStat(Long userId) { |
| | | /* ComShopFundsVO comShopFundsVO = comShopOrderDAO.queryStatis(userId); |
| | | if (comShopFundsVO == null) { |
| | | comShopFundsVO = new ComShopFundsVO(); |
| | | comShopFundsVO.setMonthTotal(new BigDecimal(0)); |
| | | comShopFundsVO.setTodayTotal(new BigDecimal(0)); |
| | | comShopFundsVO.setWeekTotal(new BigDecimal(0)); |
| | | }*/ |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R pageShopFunds(PageComShopFundsSearchDTO pageComShopFundsSearchDTO) { |
| | | /*Long pageNum = pageComShopFundsSearchDTO.getPageNum(); |
| | | Long pageSize = pageComShopFundsSearchDTO.getPageSize(); |
| | | Page page = new Page(); |
| | | if (pageNum == null || 0 == pageNum.longValue()) { |
| | | pageNum = 1l; |
| | | } |
| | | if (pageSize == null || 0 == pageSize.longValue()) { |
| | | pageSize = 10l; |
| | | } |
| | | page.setCurrent(pageNum); |
| | | page.setSize(pageSize); |
| | | IPage<ComShopFundsOrderVO> comShopFundsOrderVOIPage = |
| | | comShopOrderDAO.pageShopFunds(page, pageComShopFundsSearchDTO);*/ |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R pageShopOrder(PageComShopOrderSearchDTO pageComShopOrderSearchDTO) { |
| | |
| | | |
| | | IPage<ComShopOrderSearchVO> ipage = this.baseMapper.pageOrderBy(page, pageComShopOrderSearchDTO); |
| | | return R.ok(ipage); |
| | | } |
| | | |
| | | @Override |
| | | public R capitalDetailByStore(Long id) { |
| | | /*if (id == null) { |
| | | R.fail("订单号不能为空!"); |
| | | } |
| | | CapitalDetailVO vo = this.baseMapper.capitalDetailByStore(id);*/ |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | |
| | | log.error("未查询到支付订单,订单回调失败,订单号:" + wxPayNotifyOrderDTO.getOrderTradeNo()); |
| | | return; |
| | | } |
| | | shopOrderDO.setStatus(ComShopFlowerOrderDO.status.ddps); |
| | | if (ComShopFlowerOrderDO.deliveryType.store == shopOrderDO.getDeliveryType()){ |
| | | shopOrderDO.setStatus(ComShopFlowerOrderDO.status.ddps); |
| | | }else { |
| | | shopOrderDO.setStatus(ComShopFlowerOrderDO.status.dfh); |
| | | } |
| | | |
| | | shopOrderDO.setPayType(ComShopFlowerOrderDO.payType.wx); |
| | | shopOrderDO.setPayStatus(ComShopFlowerOrderDO.payStatus.yes); |
| | | shopOrderDO.setPayAmount(BigDecimal.valueOf(Double.valueOf(wxPayNotifyOrderDTO.getCashFee()) / 100)); |
| | |
| | | * @param orderPayDTO 请求参数 |
| | | * @return 支付对象 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R wxPay(OrderPayDTO orderPayDTO) { |
| | | // 创建返回参数 |
| | | ComShopFlowerOrderVO shopOrderVO = new ComShopFlowerOrderVO(); |
| | |
| | | |
| | | @Override |
| | | public R pageOrderByStoreId(PageComFlowerOrderListDTO pageComFlowerOrderListDTO) { |
| | | |
| | | Page page = new Page(pageComFlowerOrderListDTO.getPageNum(), pageComFlowerOrderListDTO.getPageSize()); |
| | | |
| | | IPage<ComShopFlowerOrderStoreListVO> ipage = this.baseMapper.pageOrderByStoreId(page, pageComFlowerOrderListDTO); |
| | | return R.ok(ipage); |
| | | IPage<ComShopFlowerOrderStoreListVO> orderPageVOIPage = this.baseMapper.pageOrderByStoreId(page, pageComFlowerOrderListDTO); |
| | | if (!orderPageVOIPage.getRecords().isEmpty()) { |
| | | orderPageVOIPage.getRecords().forEach(orderVo -> { |
| | | if (null!=orderVo.getPointId()){ |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = convenientElevatingPointDAO.selectById(orderVo.getPointId()); |
| | | ConvenientElevatingPointVO convenientElevatingPointVO = new ConvenientElevatingPointVO(); |
| | | BeanUtils.copyProperties(convenientElevatingPointDO,convenientElevatingPointVO); |
| | | orderVo.setConvenientElevatingPointVO(convenientElevatingPointVO); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(orderPageVOIPage); |
| | | } |
| | | |
| | | @Override |
| | | public R selectCountByDeliveryType(Integer deliveryType,Long storeId) { |
| | | public R selectCountByDeliveryType(Integer deliveryType, Long userId) { |
| | | //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); |
| | | String[] statusStr = {"ddps", "psz", "dsh", "dpj", "ywc", "yqx", "ytk"}; |
| | | ConvenientMerchantVO convenientMerchantVO = convenientMerchantDAO.selectMerchantByUserId(userId); |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountByDeliveryType(deliveryType, convenientMerchantVO.getId()); |
| | | Map<Integer, Integer> collect = comShopOrderCountVOS.stream().collect(Collectors.toMap(ComShopOrderCountVO::getStatus, ComShopOrderCountVO::getAmount)); |
| | | Map<String,Integer> retMap = new HashMap<>(); |
| | | 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(statusStr[i], amount); |
| | | } else { |
| | | retMap.put(statusStr[i], 0); |
| | | } |
| | | } |
| | | retMap.put("zdd",amountTotal); |
| | | retMap.put("zdd", amountTotal); |
| | | |
| | | return R.ok(retMap); |
| | | } |
| | | |
| | | @Override |
| | | public R selectCountByStoreId(Long storeId){ |
| | | Map<String,Object> retMap = new HashMap<>(); |
| | | public R selectCountByUserId(Long userId) { |
| | | ConvenientMerchantVO convenientMerchantVO = convenientMerchantDAO.selectMerchantByUserId(userId); |
| | | Long storeId = convenientMerchantVO.getId(); |
| | | 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); |
| | | Map<String, Integer> zddlMap = comShopOrderStoreIdCountVOS.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCountNum)); |
| | | 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); |
| | | Map<String, Integer> pdddMap = comShopOrderStoreIdCountVOS1.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCountNum)); |
| | | 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); |
| | | Map<String, Integer> kdddMap = comShopOrderStoreIdCountVOS2.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCountNum)); |
| | | retMap.put("kddd", kdddMap); |
| | | |
| | | //拼单订单各状态 |
| | | R r = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.store,storeId); |
| | | retMap.put("pdddStatus",r.getData()); |
| | | R r = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.store, userId); |
| | | retMap.put("pdddStatus", r.getData()); |
| | | |
| | | //快递订单各状态 |
| | | R r1 = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.express,storeId); |
| | | retMap.put("kdddStatus",r1.getData()); |
| | | R r1 = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.express, userId); |
| | | 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); |
| | | Map<String, Integer> yyeMap = comShopOrderStoreIdCountVOS3.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCountNum)); |
| | | retMap.put("yye", yyeMap); |
| | | //在售商品 |
| | | Integer countSale = comShopFlowerGoodsDAO.selectCountSaleByStoreId(storeId); |
| | | retMap.put("countSale",countSale); |
| | | retMap.put("countSale", countSale); |
| | | //退款申请 |
| | | Integer refundOrder = comShopFlowerRefundOrderDAO.selectCountByStoreId(storeId); |
| | | retMap.put("refundOrder",refundOrder); |
| | | retMap.put("refundOrder", refundOrder); |
| | | |
| | | return R.ok(retMap); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取商家的营业额和可结算金额 |
| | | * |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getQuota(Long storeId) { |
| | | //营业额 |
| | | BigDecimal turnover = this.baseMapper.selectTurnover(storeId); |
| | | //可结算 |
| | | BigDecimal settlement = this.baseMapper.selectSettlement(storeId); |
| | | |
| | | Map<String, Object> retMap = new HashMap<>(); |
| | | retMap.put("turnover", turnover); |
| | | retMap.put("settlement", settlement); |
| | | return R.ok(retMap); |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R selectSumOrderAndAmountByStoreId(Long storeId) { |
| | | List<ComShopOrderStoreIdNumVO> comShopOrderStoreIdCountVOS = this.baseMapper.selectSumOrderAndAmountByStoreId(storeId); |
| | | Map<String, Object> retMap = comShopOrderStoreIdCountVOS.stream().collect(Collectors.toMap(ComShopOrderStoreIdNumVO::getCountName, ComShopOrderStoreIdNumVO::getCountNum)); |
| | | return R.ok(retMap); |
| | | } |
| | | |
| | | public R selectOrderLineChart(Long storeId, Integer type) { |
| | | if (1 == type) { |
| | | //近15天的订单量 |
| | | int days = 15; |
| | | return getCountByStoreIdAndDays(storeId, days); |
| | | } else if (2 == type) { |
| | | //近30天的订单量 |
| | | int days = 30; |
| | | return getCountByStoreIdAndDays(storeId, days); |
| | | } else { |
| | | //今年所有月份订单量 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS = this.baseMapper.selectCountOrderMonthByStoreId(storeId); |
| | | Map<String, Integer> retMap = comShopOrderStoreIdCountVOS.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCountNum)); |
| | | List<String> yearMonths = DateUtils.getYearMonths(); |
| | | for (String yearMonth : yearMonths) { |
| | | if (!retMap.containsKey(yearMonth)) { |
| | | retMap.put(yearMonth, 0); |
| | | } |
| | | } |
| | | return R.ok(retMap); |
| | | } |
| | | } |
| | | |
| | | private R getCountByStoreIdAndDays(Long storeId, int days) { |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS = this.baseMapper.selectCountOrderDayByStoreId(storeId, days); |
| | | Map<String, Integer> retMap = comShopOrderStoreIdCountVOS.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCountNum)); |
| | | List<String> beforeDays = DateUtils.getBeforeDays(days); |
| | | for (String beforeDay : beforeDays) { |
| | | if (!retMap.containsKey(beforeDay)) { |
| | | retMap.put(beforeDay, 0); |
| | | } |
| | | } |
| | | return R.ok(retMap); |
| | | } |
| | | |
| | | @Override |
| | | public R pageOrderByDeliveryNo(PageComFlowerOrderListDTO pageComFlowerOrderListDTO) { |
| | | Page page = new Page(pageComFlowerOrderListDTO.getPageNum(), pageComFlowerOrderListDTO.getPageSize()); |
| | | IPage<ComShopFlowerOrderStoreListVO> orderPageVOIPage = this.baseMapper.pageOrderByDeliveryNo(page, pageComFlowerOrderListDTO); |
| | | ComShopFlowerOrderDeliveryNoListVO comShopFlowerOrderDeliveryNoListVO = new ComShopFlowerOrderDeliveryNoListVO(); |
| | | ComShopFlowerOrderDeliveryDO comShopFlowerOrderDeliveryDO = comShopFlowerOrderDeliveryDAO.selectById(pageComFlowerOrderListDTO.getDeliveryId()); |
| | | ComShopFlowerOrderDeliveryVO comShopFlowerOrderDeliveryVO = new ComShopFlowerOrderDeliveryVO(); |
| | | BeanUtils.copyProperties(comShopFlowerOrderDeliveryDO,comShopFlowerOrderDeliveryVO); |
| | | |
| | | Long pointId = comShopFlowerOrderDeliveryDO.getPointId(); |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = convenientElevatingPointDAO.selectById(pointId); |
| | | ConvenientElevatingPointVO convenientElevatingPointVO = new ConvenientElevatingPointVO(); |
| | | BeanUtils.copyProperties(convenientElevatingPointDO,convenientElevatingPointVO); |
| | | comShopFlowerOrderDeliveryVO.setConvenientElevatingPointVO(convenientElevatingPointVO); |
| | | comShopFlowerOrderDeliveryNoListVO.setComShopFlowerOrderDeliveryVO(comShopFlowerOrderDeliveryVO); |
| | | comShopFlowerOrderDeliveryNoListVO.setPage(orderPageVOIPage); |
| | | return R.ok(comShopFlowerOrderDeliveryNoListVO); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopFlowerRefundOrderDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopOrderQueryDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComOrderRefundDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderGoodsVO; |
| | | 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 com.panzhihua.service_community.dao.ComShopFlowerOrderDAO; |
| | | import com.panzhihua.service_community.dao.ComShopFlowerOrderPayDAO; |
| | | import com.panzhihua.service_community.dao.ComShopFlowerRefundOrderDAO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderDO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderPayDO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerRefundOrderDO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComShopFlowerRefundOrderService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * @ClassName: ComShopFlowerRefundOrderServiceImpl |
| | |
| | | private ComShopFlowerOrderDAO comShopFlowerOrderDAO; |
| | | @Resource |
| | | private ComShopFlowerOrderPayDAO comShopFlowerOrderPayDAO; |
| | | @Resource |
| | | private ComShopFlowerOrderGoodsDAO comShopFlowerOrderGoodsDAO; |
| | | @Resource |
| | | private ComShopFlowerGoodsDAO comShopFlowerGoodsDAO; |
| | | |
| | | @Resource |
| | | private ComShopFlowerGoodsAttrDAO comShopFlowerGoodsAttrDAO; |
| | | @Resource |
| | | private ConvenientMerchantDAO convenientMerchantDAO; |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R createRefundOrder(ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO) { |
| | | ComShopFlowerRefundOrderDO comShopFlowerRefundOrderDO = new ComShopFlowerRefundOrderDO(); |
| | | BeanUtils.copyProperties(comShopFlowerRefundOrderDTO, comShopFlowerRefundOrderDO); |
| | | // 生成退款订单号 |
| | | String refundOrderNo = OrderNoUtils.NextOrderNo(comShopFlowerRefundOrderDTO.getUserId()); |
| | | String refundOrderNo = OrderNoUtils.NextOrderNoFlower(comShopFlowerRefundOrderDTO.getUserId()); |
| | | comShopFlowerRefundOrderDO.setRefundOrderNo(refundOrderNo); |
| | | comShopFlowerRefundOrderDO.setStatus(ComShopFlowerRefundOrderDO.status.clz); |
| | | comShopFlowerRefundOrderDO.setDeleteStatus(ComShopFlowerRefundOrderDO.deleteStatus.no); |
| | |
| | | public R pageRefundOrder(PageComOrderRefundDTO pageComOrderRefundDTO) { |
| | | Page page = new Page<>(pageComOrderRefundDTO.getPageNum(), pageComOrderRefundDTO.getPageSize()); |
| | | IPage<ComShopFlowerRefundOrderVO> pages = this.baseMapper.pageRefundOrder(page, pageComOrderRefundDTO); |
| | | for (ComShopFlowerRefundOrderVO comShopFlowerRefundOrderVO : pages.getRecords()) { |
| | | String orderNo = comShopFlowerRefundOrderVO.getOrderNo(); |
| | | List<ComShopFlowerOrderGoodsVO> orderGoodsVOS = new ArrayList<>(); |
| | | // 查询订单下商品信息 |
| | | List<ComShopFlowerOrderGoodsDO> orderGoodsDOList = comShopFlowerOrderGoodsDAO |
| | | .selectList(new QueryWrapper<ComShopFlowerOrderGoodsDO>().eq("order_no",orderNo)); |
| | | StringBuilder sbr = new StringBuilder(); |
| | | if (!orderGoodsDOList.isEmpty()) { |
| | | orderGoodsDOList.forEach(orderGoods -> { |
| | | ComShopFlowerOrderGoodsVO orderGoodsVO = new ComShopFlowerOrderGoodsVO(); |
| | | BeanUtils.copyProperties(orderGoods, orderGoodsVO); |
| | | orderGoodsVO.setNum(orderGoods.getAmount()); |
| | | orderGoodsVO.setGoodsPic(orderGoods.getGoodsAttrPic()); |
| | | orderGoodsVO.setPrice(orderGoods.getGoodsAttrPrice()); |
| | | |
| | | orderGoodsVOS.add(orderGoodsVO); |
| | | sbr.append(orderGoods.getGoodsName()).append(" "); |
| | | }); |
| | | } |
| | | comShopFlowerRefundOrderVO.setOrderGoodsVOList(orderGoodsVOS); |
| | | comShopFlowerRefundOrderVO.setGoodsName(sbr.toString()); |
| | | |
| | | ConvenientMerchantVO shopStoreVO = new ConvenientMerchantVO(); |
| | | // 查询店铺信息 |
| | | ConvenientMerchantDO shopStoreDO = convenientMerchantDAO.selectById(comShopFlowerRefundOrderVO.getStoreId()); |
| | | if (shopStoreDO != null) { |
| | | BeanUtils.copyProperties(shopStoreDO, shopStoreVO); |
| | | } |
| | | comShopFlowerRefundOrderVO.setConvenientMerchantVO(shopStoreVO); |
| | | } |
| | | return R.ok(pages); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R updateRefundOrder(ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO) { |
| | | ComShopFlowerRefundOrderDO comShopFlowerRefundOrderDO = this.baseMapper.selectById(comShopFlowerRefundOrderDTO.getId()); |
| | | |
| | |
| | | // orderPayDO.setWxTradeNo(wxPayNotifyOrderDTO.getWxTradeNo()); |
| | | orderPayDO.setPayStatus(ComShopFlowerOrderPayDO.payStatus.yes); |
| | | orderPayDO.setRefundStatus(ComShopFlowerOrderPayDO.refundStatus.tkcg); |
| | | //更新订单状态 |
| | | comShopFlowerOrderDO.setStatus(ComShopFlowerOrderDO.status.ytk); |
| | | comShopFlowerOrderDAO.updateById(comShopFlowerOrderDO); |
| | | }else { |
| | | //退款失败 |
| | | comShopFlowerRefundOrderDO.setStatus(ComShopFlowerRefundOrderDO.status.tksb); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R selectCountGroupStatus(Long storeId){ |
| | | String[] statusStr = {"clz","tkcg","tksb","yqx","tkz"}; |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountGroupStatus(storeId); |
| | |
| | | retMap.put("zdd",amountTotal); |
| | | return R.ok(retMap); |
| | | } |
| | | |
| | | /** |
| | | * 根据订单id取消订单 |
| | | * |
| | | * @param \ |
| | | * @return 取消结果 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public R orderCancel(Long id) { |
| | | this.baseMapper.updateCancel(id,ComShopFlowerRefundOrderDO.status.yqx); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R refundOrderDetail(Long id){ |
| | | ComShopFlowerRefundOrderDO comShopFlowerRefundOrderDO = this.baseMapper.selectById(id); |
| | | if (isNull(comShopFlowerRefundOrderDO)){ |
| | | return R.fail("未查询到该退款订单"); |
| | | } |
| | | ComShopFlowerRefundOrderVO comShopFlowerRefundOrderVO = new ComShopFlowerRefundOrderVO(); |
| | | BeanUtils.copyProperties(comShopFlowerRefundOrderDO,comShopFlowerRefundOrderVO); |
| | | String orderNo = comShopFlowerRefundOrderDO.getOrderNo(); |
| | | List<ComShopFlowerOrderGoodsVO> orderGoodsVOS = new ArrayList<>(); |
| | | // 查询订单下商品信息 |
| | | List<ComShopFlowerOrderGoodsDO> orderGoodsDOList = comShopFlowerOrderGoodsDAO |
| | | .selectList(new QueryWrapper<ComShopFlowerOrderGoodsDO>().eq("order_no",orderNo)); |
| | | StringBuilder sbr = new StringBuilder(); |
| | | if (!orderGoodsDOList.isEmpty()) { |
| | | orderGoodsDOList.forEach(orderGoods -> { |
| | | ComShopFlowerOrderGoodsVO orderGoodsVO = new ComShopFlowerOrderGoodsVO(); |
| | | BeanUtils.copyProperties(orderGoods, orderGoodsVO); |
| | | orderGoodsVO.setNum(orderGoods.getAmount()); |
| | | orderGoodsVO.setGoodsPic(orderGoods.getGoodsAttrPic()); |
| | | orderGoodsVO.setPrice(orderGoods.getGoodsAttrPrice()); |
| | | // 查询商品信息判断商品状态 |
| | | ComShopFlowerGoodsDO goodsDO = comShopFlowerGoodsDAO.selectById(orderGoods.getGoodsId()); |
| | | if (goodsDO == null || goodsDO.getDeleteStatus().equals(ComShopFlowerGoodsDO.deleteStatus.yes) |
| | | || goodsDO.getDeleteStatus().equals(ComShopFlowerGoodsDO.status.recovery)) { |
| | | orderGoodsVO.setGoodsStatus(ComShopFlowerOrderGoodsVO.goodsStatus.ysc); |
| | | } else if (goodsDO.getStatus().equals(ComShopFlowerGoodsDO.status.lower)) { |
| | | orderGoodsVO.setGoodsStatus(ComShopFlowerOrderGoodsVO.goodsStatus.yxj); |
| | | } else if (goodsDO.getStatus().equals(ComShopFlowerGoodsDO.status.sell)) { |
| | | orderGoodsVO.setGoodsStatus(ComShopFlowerOrderGoodsVO.goodsStatus.csz); |
| | | } |
| | | |
| | | // 根据商品规格id查询商品规格 |
| | | ComShopFlowerGoodsAttrDO goodsAttrDO = comShopFlowerGoodsAttrDAO.selectById(orderGoods.getGoodsAttrId()); |
| | | if (goodsAttrDO != null) { |
| | | orderGoodsVO.setGoodsAttr(goodsAttrDO.getGoodsAttrName()); |
| | | } |
| | | orderGoodsVOS.add(orderGoodsVO); |
| | | sbr.append(orderGoods.getGoodsName()).append(" "); |
| | | }); |
| | | } |
| | | comShopFlowerRefundOrderVO.setOrderGoodsVOList(orderGoodsVOS); |
| | | comShopFlowerRefundOrderVO.setGoodsName(sbr.toString()); |
| | | |
| | | ConvenientMerchantVO shopStoreVO = new ConvenientMerchantVO(); |
| | | // 查询店铺信息 |
| | | ConvenientMerchantDO shopStoreDO = convenientMerchantDAO.selectById(comShopFlowerRefundOrderDO.getStoreId()); |
| | | if (shopStoreDO != null) { |
| | | BeanUtils.copyProperties(shopStoreDO, shopStoreVO); |
| | | } |
| | | comShopFlowerRefundOrderVO.setConvenientMerchantVO(shopStoreVO); |
| | | return R.ok(comShopFlowerRefundOrderVO); |
| | | } |
| | | } |
| | |
| | | convenientElevatingPointDOS.forEach(f -> { |
| | | ConvenientElevatingPointVO convenientElevatingPointVO = new ConvenientElevatingPointVO(); |
| | | BeanUtils.copyProperties(f, convenientElevatingPointVO); |
| | | Double distance = MapDistance.distanceOfTwoPoints(lng, lat, f.getLon(), f.getLat()); |
| | | Double distance = MapDistance.distanceOfTwoPoints(lat, lng, f.getLon(), f.getLat()); |
| | | convenientElevatingPointVO.setDistance(distance); |
| | | convenientElevatingPointVOS.add(convenientElevatingPointVO); |
| | | }); |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | import static org.apache.commons.lang3.StringUtils.isNotBlank; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.exceptions.ServiceException; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.DisableOrEnableConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ExportMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.ResetPasswordConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.dtos.community.convenient.*; |
| | | import com.panzhihua.common.model.dtos.grid.EventGridMemberPassResetDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientConsultationStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductSpecificationVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientProductVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ExportMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.*; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientConsultationStatisticsDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientMerchantDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientProductDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientServiceCategoryDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientViewStatisticsDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientConsultationStatisticsDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientMerchantDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientServiceCategoryDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientViewStatisticsDO; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ConvenientMerchantService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | import static org.apache.commons.lang3.StringUtils.isNotBlank; |
| | | |
| | | /** |
| | | * @title: ConvenientMerchantServiceImpl |
| | |
| | | private ConvenientConsultationStatisticsDAO convenientConsultationStatisticsDAO; |
| | | @Resource |
| | | private ConvenientViewStatisticsDAO convenientViewStatisticsDAO; |
| | | @Resource |
| | | private ComShopFlowerEvaluateDAO comShopFlowerEvaluateDAO; |
| | | |
| | | private static final String DQ="510402"; |
| | | private static final String RHQ="510411"; |
| | | private static final String DQ = "510402"; |
| | | private static final String RHQ = "510411"; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addMerchant(ConvenientMerchantDTO convenientMerchantDTO) { |
| | | //校验微信手机号是否已使用 |
| | | String mobilePhone = convenientMerchantDTO.getMobilePhone(); |
| | | Integer count = this.baseMapper.selectCount(new LambdaQueryWrapper<ConvenientMerchantDO>().eq(ConvenientMerchantDO::getMobilePhone, mobilePhone)); |
| | | if (count > 0) { |
| | | R.fail("该微信手机号:" + mobilePhone + "已被使用!请更换"); |
| | | } |
| | | ConvenientMerchantDO convenientMerchantDO = new ConvenientMerchantDO(); |
| | | BeanUtils.copyProperties(convenientMerchantDTO, convenientMerchantDO); |
| | | if(convenientMerchantDTO.getCommunityId()==0){ |
| | | if(DQ.equals(convenientMerchantDTO.getAreaCode())){ |
| | | if (convenientMerchantDTO.getCommunityId() == 0) { |
| | | if (DQ.equals(convenientMerchantDTO.getAreaCode())) { |
| | | convenientMerchantDO.setCommunityName("东区社区"); |
| | | }else if(RHQ.equals(convenientMerchantDTO.getAreaCode())){ |
| | | } else if (RHQ.equals(convenientMerchantDTO.getAreaCode())) { |
| | | convenientMerchantDO.setCommunityName("仁和区社区"); |
| | | }else{ |
| | | } else { |
| | | convenientMerchantDO.setCommunityName("西区社区"); |
| | | } |
| | | } |
| | | else { |
| | | } else { |
| | | ComActDO comActDO = comActDAO.selectById(convenientMerchantDTO.getCommunityId()); |
| | | convenientMerchantDO.setCommunityName(comActDO.getName()); |
| | | } |
| | |
| | | List<Long> serviceIds = convenientMerchantDTO.getServiceIds(); |
| | | serviceIds.forEach(serviceId -> { |
| | | ConvenientServiceCategoryDO convenientServiceCategoryDO = convenientServiceCategoryDAO.selectById(serviceId); |
| | | convenientServiceCategoryDAO.createMerchantServiceRelation(Snowflake.getId(),merchantId, serviceId, |
| | | convenientServiceCategoryDAO.createMerchantServiceRelation(Snowflake.getId(), merchantId, serviceId, |
| | | convenientServiceCategoryDO.getName(), convenientMerchantDTO.getCreatedBy()); |
| | | }); |
| | | } |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R putMerchant(ConvenientMerchantDTO convenientMerchantDTO) { |
| | | Long merchantId = convenientMerchantDTO.getId(); |
| | | String mobilePhone = convenientMerchantDTO.getMobilePhone(); |
| | | ConvenientMerchantDO merchantDO = this.baseMapper.selectOne(new LambdaQueryWrapper<ConvenientMerchantDO>().eq(ConvenientMerchantDO::getMobilePhone, mobilePhone)); |
| | | ConvenientMerchantDO convenientMerchantDO = this.baseMapper.selectById(merchantId); |
| | | if (isNull(convenientMerchantDO)) { |
| | | return R.fail("商家不存在"); |
| | | } |
| | | if (nonNull(merchantDO)&&!merchantDO.getId().equals(convenientMerchantDO.getId())) { |
| | | R.fail("该微信手机号:" + mobilePhone + "已被使用!请更换"); |
| | | } |
| | | Long communityId = convenientMerchantDTO.getCommunityId(); |
| | | if (nonNull(communityId)) { |
| | | ComActDO comActDO = comActDAO.selectById(communityId); |
| | | if(comActDO!=null){ |
| | | if (comActDO != null) { |
| | | convenientMerchantDO.setCommunityName(comActDO.getName()); |
| | | } |
| | | else { |
| | | } else { |
| | | convenientMerchantDO.setCommunityName("西区社区"); |
| | | } |
| | | } |
| | |
| | | convenientServiceCategoryDAO.deleteMerchantServiceRelation(merchantId); |
| | | serviceIds.forEach(serviceId -> { |
| | | ConvenientServiceCategoryDO convenientServiceCategoryDO = convenientServiceCategoryDAO.selectById(serviceId); |
| | | convenientServiceCategoryDAO.createMerchantServiceRelation(Snowflake.getId(),merchantId, serviceId, |
| | | convenientServiceCategoryDAO.createMerchantServiceRelation(Snowflake.getId(), merchantId, serviceId, |
| | | convenientServiceCategoryDO.getName(), convenientMerchantDTO.getCreatedBy()); |
| | | }); |
| | | } |
| | |
| | | Page page = new Page<>(); |
| | | page.setSize(pagePopularMerchantDTO.getPageSize()); |
| | | page.setCurrent(pagePopularMerchantDTO.getPageNum()); |
| | | IPage<ConvenientMerchantVO> merchantVOList = this.baseMapper.getPopularMerchants(page, pagePopularMerchantDTO.getCommunityId(), currentMon,pagePopularMerchantDTO.getAreaCode()); |
| | | if(pagePopularMerchantDTO.getPageNum().equals(1L)){ |
| | | IPage<ConvenientMerchantVO> merchantVOList = this.baseMapper.getPopularMerchants(page, pagePopularMerchantDTO.getCommunityId(), currentMon, pagePopularMerchantDTO.getAreaCode()); |
| | | if (pagePopularMerchantDTO.getPageNum().equals(1L)) { |
| | | //金沙江默认第一个 |
| | | List<ConvenientMerchantVO> merchantVOS=new ArrayList<>(); |
| | | ConvenientMerchantVO merchantVO=new ConvenientMerchantVO(); |
| | | List<ConvenientMerchantVO> merchantVOS = new ArrayList<>(); |
| | | ConvenientMerchantVO merchantVO = new ConvenientMerchantVO(); |
| | | merchantVO.setName("金沙江智慧物流商贸城"); |
| | | merchantVO.setLogo("https://www.psciio.com//idcard/0694d975ed4d4c49bcfb728a678518f2.jpg"); |
| | | merchantVO.setIntroduction("农产直销、综合商贸、冷链储运、中央厨房、检验检疫、农博会展、总部商务、综合服务。"); |
| | |
| | | merchantVOS.add(merchantVO); |
| | | //第一页默认把犇师傅维修中心加载到第一个 |
| | | List<ConvenientMerchantVO> merchantList = this.baseMapper.selectMerchantByName(pagePopularMerchantDTO.getCommunityId(), currentMon); |
| | | if(merchantList != null && merchantList.size() > 0){ |
| | | if (merchantList != null && merchantList.size() > 0) { |
| | | merchantVOS.addAll(merchantList); |
| | | merchantVOS.addAll(merchantVOList.getRecords()); |
| | | merchantVOList.setRecords(merchantVOS); |
| | |
| | | |
| | | /** |
| | | * 小程序获取商家详情 |
| | | * |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 定时任务每隔半小时将商家浏览量和咨询量总值计入指定商家数据中 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * check商家/店铺是否有效 |
| | | * |
| | | * @param userId |
| | | * @return |
| | | */ |
| | |
| | | @Override |
| | | public R getMerchantByUserId(Long userId) { |
| | | ConvenientMerchantVO convenientMerchantVO = this.baseMapper.selectMerchantByUserId(userId); |
| | | if (nonNull(convenientMerchantVO)){ |
| | | if (nonNull(convenientMerchantVO)) { |
| | | List<Long> serviceIds = convenientServiceCategoryDAO.selectServiceIdsForMerchant(convenientMerchantVO.getId()); |
| | | convenientMerchantVO.setServiceIds(serviceIds); |
| | | } |
| | | BigDecimal score = comShopFlowerEvaluateDAO.statisticsScore(convenientMerchantVO.getId()); |
| | | convenientMerchantVO.setScore(null == score ? BigDecimal.ZERO : NumberUtil.round(score, 1)); |
| | | return R.ok(convenientMerchantVO); |
| | | } |
| | | } |
| | |
| | | GROUP BY ccep.id |
| | | |
| | | </select> |
| | | <select id="selectOrderNum" |
| | | resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointVO"> |
| | | SELECT ccep.*,count(csfo.id) delivery_order_num ,sum(og.amount) delivery_goods_num |
| | | FROM com_convenient_elevating_point ccep |
| | | LEFT JOIN com_shop_flower_order csfo ON ccep.id = csfo.point_id |
| | | LEFT JOIN com_shop_flower_order_goods og ON og.order_id = csfo.id |
| | | WHERE |
| | | csfo.`status` = 1 |
| | | <if test="pageComFlowerOrderListDTO.storeId != null"> |
| | | and csfo.store_id = #{pageComFlowerOrderListDTO.storeId} |
| | | </if> |
| | | <if test="pageComFlowerOrderListDTO.pointId != null"> |
| | | and ccep.id = #{pageComFlowerOrderListDTO.pointId} |
| | | </if> |
| | | GROUP BY ccep.id |
| | | </select> |
| | | </mapper> |
| | |
| | | evaluate_pic, create_at |
| | | </sql> |
| | | <select id="pageEvaluate" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerEvaluateVO"> |
| | | select * from com_shop_flower_evaluate where 1=1 |
| | | select e.*,u.nick_name,u.image_url FROM com_shop_flower_evaluate e left join sys_user u on e.user_id = u.user_id |
| | | where 1=1 |
| | | <if test="pageComShopFlowerEvaluateDTO.goodsId != null"> |
| | | and goods_id = #{pageComShopFlowerEvaluateDTO.goodsId} |
| | | </if> |
| | |
| | | </if> |
| | | </select> |
| | | <select id="selectListLimit" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerEvaluateVO"> |
| | | SELECT * FROM com_shop_flower_evaluate WHERE goods_id = #{goodsId} ORDER BY create_at LIMIT 3 |
| | | SELECT e.*,u.nick_name,u.image_url FROM com_shop_flower_evaluate e left join sys_user u on e.user_id = u.user_id WHERE e.goods_id = #{goodsId} ORDER BY create_at LIMIT 3 |
| | | </select> |
| | | <select id="selectByOrderNo" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerEvaluateVO"> |
| | | SELECT * FROM com_shop_flower_evaluate WHERE order_no = #{orderNo} |
| | | SELECT e.*,u.nick_name,u.image_url FROM com_shop_flower_evaluate e left join sys_user u on e.user_id = u.user_id WHERE e.order_no = #{orderNo} |
| | | </select> |
| | | <select id="statisticsScore" resultType="java.math.BigDecimal"> |
| | | SELECT (sum(e.evaluate_type)/count(1)) AS pf FROM `com_shop_flower_evaluate` e LEFT JOIN com_shop_flower_goods g ON e.goods_id = g.id WHERE g.store_id = #{storeId} GROUP BY g.store_id |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | left join com_convenient_merchants as css on css.id = csg.store_id |
| | | left join com_convenient_goods_scope as cgs on cgs.goods_id = csg.id |
| | | where 1=1 and csg.delete_status = 1 and |
| | | css.`business_status` = 0 |
| | | css.`business_status` = 1 |
| | | <if test='comShopFlowerGoodsDTO.name != null and comShopFlowerGoodsDTO.name !=""'> |
| | | AND csg.`name` like concat('%',#{comShopFlowerGoodsDTO.name},'%') |
| | | </if> |
| | | <if test='comShopFlowerGoodsDTO.status != null '>AND csg.`status` = #{comShopFlowerGoodsDTO.status}</if> |
| | | <if test='comShopFlowerGoodsDTO.storeId != null '>AND csg.store_id = #{comShopFlowerGoodsDTO.storeId}</if> |
| | | <if test='comShopFlowerGoodsDTO.status != null '>AND csg.status = #{comShopFlowerGoodsDTO.status}</if> |
| | | <if test='comShopFlowerGoodsDTO.deliveryType != null '>AND csg.delivery_type = #{comShopFlowerGoodsDTO.deliveryType}</if> |
| | | <if test='comShopFlowerGoodsDTO.deliveryType != null '>AND csg.delivery_type like concat('%',#{comShopFlowerGoodsDTO.deliveryType},'%') </if> |
| | | <if test='comShopFlowerGoodsDTO.categoriesId != null '>AND cgs.goods_category_id = #{comShopFlowerGoodsDTO.categoriesId}</if> |
| | | order by sale desc,create_at desc |
| | | </select> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComShopFlowerGoodsViewStatisticsDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComShopFlowerGoodsViewStatisticsDO"> |
| | | <id column="id" property="id" /> |
| | | <id column="goods_id" property="goodsId" /> |
| | | <id column="statistic_date" property="statisticDate" /> |
| | | <id column="view_num" property="viewNum" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,goods_id,statistic_date,view_num |
| | | </sql> |
| | | <insert id="createTodayStatistic"> |
| | | INSERT INTO com_shop_flower_goods_view_statistics (goods_id, statistic_date) VALUES (#{goodsId}, NOW()) |
| | | </insert> |
| | | <update id="incrViewNum"> |
| | | UPDATE com_shop_flower_goods_view_statistics SET view_num = view_num + 1 |
| | | WHERE goods_id = #{goodsId} AND statistic_date = #{nowDate} |
| | | </update> |
| | | <select id="selectMonthViewNum" resultType="java.lang.Integer"> |
| | | SELECT IF(SUM(view_num) IS NULL,0,SUM(view_num)) |
| | | FROM com_shop_flower_goods_view_statistics |
| | | WHERE goods_id = #{goodsId} AND (statistic_date LIKE CONCAT(#{moth}, '%') OR statistic_date IS NULL) |
| | | </select> |
| | | <select id="selectDayViewNum" resultType="java.lang.Integer"> |
| | | SELECT IF(SUM(view_num) IS NULL,0,SUM(view_num)) |
| | | FROM com_shop_flower_goods_view_statistics |
| | | WHERE goods_id = #{goodsId} AND (statistic_date = #{day} OR statistic_date IS NULL) |
| | | </select> |
| | | <select id="selectSumForViewNum" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO"> |
| | | SELECT goods_id, SUM(view_num) AS totalViewNum |
| | | FROM com_shop_flower_goods_view_statistics GROUP BY goods_id |
| | | </select> |
| | | <select id="selectTotalViewNum" resultType="java.lang.Integer"> |
| | | SELECT IF(SUM(view_num) IS NULL,0,SUM(view_num)) |
| | | FROM com_shop_flower_goods_view_statistics |
| | | WHERE goods_id = #{goodsId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="refund_time" jdbcType="TIMESTAMP" property="refundTime"/> |
| | | <result column="delivery_id" jdbcType="TIMESTAMP" property="deliveryId"/> |
| | | <result column="delivery_no" jdbcType="TIMESTAMP" property="deliveryNo"/> |
| | | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | |
| | | |
| | | <select id="pageOrderList" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerOrderPageVO"> |
| | | select id as orderId,order_no,store_id,`status`,pay_status,receiver_id,total_amount as |
| | | orderTotal,pay_amount,delivery_type,remark,create_at from com_shop_flower_order as cso where 1=1 and |
| | | cso.delete_status = 1 |
| | | and cso.user_id = #{comOrderListDTO.userId} <if test='comOrderListDTO.status != null'>AND cso.status = |
| | | #{comOrderListDTO.status} |
| | | </if> order by create_at desc |
| | | orderTotal,pay_amount,delivery_type,remark,create_at from com_shop_flower_order as cso |
| | | where cso.delete_status = 1 |
| | | <if test="comOrderListDTO.userId != null"> |
| | | and cso.user_id = #{comOrderListDTO.userId} |
| | | </if> |
| | | <if test='comOrderListDTO.status != null'> |
| | | AND cso.status = #{comOrderListDTO.status} |
| | | </if> |
| | | order by create_at desc |
| | | </select> |
| | | |
| | | <select id="pageOrderListNoDelivery" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerOrderPageVO"> |
| | | select id as orderId,order_no,store_id,`status`,pay_status,receiver_id,total_amount as |
| | | orderTotal,pay_amount,delivery_type,remark,create_at from com_shop_flower_order as cso where 1=1 and |
| | | select cso.id as orderId,cso.order_no,cso.store_id,cso.`status`,cso.pay_status,cso.receiver_id,cso.total_amount as |
| | | orderTotal,cso.pay_amount,cso.delivery_type,cso.remark,cso.create_at , g.goods_name,g.goods_attr_name,g.amount,g.goods_attr_price, |
| | | g.goods_attr_pic |
| | | from com_shop_flower_order as cso LEFT JOIN com_shop_flower_order_goods g ON cso.id = g.order_id |
| | | where 1=1 and |
| | | cso.delete_status = 1 and cso.status = 1 and cso.delivery_type = 1 |
| | | <if test='comOrderListDTO.pointId != null'>AND cso.point_id = #{comOrderListDTO.pointId} |
| | | <if test='comOrderListDTO.pointId != null'> |
| | | AND cso.point_id = #{comOrderListDTO.pointId} |
| | | </if> |
| | | order by create_at desc |
| | | </select> |
| | |
| | | <if test='pageComShopOrderSearchDTO.deliveryType != null '> |
| | | AND sr.delivery_type = #{pageComShopOrderSearchDTO.deliveryType} |
| | | </if> |
| | | <if test="pageComShopOrderSearchDTO.keyWord != null and pageComShopOrderSearchDTO.keyWord != ''"> |
| | | AND (ss.name like concat('%',#{pageComShopOrderSearchDTO.keyWord}, '%') |
| | | OR sr.order_no like concat('%',#{pageComShopOrderSearchDTO.keyWord}, '%') |
| | | OR og.goods_name like concat('%',#{pageComShopOrderSearchDTO.keyWord}, '%') |
| | | ) |
| | | </if> |
| | | GROUP BY sr.id ORDER BY sr.create_at DESC |
| | | </select> |
| | | <update id="updateOrder"> |
| | |
| | | a.province_name, |
| | | a.city_name, |
| | | a.district_name, |
| | | a.detail_address |
| | | a.detail_address, |
| | | o.point_id |
| | | FROM |
| | | com_shop_flower_order o |
| | | LEFT JOIN com_shop_flower_order_goods g ON o.id = g.order_id |
| | | LEFT JOIN com_shop_flower_user_address a ON a.id = o.receiver_id |
| | | WHERE 1=1 and o.delivery_type = 2 |
| | | WHERE 1=1 |
| | | <if test="comOrderListDTO.deliveryType != null"> |
| | | and o.delivery_type = #{comOrderListDTO.deliveryType} |
| | | </if> |
| | | <if test="comOrderListDTO.storeId != null"> |
| | | and o.store_id = #{comOrderListDTO.storeId} |
| | | </if> |
| | | <if test="comOrderListDTO.deliveryId != null"> |
| | | and o.delivery_id = #{comOrderListDTO.deliveryId} |
| | | </if> |
| | | |
| | | </select> |
| | | <select id="pageOrderByDeliveryNo" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerOrderStoreListVO"> |
| | | SELECT |
| | | o.id order_id, |
| | | o.order_no, |
| | | o.delivery_type, |
| | | o.`status`, |
| | | g.goods_name, |
| | | g.goods_attr_name, |
| | | g.amount, |
| | | g.goods_attr_price, |
| | | g.goods_attr_pic, |
| | | o.total_amount, |
| | | a.`name`, |
| | | a.phone, |
| | | a.province_name, |
| | | a.city_name, |
| | | a.district_name, |
| | | a.detail_address, |
| | | o.point_id |
| | | FROM |
| | | com_shop_flower_order o |
| | | LEFT JOIN com_shop_flower_order_goods g ON o.id = g.order_id |
| | | LEFT JOIN com_shop_flower_user_address a ON a.id = o.receiver_id |
| | | WHERE 1=1 and o.delivery_type = 1 |
| | | <if test="comOrderListDTO.storeId != null"> |
| | | and o.store_id = #{comOrderListDTO.storeId} |
| | | </if> |
| | | <if test="comOrderListDTO.deliveryId != null"> |
| | | and o.delivery_id = #{comOrderListDTO.deliveryId} |
| | | </if> |
| | | |
| | | </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()) |
| | | SELECT count(1) as count_num,'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> |
| | |
| | | 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') |
| | | SELECT count(1) as count_num,'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> |
| | |
| | | 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()) |
| | | SELECT count(1) as count_num,'yearCount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | union all |
| | | SELECT count(1) as count,'allCount' as count_name FROM com_shop_flower_order WHERE 1=1 |
| | | SELECT count(1) as count_num,'allCount' as count_name FROM com_shop_flower_order WHERE 1=1 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </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) |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'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) |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'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) |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'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) |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'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> |
| | | <select id="selectTurnover" resultType="java.math.BigDecimal"> |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num FROM com_shop_flower_order WHERE `status` not in (6,7) and store_id = #{storeId} |
| | | </select> |
| | | <select id="selectSettlement" resultType="java.math.BigDecimal"> |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num FROM com_shop_flower_order WHERE `status` in (4,5) and create_at <= date_sub(now(), INTERVAL 15 DAY) |
| | | </select> |
| | | <select id="selectSumOrderAndAmountByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdNumVO"> |
| | | SELECT count(1) count_num ,'pddd' as count_name FROM `com_shop_flower_order` WHERE delivery_type =1 and delete_status = 1 and pay_status = 2 and store_id = #{storeId} |
| | | union all |
| | | SELECT count(1) count_num ,'kddd' as count_name FROM `com_shop_flower_order` WHERE delivery_type =2 and delete_status = 1 and pay_status = 2 and store_id = #{storeId} |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) count_num ,'yysr' as count_name FROM `com_shop_flower_order` WHERE `status` not in (6,7) and store_id = #{storeId} |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) count_num ,'tkje' as count_name FROM `com_shop_flower_order` WHERE `status` in (6,7) and store_id = #{storeId} |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) count_num ,'ktxje' as count_name FROM `com_shop_flower_order` WHERE `status` in (4,5) and create_at <= date_sub(now(), INTERVAL 15 DAY) and store_id = #{storeId} |
| | | </select> |
| | | <select id="selectCountOrderDayByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> |
| | | SELECT count(1) count_num, date_format(create_at,'%Y-%m-%d') as count_name FROM com_shop_flower_order |
| | | WHERE date_format(create_at,'%Y-%m-%d') >= date_format(date_sub(now(), INTERVAL #{days} DAY),'%Y-%m-%d') |
| | | and store_id = #{storeId} |
| | | GROUP BY count_name |
| | | </select> |
| | | <select id="selectCountOrderMonthByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> |
| | | SELECT count(1) count_num, date_format(create_at,'%Y-%m') as count_name FROM com_shop_flower_order |
| | | WHERE date_format(create_at,'%Y-%m') >= date_format(now(),'%Y-01') and store_id = #{storeId} GROUP BY count_name |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="service_time" jdbcType="TIMESTAMP" property="serviceTime"/> |
| | | <result column="delivery_type" jdbcType="TINYINT" property="deliveryType"/> |
| | | <result column="point_id" jdbcType="BIGINT" property="pointId"/> |
| | | <result column="point_name" jdbcType="BIGINT" property="pointName"/> |
| | | <result column="point_name" jdbcType="VARCHAR" property="pointName"/> |
| | | <result column="delivery_order_num" jdbcType="INTEGER" property="deliveryOrderNum"/> |
| | | <result column="delivery_goods_num" jdbcType="INTEGER" property="deliveryGoodsNum"/> |
| | | <result column="delivery_amount" jdbcType="DECIMAL" property="deliveryAmount"/> |
| | |
| | | id, order_no, pay_no, wx_trade_no, pay_status, order_amount, pay_amount, pay_time, |
| | | create_at, update_at |
| | | </sql> |
| | | <select id="pageOrderPay" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerOrderPayVO"> |
| | | SELECT * FROM `com_shop_flower_order_pay` WHERE 1=1 |
| | | <if test="pageComShopFlowerOrderPayDTO.type != null and pageComShopFlowerOrderPayDTO.type == 1"> |
| | | and pay_type = 1 OR (pay_type = 2 and refund_status = 3) |
| | | </if> |
| | | <if test="pageComShopFlowerOrderPayDTO.type != null and pageComShopFlowerOrderPayDTO.type == 2"> |
| | | and pay_type = 2 |
| | | </if> |
| | | <if test="pageComShopFlowerOrderPayDTO.storeId != null"> |
| | | and store_id = #{pageComShopFlowerOrderPayDTO.storeId} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="update_at" jdbcType="TIMESTAMP" property="updateAt" /> |
| | | <result column="handle_time" jdbcType="TIMESTAMP" property="handleTime" /> |
| | | <result column="refund_time" jdbcType="TIMESTAMP" property="refundTime" /> |
| | | <result column="cancel_time" jdbcType="TIMESTAMP" property="cancelTime" /> |
| | | <result column="handle_result" jdbcType="VARCHAR" property="handleResult" /> |
| | | <result column="remark" jdbcType="VARCHAR" property="remark" /> |
| | | </resultMap> |
| | |
| | | <!--@mbg.generated--> |
| | | id, store_id, user_id, order_no, order_id, refund_order_no, `status`, delete_status, |
| | | pay_amount, refund_amount, refund_reason, refund_pic, create_at, update_at, handle_time, |
| | | refund_time, handle_result, remark |
| | | refund_time, handle_result, remark,cancel_time |
| | | </sql> |
| | | <select id="pageRefundOrder" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerRefundOrderVO"> |
| | | 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> |
| | | GROUP BY `status` |
| | | </select> |
| | | <update id="updateCancel"> |
| | | update com_shop_flower_refund_order set `status` = #{status},cancel_time = NOW() where id = #{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | <id column="id_card" property="idCard" /> |
| | | <id column="phone" property="phone" /> |
| | | <id column="address" property="address" /> |
| | | <id column="address" property="address" /> |
| | | <id column="detailed_address" property="detailedAddress" /> |
| | | <id column="lat" property="lat" /> |
| | | <id column="lon" property="lon" /> |
| | | <id column="begin_at" property="beginAt" /> |
| | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,`name`,community_id,community_name,logo,contacts,id_card,phone,address,lat,lon,begin_at,end_at,period,introduction, |
| | | business_status,user_id,consultation_volume,is_del,created_at,created_by,updated_at,updated_by,area_code,service_range,mobile_phone |
| | | business_status,user_id,consultation_volume,is_del,created_at,created_by,updated_at,updated_by,area_code,service_range,mobile_phone,detailed_address |
| | | </sql> |
| | | <select id="pageMerchant" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT ccm.*, su.account, su.status AS accountStatus, GROUP_CONCAT(ccss.service_name) AS serviceScope |
| | |
| | | </select> |
| | | <select id="getMerchantDetail" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT |
| | | temp.id, temp.name, temp.introduction, temp.logo, temp.phone, temp.begin_at, temp.end_at, temp.period, |
| | | temp.id, temp.name, temp.introduction, temp.logo, temp.phone, temp.begin_at, temp.end_at, temp.period,temp.detailed_address, |
| | | temp.address, temp.lat, temp.lon, temp.serviceScope, IF(SUM(temp.consultation_volume) is null,0,SUM(temp.consultation_volume)) as monthConsultationVolume |
| | | FROM ( |
| | | SELECT |
| | | ccm.id, ccm.name, ccm.introduction, ccm.logo, ccm.phone, ccm.begin_at, ccm.end_at, ccm.period, |
| | | ccm.id, ccm.name, ccm.introduction, ccm.logo, ccm.phone, ccm.begin_at, ccm.end_at, ccm.period,ccm.detailed_address, |
| | | ccm.address, ccm.lat, ccm.lon, cccs.consultation_volume,GROUP_CONCAT(ccss.service_name) AS serviceScope |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) cccs ON ccm.id = cccs.merchant_id |
| | |
| | | </select> |
| | | <select id="pageSearchMerchant" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT |
| | | temp.id, temp.name, temp.introduction, temp.logo, |
| | | temp.id, temp.name, temp.introduction, temp.logo,temp.detailed_address, |
| | | temp.serviceScope, IF(SUM(temp.consultation_volume) is null,0,SUM(temp.consultation_volume)) as monthConsultationVolume |
| | | FROM ( |
| | | SELECT |
| | | ccm.id, ccm.name, ccm.introduction, ccm.logo, |
| | | ccm.id, ccm.name, ccm.introduction, ccm.logo,ccm.detailed_address, |
| | | cccs.consultation_volume,GROUP_CONCAT(ccss.service_name) AS serviceScope |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) cccs ON ccm.id = cccs.merchant_id |
| | |
| | | ccm.name LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%') |
| | | OR ccm.address LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%') |
| | | OR ccm.phone LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%') |
| | | OR ccm.detailed_address LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%') |
| | | ) |
| | | </if> |
| | | GROUP BY ccm.id |
| | |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidMemberVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopUserAddressVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | DataKanbanDTO selectCommunityAddUserOrder(@Param("areaCode") String areaCode, @Param("date1") Date date1); |
| | | |
| | | List<UsersStatisticsDTO> selectDailyAdd(@Param("createAt") String createAt, @Param("appId") String appId); |
| | | List<UsersStatisticsDTO> selectDailyAdd(@Param("createAt") String createAt, @Param("appId") String appId); |
| | | |
| | | List<UsersStatisticsDTO> selectActive(@Param("lastLoginTime") String lastLoginTime, @Param("appId") String appId); |
| | | |
| | |
| | | |
| | | /** |
| | | * 查询两个appid的用户做更新 |
| | | * |
| | | * @param userId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 是否为党员 |
| | | * */ |
| | | int isDpcMember(@Param("phone") String phone,@Param("name")String name); |
| | | */ |
| | | int isDpcMember(@Param("phone") String phone, @Param("name") String name); |
| | | |
| | | /** |
| | | * 是否为物业公司后台账号 |
| | | * */ |
| | | */ |
| | | Long isPropertyAccount(String phone); |
| | | |
| | | |
| | | String getCommunityAppId(Long communityId); |
| | | |
| | | /** |
| | | * 判读是否为自提点账号 |
| | | * |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | int checkPoint(String phone); |
| | | |
| | | ComShopUserAddressVO selectDefaultAddressVO(@Param("userId") String userId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO; |
| | | import com.panzhihua.common.model.vos.community.microCommercialStreet.McsLoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopUserAddressVO; |
| | | import com.panzhihua.common.model.vos.user.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.*; |
| | |
| | | if (nonNull(propertyAccount)){ |
| | | loginUserInfoVO.setPropertyId(propertyAccount); |
| | | } |
| | | } |
| | | //获取自提点账号 |
| | | if (StrUtil.isNotBlank(sysUserDO.getPhone())){ |
| | | if(userDao.checkPoint(sysUserDO.getPhone()) > 0){ |
| | | loginUserInfoVO.setIsPoint(true); |
| | | }else { |
| | | loginUserInfoVO.setIsPoint(false); |
| | | } |
| | | } |
| | | //默认地址 |
| | | ComShopUserAddressVO comShopUserAddressVO = userDao.selectDefaultAddressVO(userId); |
| | | if (nonNull(comShopUserAddressVO)){ |
| | | loginUserInfoVO.setComShopUserAddressVO(comShopUserAddressVO); |
| | | } |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | |
| | | sysUserDO.setPhone(convenientMerchantDTO.getMobilePhone()); |
| | | sysUserDO.setName(convenientMerchantDTO.getContacts()); |
| | | sysUserDO.setPassword(encode); |
| | | sysUserDO.setAppId("wx118de8a734d269f0"); |
| | | try { |
| | | userDao.insert(sysUserDO); |
| | | return R.ok(sysUserDO.getUserId()); |
| | |
| | | <select id="selectByUserId" resultMap="BaseResultMap"> |
| | | SELECT u1.* FROM sys_user u1 WHERE u1.phone = (SELECT phone FROM sys_user u2 WHERE u2.user_id=#{userId}) AND u1.app_id in ('wx118de8a734d269f0','wx0cef797390444b75') |
| | | </select> |
| | | <select id="checkPoint" resultType="int"> |
| | | select count(1) from com_convenient_elevating_point where wechat_account = #{phone} and business_status = 1 and is_del = 0 |
| | | </select> |
| | | <select id="selectDefaultAddressVO" resultType="com.panzhihua.common.model.vos.shop.ComShopUserAddressVO"> |
| | | select * from com_shop_flower_user_address where user_id = #{userId} and is_default = 1 and delete_status = 2 |
| | | </select> |
| | | |
| | | </mapper> |