diff --git a/src/main/java/com/yxt/yythmall/api/appletgiftbag/GiftBagGoodss.java b/src/main/java/com/yxt/yythmall/api/appletgiftbag/GiftBagGoodss.java index ae0aaf6..85b9f8b 100644 --- a/src/main/java/com/yxt/yythmall/api/appletgiftbag/GiftBagGoodss.java +++ b/src/main/java/com/yxt/yythmall/api/appletgiftbag/GiftBagGoodss.java @@ -25,6 +25,7 @@ public class GiftBagGoodss { private String count="0"; //总价值 private String mefenPrice="0"; private boolean showCart=false; + private String prefPrice;//优惠价格 diff --git a/src/main/java/com/yxt/yythmall/api/empcardgift/SaveVegetableVo.java b/src/main/java/com/yxt/yythmall/api/empcardgift/SaveVegetableVo.java new file mode 100644 index 0000000..a2003aa --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/empcardgift/SaveVegetableVo.java @@ -0,0 +1,17 @@ +package com.yxt.yythmall.api.empcardgift; + +import lombok.Data; + +/** + * @author wangpengfei + * @date 2024/1/20 16:27 + */ +@Data +public class SaveVegetableVo { + private String goodsSid; + private String goodsName; + private String goodsNumber; + private String barndId; + private String cetegoryId; + +} diff --git a/src/main/java/com/yxt/yythmall/api/lpkgoods/LpkGoodsQuery.java b/src/main/java/com/yxt/yythmall/api/lpkgoods/LpkGoodsQuery.java index 92db9c9..5d3aa8e 100644 --- a/src/main/java/com/yxt/yythmall/api/lpkgoods/LpkGoodsQuery.java +++ b/src/main/java/com/yxt/yythmall/api/lpkgoods/LpkGoodsQuery.java @@ -14,4 +14,5 @@ public class LpkGoodsQuery implements Query { private String name; private String customerSid; private String affiliation; + private String brandId; } diff --git a/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/OrderGoodsVo.java b/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/OrderGoodsVo.java index 067c42a..cafac92 100644 --- a/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/OrderGoodsVo.java +++ b/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/OrderGoodsVo.java @@ -12,4 +12,5 @@ import lombok.Data; public class OrderGoodsVo implements Vo { private int num; private String goodName; + private String unitName; } diff --git a/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrder.java b/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrder.java index 08230e2..2eddb04 100644 --- a/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrder.java +++ b/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrder.java @@ -26,5 +26,6 @@ public class VegeCellarReserveOrder { private String userPhone; private String userAddress; private String reserveCode; + private String storeName; } diff --git a/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderDto.java b/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderDto.java index f0a25d8..83979a6 100644 --- a/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderDto.java +++ b/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderDto.java @@ -15,6 +15,7 @@ public class VegeCellarReserveOrderDto implements Dto { private String customerSid; private String reserveDate; private String storeSid; + private String storeName; private String userName; private String userPhone; private String userAddress; diff --git a/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderQuery.java b/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderQuery.java index 93116ef..f2c4678 100644 --- a/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderQuery.java +++ b/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderQuery.java @@ -14,8 +14,10 @@ public class VegeCellarReserveOrderQuery implements Query { private String startDate; //预约开始日期 private String endDate; // 预约结束日期 private String userSid; + private String customerSid; private String storeSid; private String bankSid; private String bankName; private String serialNumber; + private String state; } diff --git a/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderVo.java b/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderVo.java index 495a738..8bce0fa 100644 --- a/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderVo.java +++ b/src/main/java/com/yxt/yythmall/api/vegecallerreserveorder/VegeCellarReserveOrderVo.java @@ -36,4 +36,8 @@ public class VegeCellarReserveOrderVo implements Vo { private String linkPhone; private String address; private String cardType; + private String goodss; + private String stateValue; + private String affiliationValue; + private String reserveCode; } diff --git a/src/main/java/com/yxt/yythmall/api/vegetablecellar/VegetableCellarDto.java b/src/main/java/com/yxt/yythmall/api/vegetablecellar/VegetableCellarDto.java index e593ec1..b22fd8c 100644 --- a/src/main/java/com/yxt/yythmall/api/vegetablecellar/VegetableCellarDto.java +++ b/src/main/java/com/yxt/yythmall/api/vegetablecellar/VegetableCellarDto.java @@ -26,4 +26,5 @@ public class VegetableCellarDto implements Dto { private String totalNumber; private List vos; private String transferSid;//转赠sid + private String brandId;//转赠sid } diff --git a/src/main/java/com/yxt/yythmall/api/vegetablecellar/vegeVo.java b/src/main/java/com/yxt/yythmall/api/vegetablecellar/vegeVo.java index d381a9a..5542f65 100644 --- a/src/main/java/com/yxt/yythmall/api/vegetablecellar/vegeVo.java +++ b/src/main/java/com/yxt/yythmall/api/vegetablecellar/vegeVo.java @@ -9,5 +9,6 @@ import lombok.Data; @Data public class vegeVo { private String goodsSid; + private String brandId; private String goodsNumber; } diff --git a/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.java b/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.java index f86ef2a..2610c76 100644 --- a/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.java +++ b/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.yxt.yythmall.api.appletgiftbag.AppletGiftBag; import com.yxt.yythmall.api.appletgiftbag.AppletGiftBagVo; +import com.yxt.yythmall.api.appletgiftbag.GiftBagGoodss; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -22,6 +23,6 @@ public interface AppletGiftBagMapper extends BaseMapper { IPage giftBagListPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); List giftBagList(); - List giftBagGoodsList(); + List giftBagGoodsList(@Param("sid")String sid ); int saveBags(@Param("bags") List bags); } diff --git a/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.xml b/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.xml index f646dfb..3133f22 100644 --- a/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.xml +++ b/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.xml @@ -35,10 +35,22 @@ where isGrounding=1 order by isRecommend desc,createTime desc - select - a.sid as sid ,s.sid as goodsSid,s.goodsNumber as count - from applet_giftbag a left join applet_giftbag_goods s on s.giftbagSid=a.sid + s.goodsNumber as goodsNumber, + d.`name` , + d.unitName, + d.price as jPrice, + d.price as price, + d.picUrl as iconUrl, + d.specificationUnit, + d.isAppletGrounding, + d.content as remark, + d.weight, + d.sid as goodsSid + from applet_giftbag a + left join applet_giftbag_goods s on s.giftbagSid=a.sid + left join lpk_goods d on d.sid=s.goodsSid where a.sid=#{sid} \ No newline at end of file diff --git a/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagRest.java b/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagRest.java index 69496c2..bc7d144 100644 --- a/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagRest.java +++ b/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagRest.java @@ -6,6 +6,7 @@ import com.yxt.common.core.vo.PagerVo; import com.yxt.yythmall.api.appletgiftbag.AppletGiftBagDto; import com.yxt.yythmall.api.appletgiftbag.AppletGiftBagQuery; import com.yxt.yythmall.api.appletgiftbag.AppletGiftBagVo; +import com.yxt.yythmall.api.lpkgiftcard.LpkGiftCardQuery; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -75,4 +76,9 @@ public class AppletGiftBagRest { public ResultBean recommendRecord(@PathVariable("sid") String sid) { return AppletGiftBagService.recommendRecord(sid); } + @ApiOperation("新人专属购买礼包") + @PostMapping("/newUserQuota") + public ResultBean newUserQuota() { + return AppletGiftBagService.newUserQuota(); + } } diff --git a/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagService.java b/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagService.java index 78c1ab1..56ef1c3 100644 --- a/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagService.java +++ b/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagService.java @@ -15,6 +15,7 @@ import com.yxt.yythmall.api.appletgiftbag.*; import com.yxt.yythmall.api.appletgiftbaggoods.AppletGiftBagGoods; import com.yxt.yythmall.api.appletgiftbag.GiftBagGoods; import com.yxt.yythmall.api.appletgiftbag.recommendRecord; +import com.yxt.yythmall.api.lpkgiftcard.LpkGiftCardQuery; import com.yxt.yythmall.api.lpkgoods.LpkGoods; import com.yxt.yythmall.biz.appletgiftbaggoods.AppletGiftBagGoodsService; import com.yxt.yythmall.biz.lpkgoods.LpkGoodsService; @@ -23,6 +24,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; +import java.math.RoundingMode; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -264,4 +266,34 @@ public class AppletGiftBagService extends MybatisBaseService giftBagGoodss=baseMapper.getAllGoodsApplets(query); + + List s=baseMapper.giftBagGoodsList("e49555f2-5370-45b0-9637-aa4d54c22e31"); + for (GiftBagGoodss giftBagGoodss : s) { + giftBagGoodss.setIconUrl(fileUploadComponent.getUrlPrefix() +giftBagGoodss.getIconUrl()); + giftBagGoodss.setMefenPrice(String.valueOf((int)(Double.valueOf(giftBagGoodss.getPrice())*Double.valueOf(giftBagGoodss.getWeight())))); + giftBagGoodss.setPrefPrice(String.valueOf((Integer.valueOf(giftBagGoodss.getMefenPrice())*0.5))); + giftBagGoodss.setPrefPrice(removeZeros(giftBagGoodss.getPrefPrice())); + } + return rb.success().setData(s); + } + + /** + * 去除多余.0 + * @param num + * @return + */ + public static String removeZeros(String num) { + if (num.indexOf(".") > 0) { + // 去掉多余的0 + num = num.replaceAll("0+?$", ""); + // 如果最后一位是. 则去掉 + num = num.replaceAll("[.]$", ""); + } + return num; + } + + } diff --git a/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardMapper.java b/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardMapper.java index 146f01a..733a01c 100644 --- a/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardMapper.java +++ b/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardMapper.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.yxt.yythmall.api.empcard.*; import com.yxt.yythmall.api.lpkgiftcard.*; +import com.yxt.yythmall.api.vegetablecellar.vegeVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -56,4 +57,5 @@ public interface EmpCardMapper extends BaseMapper { IPage selGiftCard(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); + List getGoodsList(@Param("sid") String sid); } diff --git a/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardMapper.xml b/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardMapper.xml index 8ea95f2..8330b86 100644 --- a/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardMapper.xml +++ b/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardMapper.xml @@ -231,5 +231,17 @@ ${ew.sqlSegment} - + \ No newline at end of file diff --git a/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardService.java b/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardService.java index 07b6c87..3edd52e 100644 --- a/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardService.java +++ b/src/main/java/com/yxt/yythmall/biz/empcard/EmpCardService.java @@ -29,6 +29,8 @@ import com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderCardVo; import com.yxt.yythmall.api.lpkreserveorder.LpkReserveOrderVo; import com.yxt.yythmall.api.lpkreserveordergoods.LpkReserveOrderGoods; import com.yxt.yythmall.api.lpkstore.LpkStoreDetailsVo; +import com.yxt.yythmall.api.vegetablecellar.VegetableCellarDto; +import com.yxt.yythmall.api.vegetablecellar.vegeVo; import com.yxt.yythmall.biz.empcardbuildrecord.EmpCardBuildRecordService; import com.yxt.yythmall.biz.empcardgift.EmpCardGiftService; import com.yxt.yythmall.biz.empcardgiftgoods.EmpCardGiftGoodsService; @@ -40,6 +42,7 @@ import com.yxt.yythmall.biz.lpkgoods.LpkGoodsService; import com.yxt.yythmall.biz.lpkreserveorder.LpkReserveOrderService; import com.yxt.yythmall.biz.lpkreserveordergoods.LpkReserveOrderGoodsService; import com.yxt.yythmall.biz.lpkstore.LpkStoreService; +import com.yxt.yythmall.biz.vegetablecellar.VegetableCellarService; import com.yxt.yythmall.utils.StyleUtils; import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.springframework.beans.factory.annotation.Autowired; @@ -88,6 +91,8 @@ public class EmpCardService extends MybatisBaseService { @Autowired private LpkReserveOrderGoodsService lpkReserveOrderGoodsService; @Autowired + private VegetableCellarService vegetableCellarService; + @Autowired private HttpServletResponse response; @Value("${image.url.prefix:http://127.0.0.1:8080/upload/}") private String urlPrefix; @@ -134,6 +139,11 @@ public class EmpCardService extends MybatisBaseService { lpkGiftCard.setState("2"); lpkGiftCard.setBindDate(new Date()); baseMapper.updateById(lpkGiftCard); + List k=baseMapper.getGoodsList(lpkGiftCard.getSid()); + VegetableCellarDto dto=new VegetableCellarDto(); + dto.setCustomerSid(dto.getCustomerSid()); + dto.setVos(k); + vegetableCellarService.save1Goods(dto); return rb.success().setMsg("绑定成功"); } diff --git a/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftMapper.java b/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftMapper.java index 13b11d3..eac8e8d 100644 --- a/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftMapper.java +++ b/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftMapper.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.yxt.yythmall.api.empcardgift.*; +import com.yxt.yythmall.api.vegetablecellar.vegeVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -49,6 +50,7 @@ public interface EmpCardGiftMapper extends BaseMapper { List recordList(@Param("empCardSid")String empCardSid); List getEmpCardGiftByGiftbagSid(@Param("endDate")String endDate,@Param("state") String state); + List getGoodsList(@Param("sid") String sid); IPage empCardGiftStatisticsList(IPage page, @Param(Constants.WRAPPER)QueryWrapper qw); } diff --git a/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftMapper.xml b/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftMapper.xml index d86472b..cd37024 100644 --- a/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftMapper.xml +++ b/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftMapper.xml @@ -239,4 +239,17 @@ ${ew.sqlSegment} + \ No newline at end of file diff --git a/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftService.java b/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftService.java index bbeffb1..beb25ea 100644 --- a/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftService.java +++ b/src/main/java/com/yxt/yythmall/biz/empcardgift/EmpCardGiftService.java @@ -32,6 +32,8 @@ import com.yxt.yythmall.api.lpkreserveordergoods.LpkReserveOrderGoods; import com.yxt.yythmall.api.lpkstore.LpkStoreDetailsVo; import com.yxt.yythmall.api.ordorder.OrdOrder; import com.yxt.yythmall.api.ordorderdetails.OrdOrderDetail; +import com.yxt.yythmall.api.vegetablecellar.VegetableCellarDto; +import com.yxt.yythmall.api.vegetablecellar.vegeVo; import com.yxt.yythmall.biz.empcard.EmpCardService; import com.yxt.yythmall.biz.empcardgiftgoods.EmpCardGiftGoodsService; import com.yxt.yythmall.biz.empcardgrantlog.EmpCardGrantLogService; @@ -45,6 +47,7 @@ import com.yxt.yythmall.biz.lpkreserveordergoods.LpkReserveOrderGoodsService; import com.yxt.yythmall.biz.lpkstore.LpkStoreService; import com.yxt.yythmall.biz.ordorder.OrdOrderService; import com.yxt.yythmall.biz.ordorderdetails.OrdOrderDetailService; +import com.yxt.yythmall.biz.vegetablecellar.VegetableCellarService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -96,6 +99,8 @@ public class EmpCardGiftService extends MybatisBaseService k=baseMapper.getGoodsList(empCardGift.getSid()); + VegetableCellarDto dto=new VegetableCellarDto(); + dto.setCustomerSid(dto.getCustomerSid()); + dto.setVos(k); + vegetableCellarService.save1Goods(dto); return rb.success().setMsg("绑定成功"); } diff --git a/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardMapper.java b/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardMapper.java index 6be32af..346e2d1 100644 --- a/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardMapper.java +++ b/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardMapper.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.yxt.yythmall.api.lpkgiftcard.*; import com.yxt.yythmall.api.lpkgiftcard.CardStatisticsExportVo; +import com.yxt.yythmall.api.vegetablecellar.vegeVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -79,4 +80,5 @@ public interface LpkGiftCardMapper extends BaseMapper { int saveCards(@Param("cards") List cards); IPage cardStatisticsList(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); List cardStatisticsListExport(@Param(Constants.WRAPPER) QueryWrapper qw); + List getGoodsList(@Param("sid") String sid); } diff --git a/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardMapper.xml b/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardMapper.xml index cad544f..3b4a130 100644 --- a/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardMapper.xml +++ b/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardMapper.xml @@ -324,4 +324,17 @@ ${ew.sqlSegment} + \ No newline at end of file diff --git a/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardService.java b/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardService.java index 9d7f700..e406c8e 100644 --- a/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardService.java +++ b/src/main/java/com/yxt/yythmall/biz/lpkgiftcard/LpkGiftCardService.java @@ -49,6 +49,8 @@ import com.yxt.yythmall.api.lpkstore.LpkStoreDetailsVo; import com.yxt.yythmall.api.lpkstore.StoreSelect; import com.yxt.yythmall.api.shoppingcart.ShoppingCartQuery; import com.yxt.yythmall.api.shoppingcart.ShoppingCartVo; +import com.yxt.yythmall.api.vegetablecellar.VegetableCellarDto; +import com.yxt.yythmall.api.vegetablecellar.vegeVo; import com.yxt.yythmall.biz.empcard.EmpCardService; import com.yxt.yythmall.biz.empcardgift.EmpCardGiftService; import com.yxt.yythmall.biz.empcardgiftgoods.EmpCardGiftGoodsService; @@ -62,6 +64,7 @@ import com.yxt.yythmall.biz.lpkreserveorder.LpkReserveOrderService; import com.yxt.yythmall.biz.lpkreserveordergoods.LpkReserveOrderGoodsService; import com.yxt.yythmall.biz.lpkstore.LpkStoreService; import com.yxt.yythmall.biz.shoppingcart.ShoppingCartService; +import com.yxt.yythmall.biz.vegetablecellar.VegetableCellarService; import com.yxt.yythmall.utils.StyleUtils; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.*; @@ -101,6 +104,8 @@ public class LpkGiftCardService extends MybatisBaseService k=baseMapper.getGoodsList(lpkGiftCard.getSid()); + VegetableCellarDto dto=new VegetableCellarDto(); + //生成绑卡流水 + + //加入菜窖 + dto.setCustomerSid(dto.getCustomerSid()); + dto.setVos(k); + vegetableCellarService.save1Goods(dto); return rb.success().setMsg("绑定成功"); } public ResultBean getGifCardByCustomerSid(PagerQuery pq) { diff --git a/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsService.java b/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsService.java index fc94703..3070e9c 100644 --- a/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsService.java +++ b/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsService.java @@ -231,6 +231,7 @@ public class LpkGoodsService extends MybatisBaseService myGoodsVos =baseMapper.getGoodsApplet(query); vo1.setName(brandVo.getBrandName()); vo1.setId(brandVo.getId()); + vo1.setSid(brandVo.getId()); vo1.setCount(String.valueOf(myGoodsVos.size())); vo.add(vo1); } 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 46a9f69..03ef2e9 100644 --- a/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordService.java +++ b/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordService.java @@ -9,18 +9,23 @@ import com.yxt.yythmall.api.appletgiftbaggoods.AppletGiftBagGoods; import com.yxt.yythmall.api.empcardgiftgoods.EmpCardGiftGoodsVo; import com.yxt.yythmall.api.lpkgiftcard.AppletVo; import com.yxt.yythmall.api.lpkgiftcard.GoodsVo; +import com.yxt.yythmall.api.lpkgoods.LpkGoods; import com.yxt.yythmall.api.newcomerrecorecord.NewcomerRecoRecord; import com.yxt.yythmall.api.newcomerrecorecord.NewcomerRecoRecordDto; import com.yxt.yythmall.api.newcomerrecorecord.NewcomerRecoRecordVo; +import com.yxt.yythmall.api.vegetablecellar.VegetableCellarDto; +import com.yxt.yythmall.api.vegetablecellar.vegeVo; import com.yxt.yythmall.biz.appletgiftbag.AppletGiftBagService; import com.yxt.yythmall.biz.appletgiftbaggoods.AppletGiftBagGoodsService; import com.yxt.yythmall.biz.empcardgiftgoods.EmpCardGiftGoodsService; import com.yxt.yythmall.biz.lpkcustomer.LpkCustomerService; import com.yxt.yythmall.biz.lpkgiftcard.LpkGiftCardService; +import com.yxt.yythmall.biz.lpkgoods.LpkGoodsService; import com.yxt.yythmall.biz.vegetablecellar.VegetableCellarService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -38,6 +43,8 @@ public class NewcomerRecoRecordService extends MybatisBaseService getReserveByCardSid(String carSid, String goodsSid) { ResultBean rb = new ResultBean(); NewcomerRecoRecord goods = baseMapper.getReserveByCardSid(carSid, goodsSid); @@ -60,7 +67,19 @@ public class NewcomerRecoRecordService extends MybatisBaseServicelist=appletGiftBagGoodsService.list(new QueryWrapper().eq("giftbagSid",dto.getGiftBagSid())); -// vegetableCellarService.receiveTransferGoods() + VegetableCellarDto dto1=new VegetableCellarDto(); + dto1.setCustomerSid(dto.getRecommendSid()); + List vos=new ArrayList<>(); + for (AppletGiftBagGoods appletGiftBagGoods : list) { + LpkGoods a=lpkGoodsService.getOne(new QueryWrapper().eq("sid",appletGiftBagGoods.getGoodsSid())); + vegeVo vo=new vegeVo(); + vo.setGoodsSid(appletGiftBagGoods.getGoodsSid()); + vo.setGoodsNumber(appletGiftBagGoods.getGoodsNumber()); + vo.setBrandId(String.valueOf(a.getBrandId())); + vos.add(vo); + } + dto1.setVos(vos); + vegetableCellarService.save1Goods(dto1); return rb.success().setData("助力成功"); } public ResultBean recordList(String customerSid) { diff --git a/src/main/java/com/yxt/yythmall/biz/vegecallerreservedetail/VegeCellarReserveDetailsMapper.java b/src/main/java/com/yxt/yythmall/biz/vegecallerreservedetail/VegeCellarReserveDetailsMapper.java index 44d91d7..2a5a8a0 100644 --- a/src/main/java/com/yxt/yythmall/biz/vegecallerreservedetail/VegeCellarReserveDetailsMapper.java +++ b/src/main/java/com/yxt/yythmall/biz/vegecallerreservedetail/VegeCellarReserveDetailsMapper.java @@ -23,6 +23,6 @@ public interface VegeCellarReserveDetailsMapper extends BaseMapper selByOrderSid(String orderSid); List selInOrderSid(@Param("orderSids") List orderSids); - @Select("select *,goodsNumber as num from lpk_reserve_order_goods where orderSid=#{orderSid}") + @Select("select *,goodsNumber as num from vege_cellar_reserve_details where orderSid=#{orderSid}") List selByOrderSids(String orderSid); } diff --git a/src/main/java/com/yxt/yythmall/biz/vegecallerreservedetail/VegeCellarReserveDetailsService.java b/src/main/java/com/yxt/yythmall/biz/vegecallerreservedetail/VegeCellarReserveDetailsService.java index 493c639..d943241 100644 --- a/src/main/java/com/yxt/yythmall/biz/vegecallerreservedetail/VegeCellarReserveDetailsService.java +++ b/src/main/java/com/yxt/yythmall/biz/vegecallerreservedetail/VegeCellarReserveDetailsService.java @@ -100,15 +100,9 @@ public class VegeCellarReserveDetailsService extends MybatisBaseService selByOrderSid(String orderSid) { - return baseMapper.selByOrderSid(orderSid); - } - public List selInOrderSid(List orderSids) { - return baseMapper.selInOrderSid(orderSids); - } + + + public List selByOrderSids(String orderSid) { return baseMapper.selByOrderSids(orderSid); } diff --git a/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderMapper.java b/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderMapper.java index 1cec28f..b259e5d 100644 --- a/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderMapper.java +++ b/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderMapper.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.yxt.yythmall.api.vegecallerreserveorder.VegeCellarReserveOrder; +import com.yxt.yythmall.api.vegecallerreserveorder.VegeCellarReserveOrderQuery; import com.yxt.yythmall.api.vegecallerreserveorder.VegeCellarReserveOrderVo; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -26,7 +27,7 @@ public interface VegeCellarReserveOrderMapper extends BaseMapper orderByCardSid(String sid); // //// IPage orderListByUserSid(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); -// IPage orderListByUserSid(IPage page, @Param("userSid")String userSid); + IPage orderListByUserSid(IPage page, @Param("query") VegeCellarReserveOrderQuery query); // // List exportExcel(@Param("qw") VegeCellarReserveOrderQuery qw); // List exportExcelByStore(@Param(Constants.WRAPPER) QueryWrapper qw); 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 58247f0..5610a0b 100644 --- a/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderMapper.xml +++ b/src/main/java/com/yxt/yythmall/biz/vegecallerreserveorder/VegeCellarReserveOrderMapper.xml @@ -237,67 +237,28 @@ - + SELECT + o.reserveCode, + o.sid as sid, + o.storeName, + o.reserveDate, o.userName, - o.userPhone,c.serialNumber as serialNumber, - o.sid - FROM lpk_reserve_order AS o - LEFT JOIN lpk_store AS s ON o.storeSid = s.sid - LEFT JOIN emp_card AS c ON o.cardSid = c.sid - LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid + o.userPhone, + case o.state + when 0 then '未提货' + when 1 then '已提货' + end stateValue , + case o.affiliation + when 1001000 then '百姓菜窖' + when 1001020 then '精品菜窖' + when 1001045 then '企业菜窖' + end affiliationValue + FROM + vege_cellar_reserve_order AS o - o.customerSid=#{userSid} and o.cardType='3' + o.customerSid=#{query.customerSid} and state=#{query.state} - ORDER BY reserveDate DESC