| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.order.service.order.ConsumerGoodsService; |
| | | import com.ruoyi.order.service.order.OrderService; |
| | | import com.ruoyi.order.service.order.UserServiceRecordService; |
| | | import com.ruoyi.system.api.domain.dto.BirthdayGiftSendDto; |
| | | import com.ruoyi.system.api.domain.dto.BoardMemberTotalDto; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBasePlatformDto; |
| | | import com.ruoyi.system.api.domain.poji.goods.Goods; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import com.ruoyi.system.api.model.AddOrderVo; |
| | | import com.ruoyi.system.api.service.RemoteGoodsService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private ConsumerGoodsService consumerGoodsService; |
| | | |
| | | @Resource |
| | | private UserServiceRecordService userServiceRecordService; |
| | | |
| | | @Resource |
| | | private RemoteGoodsService remoteGoodsService; |
| | | |
| | | |
| | | @PostMapping("/getAppOrderTotal") |
| | |
| | | */ |
| | | @PostMapping("/autoCancelOrder") |
| | | public R autoCancelOrder(@RequestBody String orderId){ |
| | | orderService.autoCancelOrder(orderId); |
| | | orderService.autoCancelOrder(orderId, 1); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | * @param goodsIdList |
| | | * @return |
| | | */ |
| | | @PostMapping("/order/getGoodsSellStatic") |
| | | @PostMapping("/getGoodsSellStatic") |
| | | R<StaticsShopMgtGoodsVO> getGoodsSellStatic(@RequestBody List<String> goodsIdList){ |
| | | StaticsShopMgtGoodsVO vo = orderService.getGoodsSellStatic(goodsIdList); |
| | | vo.setGoodsNum(goodsIdList.size()); |
| | | return R.ok(vo); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取今日到店用户 |
| | | * @param shopId |
| | | * @return |
| | | */ |
| | | @PostMapping("/countShopServicePerson") |
| | | public R<List<Integer>> countShopServicePerson(@RequestParam("shopId") Long shopId){ |
| | | List<Integer> list = userServiceRecordService.countShopServicePerson(shopId); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 抽奖的平台商品生成订单--待审核 |
| | | * @param orderVo |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/addOrder", method = RequestMethod.POST) |
| | | public R addOrder(@RequestBody AddOrderVo orderVo){ |
| | | Goods goods = null; |
| | | if(null != orderVo.getGoodsId()){ |
| | | goods = remoteGoodsService.getGoods(orderVo.getGoodsId()).getData(); |
| | | } |
| | | orderService.addOrder(orderVo.getShopId(), orderVo.getUserId(), goods, orderVo.getGoodsName(), orderVo.getGoodsNum(), orderVo.getId(), 2); |
| | | return R.ok(); |
| | | } |
| | | } |