From 2344842b2fc4daaa45672b81d50900ae252658cf Mon Sep 17 00:00:00 2001 From: wangpengfei <1928057482@qq.com> Date: Fri, 12 Jan 2024 17:17:39 +0800 Subject: [PATCH] 1/12 --- .../yyth/api/customerstore/CustomerStore.java | 31 +++++++++++++++ .../api/customerstore/CustomerStoreDto.java | 29 ++++++++++++++ .../api/customerstore/CustomerStoreQuery.java | 15 ++++++++ .../api/customerstore/CustomerStoreVo.java | 34 +++++++++++++++++ .../com/yxt/yyth/api/empcard/EmpAppletVo.java | 2 + .../yyth/api/empcardgift/EmpGiftAppletVo.java | 2 + .../yyth/api/lpkcustomer/LpkCustomerDto.java | 22 +++++++++++ .../yxt/yyth/api/lpkgiftcard/AppletVo.java | 2 + .../LpkReserveOrderCardVo.java | 2 +- .../customerstore/CustomerStoreMapper.java | 21 ++++++++++ .../biz/customerstore/CustomerStoreMapper.xml | 11 ++++++ .../biz/customerstore/CustomerStoreRest.java | 30 +++++++++++++++ .../customerstore/CustomerStoreService.java | 38 +++++++++++++++++++ .../yxt/yyth/biz/empcard/EmpCardService.java | 28 +++++++++----- .../biz/empcardgift/EmpCardGiftService.java | 25 ++++++++---- .../EmpReserveOrderGoodsService.java | 17 +++++++++ .../yyth/biz/lpkcustomer/LpkCustomerRest.java | 29 +++++++++++--- .../biz/lpkcustomer/LpkCustomerService.java | 20 ++++++++-- .../biz/lpkgiftcard/LpkGiftCardService.java | 25 ++++++++---- .../lpkreserveorder/LpkReserveOrderMapper.xml | 9 +++-- .../LpkReserveOrderGoodsService.java | 10 +++++ .../yxt/yyth/biz/ordorder/OrdOrderRest.java | 1 + 22 files changed, 366 insertions(+), 37 deletions(-) create mode 100644 src/main/java/com/yxt/yyth/api/customerstore/CustomerStore.java create mode 100644 src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreDto.java create mode 100644 src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreQuery.java create mode 100644 src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreVo.java create mode 100644 src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreMapper.java create mode 100644 src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreMapper.xml create mode 100644 src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreRest.java create mode 100644 src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreService.java diff --git a/src/main/java/com/yxt/yyth/api/customerstore/CustomerStore.java b/src/main/java/com/yxt/yyth/api/customerstore/CustomerStore.java new file mode 100644 index 0000000..d7fb9b6 --- /dev/null +++ b/src/main/java/com/yxt/yyth/api/customerstore/CustomerStore.java @@ -0,0 +1,31 @@ +package com.yxt.yyth.api.customerstore; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +import java.util.Date; +import java.util.UUID; + +/** + * @author wangpengfei + * @date 2023/11/21 15:06 + */ +@ApiModel(value = "礼包包含商品信息", description = "礼包包含商品信息") +@TableName("customer_store") +@Data +public class CustomerStore { + 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; + private String storeSid; +// private String isGrounding; + private String phone; + private String name; + +} diff --git a/src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreDto.java b/src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreDto.java new file mode 100644 index 0000000..9302ad3 --- /dev/null +++ b/src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreDto.java @@ -0,0 +1,29 @@ +package com.yxt.yyth.api.customerstore; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.dto.Dto; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +import java.util.Date; +import java.util.UUID; + +/** + * @author wangpengfei + * @date 2023/11/21 15:13 + */ +@ApiModel(value = "礼包包含商品信息 数据传输对象", description = "礼包包含商品信息 数据传输对象") +@Data +public class CustomerStoreDto 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 customerSid; + private String storeSid; + // private String isGrounding; + private String phone; + private String name; +} diff --git a/src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreQuery.java b/src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreQuery.java new file mode 100644 index 0000000..63da52a --- /dev/null +++ b/src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreQuery.java @@ -0,0 +1,15 @@ +package com.yxt.yyth.api.customerstore; + +import com.yxt.common.core.query.Query; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * @author wangpengfei + * @date 2023/11/21 15:31 + */ +@ApiModel(value = "礼包包含商品信息 查询条件", description = "礼包包含商品信息 查询条件") +@Data +public class CustomerStoreQuery implements Query { + +} diff --git a/src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreVo.java b/src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreVo.java new file mode 100644 index 0000000..c8a3c2d --- /dev/null +++ b/src/main/java/com/yxt/yyth/api/customerstore/CustomerStoreVo.java @@ -0,0 +1,34 @@ +package com.yxt.yyth.api.customerstore; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; +import java.util.UUID; + +/** + * @author wangpengfei + * @date 2023/11/21 15:12 + */ +@Data +@ApiModel(value = "礼包包含商品信息 视图数据对象", description = "礼包包含商品信息 视图数据对象") +@NoArgsConstructor +public class CustomerStoreVo 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 customerSid; + private String storeSid; + private String storeName; + private String businessHours; + private String address; + // private String isGrounding; + private String phone; + private String name; +} diff --git a/src/main/java/com/yxt/yyth/api/empcard/EmpAppletVo.java b/src/main/java/com/yxt/yyth/api/empcard/EmpAppletVo.java index 43b5ec3..c347845 100644 --- a/src/main/java/com/yxt/yyth/api/empcard/EmpAppletVo.java +++ b/src/main/java/com/yxt/yyth/api/empcard/EmpAppletVo.java @@ -45,6 +45,8 @@ public class EmpAppletVo { private List select; private String storeSid;//上次提货地点 private String addressName; + private String customerName; + private String cPhone; private String isReservation;//是否超过预约时间 0 否 1是 private boolean notRese=true; //是否能预约 private List empCardGiftVos; diff --git a/src/main/java/com/yxt/yyth/api/empcardgift/EmpGiftAppletVo.java b/src/main/java/com/yxt/yyth/api/empcardgift/EmpGiftAppletVo.java index 2714e0d..90e8c3c 100644 --- a/src/main/java/com/yxt/yyth/api/empcardgift/EmpGiftAppletVo.java +++ b/src/main/java/com/yxt/yyth/api/empcardgift/EmpGiftAppletVo.java @@ -45,6 +45,8 @@ public class EmpGiftAppletVo { private List select; private String storeSid;//上次提货地点 private String addressName; + private String customerName;//提货人 + private String cPhone;//提货号码 private String isReservation;//是否超过预约时间 0 否 1是 private boolean notRese = true; //是否能预约 private List orderCardVoList; diff --git a/src/main/java/com/yxt/yyth/api/lpkcustomer/LpkCustomerDto.java b/src/main/java/com/yxt/yyth/api/lpkcustomer/LpkCustomerDto.java index f356c74..c8d5ee8 100644 --- a/src/main/java/com/yxt/yyth/api/lpkcustomer/LpkCustomerDto.java +++ b/src/main/java/com/yxt/yyth/api/lpkcustomer/LpkCustomerDto.java @@ -1,9 +1,14 @@ package com.yxt.yyth.api.lpkcustomer; +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; import com.yxt.common.core.dto.Dto; import io.swagger.annotations.ApiModel; import lombok.Data; +import java.util.Date; +import java.util.UUID; + /** * @author wangpengfei * @date 2023/11/21 15:13 @@ -11,4 +16,21 @@ import lombok.Data; @ApiModel(value = "客户信息 数据传输对象", description = "客户信息 数据传输对象") @Data public class LpkCustomerDto 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; + // @TableField(value = "wx_mp_openid") + private String wxMpOpenid; + private String unionId; + private String mobile; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private String bindDate; + private String realName; + private String nick; + private String photo; + @TableField(exist = false) + private String token; } diff --git a/src/main/java/com/yxt/yyth/api/lpkgiftcard/AppletVo.java b/src/main/java/com/yxt/yyth/api/lpkgiftcard/AppletVo.java index 490d72a..b3208dd 100644 --- a/src/main/java/com/yxt/yyth/api/lpkgiftcard/AppletVo.java +++ b/src/main/java/com/yxt/yyth/api/lpkgiftcard/AppletVo.java @@ -45,6 +45,8 @@ public class AppletVo { private List select; private String storeSid;//上次提货地点 private String addressName; + private String customerName; + private String cPhone; private String isReservation;//是否超过预约时间 0 否 1是 private boolean notRese=true; //是否能预约 private List orderCardVoList; diff --git a/src/main/java/com/yxt/yyth/api/lpkreserveorder/LpkReserveOrderCardVo.java b/src/main/java/com/yxt/yyth/api/lpkreserveorder/LpkReserveOrderCardVo.java index 21fc9ec..61dcf34 100644 --- a/src/main/java/com/yxt/yyth/api/lpkreserveorder/LpkReserveOrderCardVo.java +++ b/src/main/java/com/yxt/yyth/api/lpkreserveorder/LpkReserveOrderCardVo.java @@ -35,7 +35,7 @@ public class LpkReserveOrderCardVo implements Vo { private String goods; private String serialNumber; private String type; - + private String phone; public String getBagName() { if(StringUtils.isBlank(bagName)){ bagName="福礼卡"; diff --git a/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreMapper.java b/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreMapper.java new file mode 100644 index 0000000..d4bc772 --- /dev/null +++ b/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreMapper.java @@ -0,0 +1,21 @@ +package com.yxt.yyth.biz.customerstore; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.yxt.yyth.api.appletgiftbag.AppletGiftBagVo; +import com.yxt.yyth.api.appletgiftbag.GiftBagGoods; +import com.yxt.yyth.api.customerstore.CustomerStore; +import com.yxt.yyth.api.customerstore.CustomerStoreVo; +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/21 15:03 + */ +@Mapper +public interface CustomerStoreMapper extends BaseMapper { + CustomerStoreVo getStoreBySid(@Param("customerSid") String customerSid); +} diff --git a/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreMapper.xml b/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreMapper.xml new file mode 100644 index 0000000..9ea1b77 --- /dev/null +++ b/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreMapper.xml @@ -0,0 +1,11 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreRest.java b/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreRest.java new file mode 100644 index 0000000..8921229 --- /dev/null +++ b/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreRest.java @@ -0,0 +1,30 @@ +package com.yxt.yyth.biz.customerstore; + +import com.yxt.common.core.result.ResultBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author wangpengfei + * @date 2023/11/21 15:03 + */ + +@Api(tags = "客户网点关联") +@RestController +@RequestMapping("customerstore") +public class CustomerStoreRest { + + @Autowired + CustomerStoreService customerStoreService; + + @ApiOperation("我的默认提货地点") + @GetMapping("/getStoreBySid/{sid}") + public ResultBean getStoreBySid(@PathVariable String sid) { + return customerStoreService.getStoreBySid(sid); + } +} diff --git a/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreService.java b/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreService.java new file mode 100644 index 0000000..45ec5e1 --- /dev/null +++ b/src/main/java/com/yxt/yyth/biz/customerstore/CustomerStoreService.java @@ -0,0 +1,38 @@ +package com.yxt.yyth.biz.customerstore; + +import cn.hutool.core.bean.BeanUtil; +import com.alibaba.nacos.common.model.RestResult; +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.yyth.api.appletgiftbag.GiftBagGoods; +import com.yxt.yyth.api.customerstore.CustomerStore; +import com.yxt.yyth.api.customerstore.CustomerStoreDto; +import com.yxt.yyth.api.customerstore.CustomerStoreVo; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author wangpengfei + * @date 2023/11/21 15:03 + */ +@Service +public class CustomerStoreService extends MybatisBaseService { + + public ResultBean getStoreBySid(String customerSid) { + ResultBean rb=new ResultBean().fail(); + CustomerStoreVo vo=baseMapper.getStoreBySid(customerSid); + return rb.success().setData(vo); + } + public ResultBean saveStore(CustomerStoreDto dto){ + ResultBean rb=new ResultBean(); + baseMapper.delete(new QueryWrapper().eq("sid",dto.getCustomerSid())); + CustomerStore customerStore=new CustomerStore(); + BeanUtil.copyProperties(dto, customerStore, "id", "sid"); + baseMapper.insert(customerStore); + return rb.success().setMsg("成功"); + } +} diff --git a/src/main/java/com/yxt/yyth/biz/empcard/EmpCardService.java b/src/main/java/com/yxt/yyth/biz/empcard/EmpCardService.java index 597452b..a040e7e 100644 --- a/src/main/java/com/yxt/yyth/biz/empcard/EmpCardService.java +++ b/src/main/java/com/yxt/yyth/biz/empcard/EmpCardService.java @@ -16,6 +16,7 @@ import com.yxt.common.base.utils.StringUtils; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import com.yxt.yyth.api.customerstore.CustomerStoreVo; import com.yxt.yyth.api.empcard.*; import com.yxt.yyth.api.empcardbuildrecord.EmpCardBuildRecord; import com.yxt.yyth.api.empcardgift.EmpCardGift; @@ -32,6 +33,7 @@ import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderQuery; import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderVo; import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods; import com.yxt.yyth.api.lpkstore.LpkStoreDetailsVo; +import com.yxt.yyth.biz.customerstore.CustomerStoreService; import com.yxt.yyth.biz.empcardbuildrecord.EmpCardBuildRecordService; import com.yxt.yyth.biz.empcardgift.EmpCardGiftService; import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService; @@ -96,7 +98,8 @@ public class EmpCardService extends MybatisBaseService { private String urlPrefix; @Value("${weixin.qrcode.empCard}") String qrUrl; - + @Autowired + CustomerStoreService customerStoreService; public ResultBean bindCard(EmpCardDto bindCardDto) { @@ -448,15 +451,22 @@ public class EmpCardService extends MybatisBaseService { } } } - //上次取货点 - LpkReserveOrderVo vo1 = lpkReserveOrderService.getStoreByCustomerSid(vo.getCustomerSid()).getData(); - if (null != vo1) { - LpkStoreDetailsVo vo2 = lpkStoreService.storeInit(vo1.getStoreSid()).getData(); - if (null != vo2) { - vo.setAddressName(vo2.getName()); - vo.setValue(vo2.getSid()); - } + CustomerStoreVo customerStoreVo=customerStoreService.getStoreBySid(vo.getCustomerSid()).getData(); + if(null!=customerStoreVo){ + vo.setAddressName(customerStoreVo.getStoreName()); + vo.setValue(customerStoreVo.getStoreSid()); + vo.setCustomerName(customerStoreVo.getName()); + vo.setCPhone(customerStoreVo.getPhone()); } + //上次取货点 +// LpkReserveOrderVo vo1 = lpkReserveOrderService.getStoreByCustomerSid(vo.getCustomerSid()).getData(); +// if (null != vo1) { +// LpkStoreDetailsVo vo2 = lpkStoreService.storeInit(vo1.getStoreSid()).getData(); +// if (null != vo2) { +// vo.setAddressName(vo2.getName()); +// vo.setValue(vo2.getSid()); +// } +// } vo.setPName("企业菜窖"); vo.setOrderCardVoList(empReserveOrderCardVos); return rb.success().setData(vo); diff --git a/src/main/java/com/yxt/yyth/biz/empcardgift/EmpCardGiftService.java b/src/main/java/com/yxt/yyth/biz/empcardgift/EmpCardGiftService.java index 1f76c91..294a4a5 100644 --- a/src/main/java/com/yxt/yyth/biz/empcardgift/EmpCardGiftService.java +++ b/src/main/java/com/yxt/yyth/biz/empcardgift/EmpCardGiftService.java @@ -13,6 +13,7 @@ import com.yxt.common.base.utils.StringUtils; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import com.yxt.yyth.api.customerstore.CustomerStoreVo; import com.yxt.yyth.api.empcard.EmpAppletVo; import com.yxt.yyth.api.empcard.EmpCard; import com.yxt.yyth.api.empcardgift.*; @@ -32,6 +33,7 @@ import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods; import com.yxt.yyth.api.lpkstore.LpkStoreDetailsVo; import com.yxt.yyth.api.ordorder.OrdOrder; import com.yxt.yyth.api.ordorderdetails.OrdOrderDetail; +import com.yxt.yyth.biz.customerstore.CustomerStoreService; import com.yxt.yyth.biz.empcard.EmpCardService; import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService; import com.yxt.yyth.biz.empcardgrantlog.EmpCardGrantLogService; @@ -96,6 +98,8 @@ public class EmpCardGiftService extends MybatisBaseService empCardGift =baseMapper.selectList(new QueryWrapper().eq("empCardSid",vo.getSid()).eq("cardType","2").orderByDesc("createTime")); empCardGift.forEach(s->{ List list1= empCardGiftGoodsService.list(new QueryWrapper().eq("empCardGiftSid",s.getSid())); diff --git a/src/main/java/com/yxt/yyth/biz/empreserveordergoods/EmpReserveOrderGoodsService.java b/src/main/java/com/yxt/yyth/biz/empreserveordergoods/EmpReserveOrderGoodsService.java index 3bbeaca..1a0f22d 100644 --- a/src/main/java/com/yxt/yyth/biz/empreserveordergoods/EmpReserveOrderGoodsService.java +++ b/src/main/java/com/yxt/yyth/biz/empreserveordergoods/EmpReserveOrderGoodsService.java @@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.date.DateTime; import com.yxt.common.base.service.MybatisBaseService; import com.yxt.common.core.result.ResultBean; +import com.yxt.yyth.api.customerstore.CustomerStore; +import com.yxt.yyth.api.customerstore.CustomerStoreDto; import com.yxt.yyth.api.empcard.EmpAppletVo; import com.yxt.yyth.api.empcardgift.EmpGiftAppletVo; import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoodsVo; @@ -13,6 +15,7 @@ import com.yxt.yyth.api.lpkgiftcard.AppletVo; import com.yxt.yyth.api.empcardgift.GoodsVo; import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderDto; import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods; +import com.yxt.yyth.biz.customerstore.CustomerStoreService; import com.yxt.yyth.biz.empcard.EmpCardService; import com.yxt.yyth.biz.empcardgift.EmpCardGiftService; import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService; @@ -38,6 +41,8 @@ public class EmpReserveOrderGoodsService extends MybatisBaseService getReserveByCardSid(String carSid, String goodsSid) { ResultBean rb = new ResultBean(); EmpReserveOrderGoods goods = baseMapper.getReserveByCardSid(carSid, goodsSid); @@ -95,6 +100,12 @@ public class EmpReserveOrderGoodsService extends MybatisBaseService uploadImage(@RequestPart(value = "file") MultipartFile file) { + ResultBean rb = ResultBean.fireFail(); + if (file == null || file.isEmpty()) { + return rb.setMsg("文件为空"); + } + rb = fileUploadComponent.uploadFile(file, null); + return rb; + } + @ApiOperation("修改头像") + @PostMapping("/uploadAvatar") + public ResultBean uploadAvatar(@RequestBody LpkCustomerDto dto){ + return lpkCustomerService.uploadAvatar(dto); + } @Test public void a (){ long id= IdUtil.createSnowflake(1,1).nextId(); diff --git a/src/main/java/com/yxt/yyth/biz/lpkcustomer/LpkCustomerService.java b/src/main/java/com/yxt/yyth/biz/lpkcustomer/LpkCustomerService.java index 5535943..ef1f28f 100644 --- a/src/main/java/com/yxt/yyth/biz/lpkcustomer/LpkCustomerService.java +++ b/src/main/java/com/yxt/yyth/biz/lpkcustomer/LpkCustomerService.java @@ -12,10 +12,7 @@ import com.yxt.common.base.utils.StringUtils; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; -import com.yxt.yyth.api.lpkcustomer.LpkCustomer; -import com.yxt.yyth.api.lpkcustomer.LpkCustomerQuery; -import com.yxt.yyth.api.lpkcustomer.LpkCustomerVo; -import com.yxt.yyth.api.lpkcustomer.WxBindMobileDto; +import com.yxt.yyth.api.lpkcustomer.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; @@ -126,8 +123,23 @@ public class LpkCustomerService extends MybatisBaseService getCustomerInfo(String sid) { ResultBean rb = ResultBean.fireFail(); LpkCustomerVo lpkCustomer= baseMapper.getCustomerInfo(sid); + lpkCustomer.setPhoto(fileUploadComponent.getUrlPrefix() +lpkCustomer.getPhoto()); return rb.success().setData(lpkCustomer); } + public ResultBean uploadAvatar(LpkCustomerDto dto) { + ResultBean rb = ResultBean.fireFail(); + LpkCustomer lpkCustomer= baseMapper.selectOne(new QueryWrapper().eq("sid",dto.getSid())); + if (StringUtils.isNotBlank(dto.getPhoto())) { + String urlPrefix = fileUploadComponent.getUrlPrefix(); + String path = dto.getPhoto().substring(urlPrefix.length()); + lpkCustomer.setPhoto(path); + } + lpkCustomer.setMobile(dto.getMobile()); + lpkCustomer.setNick(dto.getNick()); + baseMapper.updateById(lpkCustomer); + + return rb.success().setMsg("修改成功"); + } public ResultBean> customerListPage(PagerQuery pq) { ResultBean rb = ResultBean.fireFail(); diff --git a/src/main/java/com/yxt/yyth/biz/lpkgiftcard/LpkGiftCardService.java b/src/main/java/com/yxt/yyth/biz/lpkgiftcard/LpkGiftCardService.java index 5b7af9a..20a62ab 100644 --- a/src/main/java/com/yxt/yyth/biz/lpkgiftcard/LpkGiftCardService.java +++ b/src/main/java/com/yxt/yyth/biz/lpkgiftcard/LpkGiftCardService.java @@ -27,6 +27,7 @@ import com.yxt.common.base.utils.StringUtils; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import com.yxt.yyth.api.customerstore.CustomerStoreVo; import com.yxt.yyth.api.empcard.EmpAppletNewVo; import com.yxt.yyth.api.empcard.EmpAppletVo; import com.yxt.yyth.api.empcardgift.*; @@ -49,6 +50,7 @@ import com.yxt.yyth.api.lpkreserveorder.*; import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods; import com.yxt.yyth.api.lpkstore.LpkStoreDetailsVo; import com.yxt.yyth.api.lpkstore.StoreSelect; +import com.yxt.yyth.biz.customerstore.CustomerStoreService; import com.yxt.yyth.biz.empcard.EmpCardService; import com.yxt.yyth.biz.empcardgift.EmpCardGiftService; import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService; @@ -119,6 +121,8 @@ public class LpkGiftCardService extends MybatisBaseService empCardGift =empCardGiftService.list(new QueryWrapper().eq("empCardSid",vo.getSid()).eq("cardType","3").orderByDesc("createTime")); empCardGift.forEach(s->{ List list1= empCardGiftGoodsService.list(new QueryWrapper().eq("empCardGiftSid",s.getSid())); diff --git a/src/main/java/com/yxt/yyth/biz/lpkreserveorder/LpkReserveOrderMapper.xml b/src/main/java/com/yxt/yyth/biz/lpkreserveorder/LpkReserveOrderMapper.xml index 5544bee..f51b718 100644 --- a/src/main/java/com/yxt/yyth/biz/lpkreserveorder/LpkReserveOrderMapper.xml +++ b/src/main/java/com/yxt/yyth/biz/lpkreserveorder/LpkReserveOrderMapper.xml @@ -362,7 +362,8 @@ o.sid as orderSid, o.userName, o.userPhone,c.serialNumber as serialNumber, - o.sid + o.sid, + s.phone FROM lpk_reserve_order AS o LEFT JOIN lpk_store AS s ON o.storeSid = s.sid LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid @@ -382,7 +383,8 @@ o.sid as orderSid, o.userName, o.userPhone,c.serialNumber as serialNumber, - o.sid + o.sid, + s.phone FROM lpk_reserve_order AS o LEFT JOIN lpk_store AS s ON o.storeSid = s.sid LEFT JOIN emp_card_gift AS c ON o.cardSid = c.sid @@ -402,7 +404,8 @@ o.sid as orderSid, o.userName, o.userPhone,c.serialNumber as serialNumber, - o.sid + o.sid, + s.phone 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 diff --git a/src/main/java/com/yxt/yyth/biz/lpkreserveordergoods/LpkReserveOrderGoodsService.java b/src/main/java/com/yxt/yyth/biz/lpkreserveordergoods/LpkReserveOrderGoodsService.java index 43dda42..addc65b 100644 --- a/src/main/java/com/yxt/yyth/biz/lpkreserveordergoods/LpkReserveOrderGoodsService.java +++ b/src/main/java/com/yxt/yyth/biz/lpkreserveordergoods/LpkReserveOrderGoodsService.java @@ -5,6 +5,7 @@ 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.yyth.api.customerstore.CustomerStoreDto; import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoodsVo; import com.yxt.yyth.api.lpkgiftcard.AppletVo; import com.yxt.yyth.api.lpkgiftcard.GoodsVo; @@ -13,6 +14,7 @@ import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrder; import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderDto; import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods; import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoodsDto; +import com.yxt.yyth.biz.customerstore.CustomerStoreService; import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService; import com.yxt.yyth.biz.lpkgiftcard.LpkGiftCardService; import org.springframework.beans.factory.annotation.Autowired; @@ -30,6 +32,8 @@ public class LpkReserveOrderGoodsService extends MybatisBaseService getReserveByCardSid(String carSid, String goodsSid) { ResultBean rb = new ResultBean(); @@ -79,6 +83,12 @@ public class LpkReserveOrderGoodsService extends MybatisBaseService