| | |
| | | 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; |
| | |
| | | @PutMapping("/merchant/put") |
| | | public R putMerchant(@RequestBody @Validated(PutGroup.class) ConvenientMerchantDTO convenientMerchantDTO) { |
| | | convenientMerchantDTO.setUpdatedBy(this.getUserId()); |
| | | convenientMerchantDTO.setCreatedBy(this.getUserId()); |
| | | return communityService.putMerchant(convenientMerchantDTO); |
| | | } |
| | | |
| | |
| | | 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); |
| | | return communityService.orderDetailFlower(orderId,null); |
| | | } |
| | | |
| | | @ApiOperation(value = "自提点查询订单详情", response = ComShopFlowerOrderPageVO.class) |
| | | @GetMapping("pointOrderDetail") |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", required = true) |
| | | public R pointOrderDetail(@RequestParam("orderId") Long orderId) { |
| | | String phone = this.getLoginUserInfo().getPhone(); |
| | | return communityService.orderDetailFlower(orderId,phone); |
| | | } |
| | | |
| | | @ApiOperation(value = "取消订单") |
| | |
| | | } |
| | | |
| | | @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 = "订单确认收货") |
| | |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取自提点") |
| | | @ApiOperation(value = "获取自提点",response = ConvenientElevatingPointVO.class) |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "merchantId", value = "商家Id", required = true), |
| | | @ApiImplicitParam(name = "lat", value = "经度", required = true), @ApiImplicitParam(name = "lng", value = "纬度", required = true)}) |
| | | @GetMapping("/point/findPointByMerchantId") |
| | | public R findPointByMerchantId(@RequestParam("merchantId") Long merchantId, @RequestParam("lat") String lat, @RequestParam("lng") String lng) { |
| | | return communityService.findPointByMerchantId(merchantId, lat, lng); |
| | | } |
| | | /** |
| | | * 获取商家周围 n(km)的自提点数量 |
| | | * |
| | | * @param distance |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取商家周围 n(km)的自提点数量") |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "distance", value = "距离", required = false), |
| | | @ApiImplicitParam(name = "lat", value = "经度", required = true), @ApiImplicitParam(name = "lng", value = "纬度", required = true)}) |
| | | @GetMapping("/point/findPointNumByDistance") |
| | | public R findPointNumByDistance(@RequestParam(value = "distance",required = false) Integer distance, @RequestParam("lat") String lat, @RequestParam("lng") String lng) { |
| | | if (null == distance){ |
| | | return R.ok(0); |
| | | } |
| | | return communityService.findPointNumByDistance(distance, lat, lng); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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); |
| | |
| | | @PostMapping("createRefundOrder") |
| | | @ApiOperation(value = "创建退款订单") |
| | | public R createRefundOrder(@RequestBody ComShopFlowerRefundOrderDTO comShopFlowerRefundOrderDTO) { |
| | | comShopFlowerRefundOrderDTO.setUserId(this.getUserId()); |
| | | return communityService.createRefundOrder(comShopFlowerRefundOrderDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "退款订单分页查询 用户", response = ComShopFlowerRefundOrderVO.class) |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO) { |
| | | pageComOrderRefundDTO.setUserId(this.getUserId()); |
| | | return communityService.pageRefundOrder(pageComOrderRefundDTO); |
| | | } |
| | | |
| | | /** |
| | | * 商家 分页查询退款订单 |
| | | * |
| | | * @param pageComOrderRefundDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("pageRefundOrderStore") |
| | | @ApiOperation(value = "退款订单分页查询 商家", response = ComShopFlowerRefundOrderVO.class) |
| | | public R pageRefundOrderStore(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | pageComOrderRefundDTO.setStoreId(loginUserInfo.getStoreIdId()); |
| | | return communityService.pageRefundOrder(pageComOrderRefundDTO); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 订单发货 |
| | | * |
| | | * @param orderShipDTO 发货信息 |
| | | * @return 发货结果 |
| | | */ |
| | | @PostMapping("/shipOrderFlower") |
| | | @ApiOperation(value = "订单发货") |
| | | public R shipOrderFlower(@RequestBody ComShopOrderShipDTO orderShipDTO) { |
| | | orderShipDTO.setOperUserAccount(this.getLoginUserInfo().getAccount()); |
| | | return communityService.shipOrderFlower(orderShipDTO); |
| | | } |
| | | } |