diff --git a/src/main/java/com/yxt/yythmall/api/appletgiftbag/AppletGiftBagVo.java b/src/main/java/com/yxt/yythmall/api/appletgiftbag/AppletGiftBagVo.java index 62c0fc6..d015f1a 100644 --- a/src/main/java/com/yxt/yythmall/api/appletgiftbag/AppletGiftBagVo.java +++ b/src/main/java/com/yxt/yythmall/api/appletgiftbag/AppletGiftBagVo.java @@ -27,6 +27,7 @@ public class AppletGiftBagVo implements Vo { private String isRecommend;//是否推荐 1 推荐 0 默认 private String remarks; private String count;// + private String goodsSid; private List giftBagGoods; private List recordList; diff --git a/src/main/java/com/yxt/yythmall/api/lpkcustomer/LpkCustomer.java b/src/main/java/com/yxt/yythmall/api/lpkcustomer/LpkCustomer.java index fde917e..9e9a03f 100644 --- a/src/main/java/com/yxt/yythmall/api/lpkcustomer/LpkCustomer.java +++ b/src/main/java/com/yxt/yythmall/api/lpkcustomer/LpkCustomer.java @@ -43,4 +43,6 @@ public class LpkCustomer { private String regionCode; @ApiModelProperty("所在区域名称") private String regionName; + private String isNewUser;//是否新人 0 否 1 是 + private String isPurchase;//是否购买过 0 否 1 是 } diff --git a/src/main/java/com/yxt/yythmall/api/lpkgiftcard/LpkGiftCardQuery.java b/src/main/java/com/yxt/yythmall/api/lpkgiftcard/LpkGiftCardQuery.java index 92fae38..b98b0ea 100644 --- a/src/main/java/com/yxt/yythmall/api/lpkgiftcard/LpkGiftCardQuery.java +++ b/src/main/java/com/yxt/yythmall/api/lpkgiftcard/LpkGiftCardQuery.java @@ -15,4 +15,6 @@ public class LpkGiftCardQuery implements Query { private String name; private String sid; private String affiliation; + private String brandId; + private String categoryId; } diff --git a/src/main/java/com/yxt/yythmall/api/lpkgoods/GoodsTypeVo.java b/src/main/java/com/yxt/yythmall/api/lpkgoods/GoodsTypeVo.java index 7c9ba0d..96b5cd0 100644 --- a/src/main/java/com/yxt/yythmall/api/lpkgoods/GoodsTypeVo.java +++ b/src/main/java/com/yxt/yythmall/api/lpkgoods/GoodsTypeVo.java @@ -1,7 +1,10 @@ package com.yxt.yythmall.api.lpkgoods; +import com.yxt.yythmall.mallplus.mbg.pms.entity.brand.BrandVo; import lombok.Data; +import java.util.List; + /** * @author wangpengfei * @date 2024/1/15 15:06 @@ -10,5 +13,8 @@ import lombok.Data; public class GoodsTypeVo { private String name; private String sid; + private String id; private String count; + private List typeVos; + private List brandVos; } diff --git a/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecord.java b/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecord.java new file mode 100644 index 0000000..6ff3153 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecord.java @@ -0,0 +1,29 @@ +package com.yxt.yythmall.api.newcomerrecorecord; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; +import java.util.UUID; + +/** + * @author wangpengfei + * @date 2023/12/8 9:10 + */ +@Data +public class NewcomerRecoRecord { + private String id; + private String sid= UUID.randomUUID().toString(); + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String recommendSid; + private String recommendedSid; + private String giftBagSid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date assistanceDate; + private String giftName; + + +} diff --git a/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecordDto.java b/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecordDto.java new file mode 100644 index 0000000..1818a9a --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecordDto.java @@ -0,0 +1,29 @@ +package com.yxt.yythmall.api.newcomerrecorecord; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import lombok.Data; + +import java.util.Date; +import java.util.UUID; + +/** + * @author wangpengfei + * @date 2023/12/8 9:11 + */ +@Data +public class NewcomerRecoRecordDto implements Dto { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String recommendSid;//推荐人 + private String recommendedSid;//被推荐人 + private String giftBagSid;//礼包sid + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date assistanceDate;//助力时间 + private String state; + private String giftName;//礼包名 +} diff --git a/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecordQuery.java b/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecordQuery.java new file mode 100644 index 0000000..a9da82e --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecordQuery.java @@ -0,0 +1,15 @@ +package com.yxt.yythmall.api.newcomerrecorecord; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2023/12/8 9:11 + */ +@Data +public class NewcomerRecoRecordQuery implements Query { + private String startDate; //开始时间 + private String endDate; //结束时间 + private String countNumber; //总数 +} diff --git a/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecordVo.java b/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecordVo.java new file mode 100644 index 0000000..f1cb8b0 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/newcomerrecorecord/NewcomerRecoRecordVo.java @@ -0,0 +1,28 @@ +package com.yxt.yythmall.api.newcomerrecorecord; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import lombok.Data; + +import java.util.Date; +import java.util.UUID; + +/** + * @author wangpengfei + * @date 2023/12/8 9:11 + */ +@Data +public class NewcomerRecoRecordVo implements Vo { + private String id; + private String sid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + private String recommendSid; + private String recommendedSid; + private String giftBagSid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date assistanceDate; + private String giftName; +} diff --git a/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecords.java b/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecords.java new file mode 100644 index 0000000..76abe00 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecords.java @@ -0,0 +1,29 @@ +package com.yxt.yythmall.api.transferrecords; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; +import java.util.UUID; + +/** + * @author wangpengfei + * @date 2023/11/23 10:29 + */ +@Data +public class TransferRecords { + private String id; + private String sid= UUID.randomUUID().toString(); + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date createTime; + private String remarks; + private String isEnable; + + private String customerSid;//客户sid + private String transferCode;//转赠code + private String affiliation;//所属菜窖 + private String state;// + private String recipientSid;//领取人 + + +} diff --git a/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecordsDto.java b/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecordsDto.java new file mode 100644 index 0000000..f7ded9a --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecordsDto.java @@ -0,0 +1,23 @@ +package com.yxt.yythmall.api.transferrecords; + +import com.yxt.common.core.dto.Dto; +import com.yxt.yythmall.api.lpkgiftcard.GoodsVo; +import lombok.Data; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/11/23 10:29 + */ +@Data +public class TransferRecordsDto implements Dto { + private String customerSid;//客户sid + private String transferCode;//转赠code + private String affiliation;//所属菜窖 + private String state;// + private String recipientSid;//领取人 + private String orderSid; + private List goodsVos; + +} diff --git a/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecordsQuery.java b/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecordsQuery.java new file mode 100644 index 0000000..39365c8 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecordsQuery.java @@ -0,0 +1,21 @@ +package com.yxt.yythmall.api.transferrecords; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2023/11/23 10:30 + */ +@Data +public class TransferRecordsQuery implements Query { + private String userName; //用户名 + private String store; // 门店 + private String startDate; //预约开始日期 + private String endDate; // 预约结束日期 + private String userSid; + private String storeSid; + private String bankSid; + private String bankName; + private String serialNumber; +} diff --git a/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecordsVo.java b/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecordsVo.java new file mode 100644 index 0000000..64ff860 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/transferrecords/TransferRecordsVo.java @@ -0,0 +1,24 @@ +package com.yxt.yythmall.api.transferrecords; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import com.yxt.yythmall.api.vegecallerreserveorder.OrderGoodsVo; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @author Fan + * @description + * @date 2023/11/27 15:11 + */ +@Data +public class TransferRecordsVo implements Vo { + private String customerSid;//客户sid + private String transferCode;//转赠code + private String affiliation;//所属菜窖 + private String state;// + private String recipientSid;//领取人 +} diff --git a/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetails.java b/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetails.java new file mode 100644 index 0000000..74e69be --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetails.java @@ -0,0 +1,26 @@ +package com.yxt.yythmall.api.transferrecordsgoodsdetails; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; +import java.util.UUID; + +/** + * @author wangpengfei + * @date 2023/11/23 10:29 + */ +@Data +public class TransferRecordsGoodsDetails { + private String id; + private String sid= UUID.randomUUID().toString(); + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date createTime; + private String remarks; + + private String orderSid; + private String goodsSid; + private double goodsNumber; + + +} diff --git a/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsDto.java b/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsDto.java new file mode 100644 index 0000000..492ed9c --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsDto.java @@ -0,0 +1,19 @@ +package com.yxt.yythmall.api.transferrecordsgoodsdetails; + +import com.yxt.common.core.dto.Dto; +import com.yxt.yythmall.api.lpkgiftcard.GoodsVo; +import lombok.Data; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/11/23 10:29 + */ +@Data +public class TransferRecordsGoodsDetailsDto implements Dto { + private String orderSid; + private String goodsSid; + private String goodsNumber; + +} diff --git a/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsQuery.java b/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsQuery.java new file mode 100644 index 0000000..e579d41 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsQuery.java @@ -0,0 +1,21 @@ +package com.yxt.yythmall.api.transferrecordsgoodsdetails; + +import com.yxt.common.core.query.Query; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2023/11/23 10:30 + */ +@Data +public class TransferRecordsGoodsDetailsQuery implements Query { + private String userName; //用户名 + private String store; // 门店 + private String startDate; //预约开始日期 + private String endDate; // 预约结束日期 + private String userSid; + private String storeSid; + private String bankSid; + private String bankName; + private String serialNumber; +} diff --git a/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsVo.java b/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsVo.java new file mode 100644 index 0000000..002c5c3 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/api/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsVo.java @@ -0,0 +1,40 @@ +package com.yxt.yythmall.api.transferrecordsgoodsdetails; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import com.yxt.yythmall.api.vegecallerreserveorder.OrderGoodsVo; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @author Fan + * @description + * @date 2023/11/27 15:11 + */ +@Data +public class TransferRecordsGoodsDetailsVo implements Vo { + private String sid; //预约订单sid + private String userName; //用户名 + private String userPhone; //用户电话 + private String store; //门店 + private String storeSid; //门店 + @JsonFormat(pattern = "yyyy-MM-dd ",timezone="GMT+8") + private Date reserveDate; //预约时间 + private String bagName; //礼包 + private String code; //卡号 + private String goodsInfo; + private List goodsVo = new ArrayList<>(); + private List goods=new ArrayList<>(); + private String bankName; + private String goodsSid; + private String goodsName; + private String goodsNumber; + private String serialNumber; + private String linker; + private String linkPhone; + private String address; + private String cardType; +} 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 f685d17..e593ec1 100644 --- a/src/main/java/com/yxt/yythmall/api/vegetablecellar/VegetableCellarDto.java +++ b/src/main/java/com/yxt/yythmall/api/vegetablecellar/VegetableCellarDto.java @@ -25,4 +25,5 @@ public class VegetableCellarDto implements Dto { private String goodsNumber; private String totalNumber; private List vos; + private String transferSid;//转赠sid } 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 bb5f99f..f86ef2a 100644 --- a/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.java +++ b/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.java @@ -22,5 +22,6 @@ public interface AppletGiftBagMapper extends BaseMapper { IPage giftBagListPage(IPage page, @Param(Constants.WRAPPER) QueryWrapper qw); List giftBagList(); + List giftBagGoodsList(); 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 0857d74..f646dfb 100644 --- a/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.xml +++ b/src/main/java/com/yxt/yythmall/biz/appletgiftbag/AppletGiftBagMapper.xml @@ -35,4 +35,10 @@ where isGrounding=1 order by isRecommend desc,createTime desc + \ No newline at end of file diff --git a/src/main/java/com/yxt/yythmall/biz/lpkcustomer/LpkCustomerService.java b/src/main/java/com/yxt/yythmall/biz/lpkcustomer/LpkCustomerService.java index 8c686de..69b8431 100644 --- a/src/main/java/com/yxt/yythmall/biz/lpkcustomer/LpkCustomerService.java +++ b/src/main/java/com/yxt/yythmall/biz/lpkcustomer/LpkCustomerService.java @@ -101,6 +101,8 @@ public class LpkCustomerService extends MybatisBaseService list=new ArrayList<>(); - list.add(vo); - list.add(vo1); - list.add(vo2); - list.add(vo3); - list.add(vo4); - list.add(vo5); - list.add(vo6); - list.add(vo7); - list.add(vo8); - list.add(vo9); - list.add(vo10); - list.add(vo11); - list.add(vo12); - list.add(vo13); - list.add(vo14); - list.add(vo15); - return rb.success().setData(list); - } public ResultBean getGoodsByTypeSid(LpkGiftCardQuery query) { ResultBean rb=new ResultBean().fail(); List giftBagGoodss=lpkGoodsService.getAllGoodsApplets(query).getData(); diff --git a/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsMapper.xml b/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsMapper.xml index 1ef2aa3..4ca4bd7 100644 --- a/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsMapper.xml +++ b/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsMapper.xml @@ -113,12 +113,18 @@ weight from lpk_goods where isAppletGrounding=1 and useTo=1 + + and brandId =#{query.brandId} + + + and categoryId=#{query.categoryId} + name like #{query.name} order by createTime desc \ No newline at end of file diff --git a/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsRest.java b/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsRest.java index 7ba3fed..1ed889a 100644 --- a/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsRest.java +++ b/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsRest.java @@ -91,6 +91,11 @@ public class LpkGoodsRest { public ResultBean getAllType() { return lpkGoodsService.getAllType(); } + @ApiOperation("获取所有的商品类型和品牌") + @GetMapping("/getGoodsTypeAndBrand") + public ResultBean getGoodsTypeAndBrand() { + return lpkGoodsService.getGoodsTypeAndBrand(); + } @ApiOperation("根据类型查询商品") @PostMapping("/getGoodsByType") public ResultBean getGoodsByType(@RequestBody LpkGiftCardQuery query) { 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 0217962..4ffdb1c 100644 --- a/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsService.java +++ b/src/main/java/com/yxt/yythmall/biz/lpkgoods/LpkGoodsService.java @@ -19,6 +19,8 @@ import com.yxt.yythmall.api.lpkgoods.*; import com.yxt.yythmall.api.shoppingcart.ShoppingCartQuery; import com.yxt.yythmall.api.shoppingcart.ShoppingCartVo; import com.yxt.yythmall.biz.shoppingcart.ShoppingCartService; +import com.yxt.yythmall.mallplus.biz.pms.service.IPmsBrandService; +import com.yxt.yythmall.mallplus.mbg.pms.entity.brand.BrandVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -45,6 +47,8 @@ public class LpkGoodsService extends MybatisBaseService> goodsListPage(PagerQuery pq) { @@ -251,11 +255,21 @@ public class LpkGoodsService extends MybatisBaseService list=baseMapper.getType(); return rb.success().setData(list); } + public ResultBean> getGoodsTypeAndBrand() { + ResultBean rb=new ResultBean().fail(); + GoodsTypeVo vo=new GoodsTypeVo(); + List list=baseMapper.getType(); + vo.setTypeVos(list); + List list1= IPmsBrandService.getList().getData(); + vo.setBrandVos(list1); + return rb.success().setData(vo); + } + public ResultBean getGoodsByTypeSid(LpkGiftCardQuery query) { ResultBean rb=new ResultBean().fail(); List giftBagGoodss=baseMapper.getAllGoodsApplets(query); ShoppingCartQuery query1=new ShoppingCartQuery(); - query1.setAffiliation(query.getAffiliation());query1.setCustomerSid(query.getCustomerSid()); + query1.setAffiliation(query.getBrandId());query1.setCustomerSid(query.getCustomerSid()); List l=shoppingCartService.shoppingCartList(query1).getData(); l.forEach(s->{ giftBagGoodss.forEach(d->{ diff --git a/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordMapper.java b/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordMapper.java new file mode 100644 index 0000000..8c4a1dd --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordMapper.java @@ -0,0 +1,31 @@ +package com.yxt.yythmall.biz.newcomerrecorecord; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.yxt.yythmall.api.newcomerrecorecord.NewcomerRecoRecord; +import com.yxt.yythmall.api.newcomerrecorecord.NewcomerRecoRecordVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/11/23 10:36 + */ +@Mapper +public interface NewcomerRecoRecordMapper extends BaseMapper { + @Select("select sum(goodsNumber) as goodsNumber , goodsSid as goodsSid from lpk_reserve_order_goods where cardSid=#{cardSid} and goodsSid=#{goodsSid}") + NewcomerRecoRecord getReserveByCardSid(@Param("cardSid") String cardSid, @Param("goodsSid") String goodsSid); + + NewcomerRecoRecord selByOrderSidAndGoodSid(@Param("orderSid") String orderSid, @Param("goodsSid") String goodsSid); + + @Select("select * from lpk_reserve_order_goods where orderSid=#{orderSid}") + List selByOrderSid(String orderSid); + + List selInOrderSid(@Param("orderSids") List orderSids); + @Select("select *,goodsNumber as num from lpk_reserve_order_goods where orderSid=#{orderSid}") + List selByOrderSids(String orderSid); + @Select("select * from newcomer_reco_record r where customerSid =#{customerSid} limit 5") + List recordList(@Param("customerSid")String customerSid); +} diff --git a/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordMapper.xml b/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordMapper.xml new file mode 100644 index 0000000..a8557bf --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordMapper.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordRest.java b/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordRest.java new file mode 100644 index 0000000..39c07ef --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordRest.java @@ -0,0 +1,41 @@ +package com.yxt.yythmall.biz.newcomerrecorecord; + +import com.yxt.common.core.result.ResultBean; +import com.yxt.yythmall.api.newcomerrecorecord.NewcomerRecoRecordDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author wangpengfei + * @date 2023/11/23 10:35 + */ +@Api(tags = "预约订单信息") +@RestController +@RequestMapping("newcomerrecorecord") +public class NewcomerRecoRecordRest { + @Autowired + NewcomerRecoRecordService newcomerRecoRecordService; + + + @ApiOperation("推荐新人用户") + @PostMapping("/recommendNewUsers") + public ResultBean recommendNewUsers(NewcomerRecoRecordDto dto){ + return newcomerRecoRecordService.recommendNewUsers(dto); + } + @ApiOperation("新人助力") + @PostMapping("/recommendedAssistance") + public ResultBean recommendedAssistance(NewcomerRecoRecordDto dto){ + return newcomerRecoRecordService.recommendedAssistance(dto); + } + @ApiOperation("新人助力") + @PostMapping("/recordList/{customerSid}") + public ResultBean recordList(@PathVariable("customerSid") String customerSid){ + return newcomerRecoRecordService.recordList(customerSid); + } + +} diff --git a/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordService.java b/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordService.java new file mode 100644 index 0000000..46a9f69 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/newcomerrecorecord/NewcomerRecoRecordService.java @@ -0,0 +1,76 @@ +package com.yxt.yythmall.biz.newcomerrecorecord; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.core.result.ResultBean; +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.newcomerrecorecord.NewcomerRecoRecord; +import com.yxt.yythmall.api.newcomerrecorecord.NewcomerRecoRecordDto; +import com.yxt.yythmall.api.newcomerrecorecord.NewcomerRecoRecordVo; +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.vegetablecellar.VegetableCellarService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/11/23 10:36 + */ +@Service +public class NewcomerRecoRecordService extends MybatisBaseService { + @Autowired + AppletGiftBagGoodsService appletGiftBagGoodsService; + @Autowired + EmpCardGiftGoodsService empCardGiftGoodsService; + @Autowired + LpkCustomerService lpkCustomerService; + @Autowired + VegetableCellarService vegetableCellarService; + public ResultBean getReserveByCardSid(String carSid, String goodsSid) { + ResultBean rb = new ResultBean(); + NewcomerRecoRecord goods = baseMapper.getReserveByCardSid(carSid, goodsSid); + return rb.success().setData(goods); + } + + public ResultBean recommendNewUsers(NewcomerRecoRecordDto dto) { + ResultBean rb = new ResultBean(); + NewcomerRecoRecord newcomerRecoRecord = new NewcomerRecoRecord(); + + BeanUtil.copyProperties(dto, newcomerRecoRecord, "id", "sid"); + newcomerRecoRecord.setCreateTime(new Date()); + baseMapper.insert(newcomerRecoRecord); + return rb.success().setData("推荐成功"); + } + public ResultBean recommendedAssistance(NewcomerRecoRecordDto dto) { + ResultBean rb = new ResultBean(); + NewcomerRecoRecord newcomerRecoRecord = baseMapper.selectOne(new QueryWrapper().eq("sid",dto.getSid())); + newcomerRecoRecord.setRecommendedSid(dto.getRecommendedSid()); + newcomerRecoRecord.setAssistanceDate(new Date()); + baseMapper.updateById(newcomerRecoRecord); + Listlist=appletGiftBagGoodsService.list(new QueryWrapper().eq("giftbagSid",dto.getGiftBagSid())); +// vegetableCellarService.receiveTransferGoods() + return rb.success().setData("助力成功"); + } + public ResultBean recordList(String customerSid) { + ResultBean rb = new ResultBean(); + + List vos=baseMapper.recordList(customerSid); + +// vos.forEach(s->{ +// s. +// }); + return rb.success().setData("助力成功"); + } +} diff --git a/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsMapper.java b/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsMapper.java new file mode 100644 index 0000000..f3c9dab --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsMapper.java @@ -0,0 +1,28 @@ +package com.yxt.yythmall.biz.transferrecords; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.yxt.yythmall.api.transferrecords.TransferRecords; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/11/23 10:36 + */ +@Mapper +public interface TransferRecordsMapper extends BaseMapper { + @Select("select sum(goodsNumber) as goodsNumber , goodsSid as goodsSid from lpk_reserve_order_goods where cardSid=#{cardSid} and goodsSid=#{goodsSid}") + TransferRecords getReserveByCardSid(@Param("cardSid") String cardSid, @Param("goodsSid") String goodsSid); + + TransferRecords selByOrderSidAndGoodSid(@Param("orderSid") String orderSid, @Param("goodsSid") String goodsSid); + + @Select("select * from lpk_reserve_order_goods where orderSid=#{orderSid}") + List selByOrderSid(String orderSid); + + List selInOrderSid(@Param("orderSids") List orderSids); + @Select("select *,goodsNumber as num from lpk_reserve_order_goods where orderSid=#{orderSid}") + List selByOrderSids(String orderSid); +} diff --git a/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsMapper.xml b/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsMapper.xml new file mode 100644 index 0000000..cd02763 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsRest.java b/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsRest.java new file mode 100644 index 0000000..5952fca --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsRest.java @@ -0,0 +1,30 @@ +package com.yxt.yythmall.biz.transferrecords; + +import com.yxt.common.core.result.ResultBean; +import com.yxt.yythmall.api.transferrecords.TransferRecordsDto; +import com.yxt.yythmall.api.vegecallerreserveorder.VegeCellarReserveOrderDto; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author wangpengfei + * @date 2023/11/23 10:35 + */ +@Api(tags = "预约订单信息") +@RestController +@RequestMapping("transferrecords") +public class TransferRecordsRest { + @Autowired + TransferRecordsService TransferRecordsService; + + @ApiOperation("转赠蔬菜") + @PostMapping("/submission") + public ResultBean submission(@RequestBody TransferRecordsDto dto) { + return TransferRecordsService.submission(dto); + } +} diff --git a/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsService.java b/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsService.java new file mode 100644 index 0000000..3834065 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/transferrecords/TransferRecordsService.java @@ -0,0 +1,51 @@ +package com.yxt.yythmall.biz.transferrecords; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.core.result.ResultBean; +import com.yxt.yythmall.api.customerstore.CustomerStoreDto; +import com.yxt.yythmall.api.lpkgiftcard.GoodsVo; +import com.yxt.yythmall.api.transferrecords.TransferRecords; +import com.yxt.yythmall.api.transferrecords.TransferRecordsDto; + +import com.yxt.yythmall.api.vegetablecellar.VegetableCellar; +import com.yxt.yythmall.biz.customerstore.CustomerStoreService; +import com.yxt.yythmall.biz.lpkgiftcard.LpkGiftCardService; +import com.yxt.yythmall.biz.lpkgiftcard.generateRule.UniqueIdGenerator; +import com.yxt.yythmall.biz.transferrecordsgoodsdetails.TransferRecordsGoodsDetailsService; +import com.yxt.yythmall.biz.vegetablecellar.VegetableCellarService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/11/23 10:36 + */ +@Service +public class TransferRecordsService extends MybatisBaseService { + @Autowired + LpkGiftCardService lpkGiftCardService; + @Autowired + TransferRecordsGoodsDetailsService transferRecordsGoodsDetailsService; + @Autowired + CustomerStoreService customerStoreService; + + + public ResultBean submission(TransferRecordsDto dto) { + ResultBean rb = new ResultBean().fail(); + TransferRecords order = new TransferRecords(); + BeanUtil.copyProperties(dto, order, "id", "sid"); + + order.setCreateTime(new DateTime()); + String uuid = UniqueIdGenerator.generateUniqueID(); + order.setTransferCode(uuid); + baseMapper.insert(order); + dto.setOrderSid(order.getSid()); + transferRecordsGoodsDetailsService.submissionDetail(dto); + return rb.success().setData("转赠成功"); + } +} diff --git a/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsMapper.java b/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsMapper.java new file mode 100644 index 0000000..17abffa --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsMapper.java @@ -0,0 +1,28 @@ +package com.yxt.yythmall.biz.transferrecordsgoodsdetails; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.yxt.yythmall.api.transferrecordsgoodsdetails.TransferRecordsGoodsDetails; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/11/23 10:36 + */ +@Mapper +public interface TransferRecordsGoodsDetailsMapper extends BaseMapper { + @Select("select sum(goodsNumber) as goodsNumber , goodsSid as goodsSid from lpk_reserve_order_goods where cardSid=#{cardSid} and goodsSid=#{goodsSid}") + TransferRecordsGoodsDetails getReserveByCardSid(@Param("cardSid") String cardSid, @Param("goodsSid") String goodsSid); + + TransferRecordsGoodsDetails selByOrderSidAndGoodSid(@Param("orderSid") String orderSid, @Param("goodsSid") String goodsSid); + + @Select("select * from lpk_reserve_order_goods where orderSid=#{orderSid}") + List selByOrderSid(String orderSid); + + List selInOrderSid(@Param("orderSids") List orderSids); + @Select("select *,goodsNumber as num from lpk_reserve_order_goods where orderSid=#{orderSid}") + List selByOrderSids(String orderSid); +} diff --git a/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsMapper.xml b/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsMapper.xml new file mode 100644 index 0000000..89d7f0c --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsMapper.xml @@ -0,0 +1,37 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsRest.java b/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsRest.java new file mode 100644 index 0000000..46f0e10 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsRest.java @@ -0,0 +1,25 @@ +package com.yxt.yythmall.biz.transferrecordsgoodsdetails; + +import io.swagger.annotations.Api; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author wangpengfei + * @date 2023/11/23 10:35 + */ +@Api(tags = "预约订单信息") +@RestController +@RequestMapping("TransferRecordsGoodsDetailsRest") +public class TransferRecordsGoodsDetailsRest { + @Autowired + TransferRecordsGoodsDetailsService vegeCellarReserveOrderService; + + +// @ApiOperation("预约提交") +// @PostMapping("/submissionDetail") +// public ResultBean submissionDetail(VegeCellarReserveOrderDto dto){ +// return VegeCellarReserveOrderService.submissionDetail(dto); +// } +} diff --git a/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsService.java b/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsService.java new file mode 100644 index 0000000..d8f9424 --- /dev/null +++ b/src/main/java/com/yxt/yythmall/biz/transferrecordsgoodsdetails/TransferRecordsGoodsDetailsService.java @@ -0,0 +1,82 @@ +package com.yxt.yythmall.biz.transferrecordsgoodsdetails; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateTime; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.core.result.ResultBean; +import com.yxt.yythmall.api.customerstore.CustomerStoreDto; +import com.yxt.yythmall.api.lpkgiftcard.GoodsVo; +import com.yxt.yythmall.api.transferrecords.TransferRecordsDto; +import com.yxt.yythmall.api.transferrecordsgoodsdetails.TransferRecordsGoodsDetails; + +import com.yxt.yythmall.api.vegecallerreserveorder.VegeCellarReserveOrderDto; +import com.yxt.yythmall.api.vegetablecellar.VegetableCellar; +import com.yxt.yythmall.biz.customerstore.CustomerStoreService; +import com.yxt.yythmall.biz.lpkgiftcard.LpkGiftCardService; +import com.yxt.yythmall.biz.vegetablecellar.VegetableCellarService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/11/23 10:36 + */ +@Service +public class TransferRecordsGoodsDetailsService extends MybatisBaseService { + @Autowired + LpkGiftCardService lpkGiftCardService; + @Autowired + VegetableCellarService vegetableCellarService; + @Autowired + CustomerStoreService customerStoreService; + + + public ResultBean getReserveByCardSid(String carSid, String goodsSid) { + ResultBean rb = new ResultBean(); + TransferRecordsGoodsDetails goods = baseMapper.getReserveByCardSid(carSid, goodsSid); + return rb.success().setData(goods); + } + + public ResultBean submissionDetail(TransferRecordsDto dto) { + ResultBean rb = new ResultBean(); + TransferRecordsGoodsDetails goods = new TransferRecordsGoodsDetails(); + BeanUtil.copyProperties(dto, goods, "id", "sid"); +// goods.setCardSid(dto.getSid()); + for (GoodsVo goods1 : dto.getGoodsVos()) { + if (goods1.getSelect() != 0) { +// goods.setCardSid(dto.getSid()); + goods.setGoodsSid(goods1.getGoodsSid()); + goods.setGoodsNumber(goods1.getSelect()); + goods.setCreateTime(new DateTime()); + baseMapper.insert(goods); + VegetableCellar vegetableCellar= vegetableCellarService.list(new QueryWrapper().eq("customerSid",dto.getCustomerSid()) + .eq("goodsSid",goods1.getGoodsSid()).eq("affiliation",dto.getAffiliation())).get(0); + double d=Double.valueOf(vegetableCellar.getGoodsNumber()); + double c=Double.valueOf(goods1.getSelect()); + if(Double.compare(d,c)==0){ + vegetableCellarService.deleteBySid(vegetableCellar.getSid()); + }else{ + vegetableCellar.setGoodsNumber(String.valueOf((int)(Double.valueOf(vegetableCellar.getGoodsNumber())-Double.valueOf(goods1.getSelect())))); + vegetableCellarService.updateById(vegetableCellar); + } + } + } + return rb.success().setData("转赠成功"); + } + + public TransferRecordsGoodsDetails selByOrderSidAndGoodSid(String orderSid, String goodsSid) { + return baseMapper.selByOrderSidAndGoodSid(orderSid,goodsSid); + } + public List 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/vegetablecellar/VegetableCellarRest.java b/src/main/java/com/yxt/yythmall/biz/vegetablecellar/VegetableCellarRest.java index 17f3f97..b1922fd 100644 --- a/src/main/java/com/yxt/yythmall/biz/vegetablecellar/VegetableCellarRest.java +++ b/src/main/java/com/yxt/yythmall/biz/vegetablecellar/VegetableCellarRest.java @@ -31,4 +31,9 @@ public class VegetableCellarRest { public ResultBean saveGoods(@RequestBody VegetableCellarDto dto) { return VegetableCellarService.saveGoods(dto); } + @ApiOperation("领取转赠商品") + @PostMapping("/receiveTransferGoods") + public ResultBean receiveTransferGoods(@RequestBody VegetableCellarDto dto) { + return VegetableCellarService.receiveTransferGoods(dto); + } } diff --git a/src/main/java/com/yxt/yythmall/biz/vegetablecellar/VegetableCellarService.java b/src/main/java/com/yxt/yythmall/biz/vegetablecellar/VegetableCellarService.java index 5b1d83b..f9deae2 100644 --- a/src/main/java/com/yxt/yythmall/biz/vegetablecellar/VegetableCellarService.java +++ b/src/main/java/com/yxt/yythmall/biz/vegetablecellar/VegetableCellarService.java @@ -11,11 +11,15 @@ import com.yxt.common.core.vo.PagerVo; import com.yxt.yythmall.api.ordorder.OrdOrder; import com.yxt.yythmall.api.ordorderdetails.OrdOrderDetail; import com.yxt.yythmall.api.shoppingcart.ShoppingCart; +import com.yxt.yythmall.api.transferrecords.TransferRecords; +import com.yxt.yythmall.api.transferrecordsgoodsdetails.TransferRecordsGoodsDetails; import com.yxt.yythmall.api.vegetablecellar.*; import com.yxt.yythmall.biz.empcard.EmpCardService; import com.yxt.yythmall.biz.ordorder.OrdOrderService; import com.yxt.yythmall.biz.ordorderdetails.OrdOrderDetailService; import com.yxt.yythmall.biz.shoppingcart.ShoppingCartService; +import com.yxt.yythmall.biz.transferrecords.TransferRecordsService; +import com.yxt.yythmall.biz.transferrecordsgoodsdetails.TransferRecordsGoodsDetailsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -34,6 +38,10 @@ public class VegetableCellarService extends MybatisBaseService().eq("mainSid",mainSid)); @@ -79,4 +87,32 @@ public class VegetableCellarService extends MybatisBaseService().eq("sid",dto.getTransferSid()).eq("state","0")); + if(transferRecords==null){ + return rb.setMsg("已经被领取"); + } + Listlist=transferRecordsGoodsDetailsService.list(new QueryWrapper().eq("orderSid",dto.getTransferSid())); + for(TransferRecordsGoodsDetails detail:list){ + VegetableCellar vegetableCellar=baseMapper.selectOne(new QueryWrapper().eq("customerSid",dto.getCustomerSid()) + .eq("goodsSid",detail.getGoodsSid()).eq("affiliation",transferRecords.getAffiliation())); + if(vegetableCellar==null){ + VegetableCellar vegetable=new VegetableCellar(); + vegetable.setAffiliation(transferRecords.getAffiliation()); + vegetable.setGoodsSid(detail.getGoodsSid()); + vegetable.setGoodsNumber(String.valueOf((int)detail.getGoodsNumber())); + vegetable.setCustomerSid(dto.getCustomerSid()); + baseMapper.insert(vegetable); + }else{ + vegetableCellar.setGoodsNumber(String.valueOf((int) (Double.valueOf(vegetableCellar.getGoodsNumber())+Double.valueOf(detail.getGoodsNumber())))); + baseMapper.updateById(vegetableCellar); + } + transferRecords.setState("1"); + transferRecords.setRecipientSid(dto.getCustomerSid()); + transferRecordsService.updateById(transferRecords); + } + return rb.success().setMsg("成功"); + } + } diff --git a/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java b/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java index cefc234..2275b52 100644 --- a/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java +++ b/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java @@ -63,8 +63,12 @@ public class SaTokenConfigure implements WebMvcConfigurer { //2024-01-17 .excludePathPatterns("/lpkgiftcard/getAllGoodsType/**") .excludePathPatterns("/lpkgoods/getAllGoodsType/**") + .excludePathPatterns("/transferrecords/submission") + .excludePathPatterns("/vegetablecellar/receiveTransferGoods") .excludePathPatterns("/customerstore/isSaturAndSun") .excludePathPatterns("/lpkgiftcard/getGoodsByType/**") + .excludePathPatterns("/lpkgoods/getGoodsTypeAndBrand") + .excludePathPatterns("/lpkgoods/getGoodsByType") .excludePathPatterns("/shoppingcart/addShoppingCart") .excludePathPatterns("/shoppingcart/getGoodsWeight") .excludePathPatterns("/shoppingcart/shoppingCartList")