diff --git a/src/main/java/com/yxt/yythmall/api/ordorder/OrdOrderQuery.java b/src/main/java/com/yxt/yythmall/api/ordorder/OrdOrderQuery.java index f7ffb3f..356339a 100644 --- a/src/main/java/com/yxt/yythmall/api/ordorder/OrdOrderQuery.java +++ b/src/main/java/com/yxt/yythmall/api/ordorder/OrdOrderQuery.java @@ -13,4 +13,6 @@ public class OrdOrderQuery implements Query { private String endDate; //结束时间 private String customerSid; //总数 private String state; + private String mainSid; + private String payTime; } diff --git a/src/main/java/com/yxt/yythmall/biz/customerstore/CustomerStoreService.java b/src/main/java/com/yxt/yythmall/biz/customerstore/CustomerStoreService.java index 5cbc1dc..f974f95 100644 --- a/src/main/java/com/yxt/yythmall/biz/customerstore/CustomerStoreService.java +++ b/src/main/java/com/yxt/yythmall/biz/customerstore/CustomerStoreService.java @@ -153,7 +153,23 @@ public class CustomerStoreService extends MybatisBaseService().eq("unavailableTime",start)); + i++; + } while (cannotReserveDictionary!=null); + if(i>=5){ + start=""; + } + return start; + } } diff --git a/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordService.java b/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordService.java index 63d8b7e..472cc31 100644 --- a/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordService.java +++ b/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordService.java @@ -66,16 +66,19 @@ public class NewcomerRecoRecordService extends MybatisBaseService().eq("recommendedSid",dto.getCustomerSid())); - if(newcomer!=null){ - return rb.success(); + if(StringUtils.isBlank(dto.getCustomerSid())){ + return rb.setMsg("参数不全"); } if(StringUtils.isBlank(dto.getOrderSid())){ + return rb.setMsg("参数不全"); + } + NewcomerRecoRecord newcomer=baseMapper.selectOne(new QueryWrapper().eq("recommendedSid",dto.getCustomerSid())); + if(newcomer!=null){ return rb.success(); } LpkCustomer customer=lpkCustomerService.getOne(new QueryWrapper().eq("sid",dto.getCustomerSid())); if(null==customer){ - return rb.setMsg("参数不全"); + return rb.setMsg("此用户不存在"); } if(!customer.getIsNewUser().equals("1")){ return rb.setMsg("您不是新人"); @@ -112,6 +115,9 @@ public class NewcomerRecoRecordService extends MybatisBaseService bags=recommendNewUserBagService.list(new QueryWrapper().eq("isGrounding","1")); RecommendNewUserBagVo bagVo=new RecommendNewUserBagVo(); diff --git a/src/main/java/com/yxt/yythmall/biz/ordorder/OrdOrderRest.java b/src/main/java/com/yxt/yythmall/biz/ordorder/OrdOrderRest.java index 0b7742b..f075e44 100644 --- a/src/main/java/com/yxt/yythmall/biz/ordorder/OrdOrderRest.java +++ b/src/main/java/com/yxt/yythmall/biz/ordorder/OrdOrderRest.java @@ -54,4 +54,10 @@ public class OrdOrderRest { public ResultBean changePayState(@PathVariable("sid") String sid) { return ordOrderService.changePayState(sid); } + + @PostMapping("/getPreOrder") + @ApiOperation(value = "获取预下单时间") + public ResultBean getPreOrder(@RequestBody OrdOrderQuery query) { + return ordOrderService.getPreOrder(query); + } } diff --git a/src/main/java/com/yxt/yythmall/biz/ordorder/OrdOrderService.java b/src/main/java/com/yxt/yythmall/biz/ordorder/OrdOrderService.java index bea5e46..58c2e1a 100644 --- a/src/main/java/com/yxt/yythmall/biz/ordorder/OrdOrderService.java +++ b/src/main/java/com/yxt/yythmall/biz/ordorder/OrdOrderService.java @@ -30,6 +30,7 @@ import com.yxt.yythmall.biz.lpkgoods.LpkGoodsService; import com.yxt.yythmall.biz.ordorderdetails.OrdOrderDetailService; import com.yxt.yythmall.biz.shoppingcart.ShoppingCartService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -48,6 +49,7 @@ public class OrdOrderService extends MybatisBaseServicemap =new HashMap<>(); LpkCustomerVo vo= lpkCustomerService.getCustomerInfo(dto.getCustomerSid()).getData(); Map sendBody=buildMessageBody( vo.getSid(), vo.getWxMpOpenid(),dto.getTotalTee(),dto.getOrdOrderDetailsVoList(),OrderUrl); @@ -151,9 +160,17 @@ public class OrdOrderService extends MybatisBaseService ordOrderDetailVos=new ArrayList<>(); ShoppingCartQuery query=new ShoppingCartQuery(); + query.setCustomerSid(dto.getCustomerSid()); query.setBrandId(dto.getBrandId()); List vos=shoppingCartService.shoppingCartList(query).getData(); @@ -262,6 +279,9 @@ public class OrdOrderService extends MybatisBaseService ordOrderDetailVos=new ArrayList<>(); List vos=appletGiftBagService.getGoodsByBagSid(dto.getBagSid()).getData(); @@ -379,6 +399,7 @@ public class OrdOrderService extends MybatisBaseService getOrderDetails(String sid) { ResultBean rb=new ResultBean().fail(); OrdOrderVo pagging = baseMapper.getOrderDetails(sid); + if(StringUtils.isBlank(sid)){ + return rb.setMsg("参数不全"); + } List details=ordOrderDetailService.list(new QueryWrapper().eq("orderSid",pagging.getSid())); if(StringUtils.isBlank(pagging.getMeet())){ pagging.setMeet(pagging.getTotalTee()); @@ -466,6 +490,9 @@ public class OrdOrderService extends MybatisBaseService().eq("sid",sid)); if(order.getPayStatus()==2){ order.setPayStatus(3); @@ -473,6 +500,16 @@ public class OrdOrderService extends MybatisBaseService().eq("mainSid",query.getMainSid())); + order.setCreateTime(DateUtil.parse(query.getPayTime())); + baseMapper.updateById(order); + return rb.success().setData(order); + } /** diff --git a/src/main/java/com/yxt/yythmall/biz/shoppingcart/ShoppingCartService.java b/src/main/java/com/yxt/yythmall/biz/shoppingcart/ShoppingCartService.java index 6d7a421..144d7d2 100644 --- a/src/main/java/com/yxt/yythmall/biz/shoppingcart/ShoppingCartService.java +++ b/src/main/java/com/yxt/yythmall/biz/shoppingcart/ShoppingCartService.java @@ -55,6 +55,12 @@ public class ShoppingCartService extends MybatisBaseService list = baseMapper.selectList(new QueryWrapper().eq("customerSid", dto.getCustomerSid()) .eq("goodsSid", dto.getGoodsSid()) .eq("affiliation", dto.getAffiliation())); @@ -78,6 +84,12 @@ public class ShoppingCartService extends MybatisBaseService> shoppingCartList(ShoppingCartQuery query) { ResultBean rb = ResultBean.fireFail(); ShoppingCart entity = new ShoppingCart(); + if(StringUtils.isBlank(query.getCustomerSid())){ + return rb.setMsg("参数不全"); + } + if(StringUtils.isBlank(query.getBrandId())){ + return rb.setMsg("参数不全"); + } List list = baseMapper.ShoppingCartList(query.getCustomerSid(), query.getBrandId()); list.forEach(s -> { s.setTotalPrice(removeZeros(String.valueOf((Double.valueOf(s.getJPrice()) * Double.valueOf(s.getGoodsNumber()))))); @@ -113,6 +125,12 @@ public class ShoppingCartService extends MybatisBaseService list = baseMapper.ShoppingCartList(query.getCustomerSid(), query.getBrandId()); double price = 0; double standbyPrice =0; diff --git a/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsService.java b/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsService.java index 92d3f30..51c8256 100644 --- a/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsService.java +++ b/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsService.java @@ -71,7 +71,9 @@ public class TransferRecordsService extends MybatisBaseService().eq("transferCode",code)); - + if(null==transferRecords){ + return rb.setMsg("没有找到对应的转赠单号"); + } List list=transferRecordsGoodsDetailsService.list(new QueryWrapper().eq("orderSid",transferRecords.getSid())); for (TransferRecordsGoodsDetails transferRecordsGoodsDetails : list) { LpkGoods k=lpkGoodsService.getOne(new QueryWrapper().eq("sid",transferRecordsGoodsDetails.getGoodsSid())); diff --git a/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderMapper.xml b/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderMapper.xml index 887c78c..e60a171 100644 --- a/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderMapper.xml +++ b/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderMapper.xml @@ -247,8 +247,8 @@ o.userName, o.userPhone, case o.state - when 0 then '未提货' - when 1 then '已提货' + when 0 then '待提菜' + when 1 then '已提菜' end stateValue , case o.affiliation when 1001000 then '百姓菜窖' diff --git a/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderRest.java b/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderRest.java index 72ad850..2bcea21 100644 --- a/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderRest.java +++ b/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderRest.java @@ -28,63 +28,11 @@ public class VegeCellarReserveOrderRest { public ResultBean submission(@RequestBody VegeCellarReserveOrderDto dto) { return vegeCellarReserveOrderService.submission(dto); } -// -// @ApiOperation("订单列表") -// @PostMapping("/orderList") -// public ResultBean> orderList(@RequestBody PagerQuery pq) { -// return vegeCellarReserveOrderService.orderList(pq); -// } -// @ApiOperation("订单门店汇总列表") -// @PostMapping("/orderListByStore") -// public ResultBean> orderListByStore(@RequestBody PagerQuery pq) { -// return vegeCellarReserveOrderService.orderListByStore(pq); -// } -// @ApiOperation("订单门店支行汇总列表") -// @PostMapping("/orderListByBank") -// public ResultBean> orderListByBank(@RequestBody PagerQuery pq) { -// return vegeCellarReserveOrderService.orderListByBank(pq); -// } -// @ApiOperation("订单总汇总列表") -// @PostMapping("/orderListByZ") -// public ResultBean> orderListByZ(@RequestBody PagerQuery pq) { -// return vegeCellarReserveOrderService.orderListByZ(pq); -// } -// @ApiOperation("根据提货卡查询预约记录") -// @GetMapping("/orderByCardSid/{sid}") -// public ResultBean orderByCardSid(@PathVariable("sid") String sid) { -// return vegeCellarReserveOrderService.orderByCardSid(sid); -// } -// + @ApiOperation("移动端预约订单列表") @PostMapping("/orderListByUserSid") public ResultBean> orderListByUserSid(@RequestBody PagerQuery pq) { return vegeCellarReserveOrderService.orderListByUserSid(pq); } -// -// @ApiOperation("预约记录详情") -// @GetMapping("/orderDetails/{orderSid}") -// public ResultBean orderDetails(@PathVariable("orderSid") String orderSid) { -// return vegeCellarReserveOrderService.orderDetails(orderSid); -// } -// -// @ApiOperation(value = "预约订单信息列表导出") -// @PostMapping("/exportExcel") -// public void exportExcel(@RequestBody VegeCellarReserveOrderQuery query) { -// vegeCellarReserveOrderService.exportExcel(query); -// } -// @ApiOperation(value = "预约订单门店汇总导出") -// @PostMapping("/exportExcelByStore") -// public void exportExcelByStore(@RequestBody VegeCellarReserveOrderQuery query) { -// vegeCellarReserveOrderService.exportExcelByStore(query); -// } -// @ApiOperation(value = "预约订单支行汇总导出") -// @PostMapping("/exportExcelByBank") -// public void exportExcelByBank(@RequestBody VegeCellarReserveOrderQuery query) { -// vegeCellarReserveOrderService.exportExcelByBank(query); -// } -// @ApiOperation(value = "预约订单总汇总导出") -// @PostMapping("/exportExcelByZ") -// public void exportExcelByZ(@RequestBody VegeCellarReserveOrderQuery query) { -// vegeCellarReserveOrderService.exportExcelByZ(query); -// } + } diff --git a/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderService.java b/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderService.java index 26cd4e6..2b4a4b2 100644 --- a/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderService.java +++ b/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderService.java @@ -53,7 +53,7 @@ public class VegeCellarReserveOrderService extends MybatisBaseService().eq("mainSid",mainSid)); + if(null==ordOrder){ + return rb.setMsg("此订单不存在"); + } if(ordOrder.getPayStatus()!=2){ return rb.setMsg("此订单不可用"); } diff --git a/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java b/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java index 60bcd31..a47e568 100644 --- a/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java +++ b/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java @@ -75,6 +75,7 @@ public class SaTokenConfigure implements WebMvcConfigurer { //2024-01-17 .excludePathPatterns("/lpkgiftcard/getAllGoodsType/**") .excludePathPatterns("/appletnotice/getNotice") + .excludePathPatterns("/empsreservoorder/getPreOrder") .excludePathPatterns("/lpkgoods/getAllGoodsType/**") .excludePathPatterns("/transferrecords/submission") .excludePathPatterns("/vegetablecellar/receiveTransferGoods")