1/12
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -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 {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -45,6 +45,8 @@ public class EmpAppletVo {
|
|||||||
private List<StoreSelect> select;
|
private List<StoreSelect> select;
|
||||||
private String storeSid;//上次提货地点
|
private String storeSid;//上次提货地点
|
||||||
private String addressName;
|
private String addressName;
|
||||||
|
private String customerName;
|
||||||
|
private String cPhone;
|
||||||
private String isReservation;//是否超过预约时间 0 否 1是
|
private String isReservation;//是否超过预约时间 0 否 1是
|
||||||
private boolean notRese=true; //是否能预约
|
private boolean notRese=true; //是否能预约
|
||||||
private List<EmpCardGiftVo> empCardGiftVos;
|
private List<EmpCardGiftVo> empCardGiftVos;
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ public class EmpGiftAppletVo {
|
|||||||
private List<StoreSelect> select;
|
private List<StoreSelect> select;
|
||||||
private String storeSid;//上次提货地点
|
private String storeSid;//上次提货地点
|
||||||
private String addressName;
|
private String addressName;
|
||||||
|
private String customerName;//提货人
|
||||||
|
private String cPhone;//提货号码
|
||||||
private String isReservation;//是否超过预约时间 0 否 1是
|
private String isReservation;//是否超过预约时间 0 否 1是
|
||||||
private boolean notRese = true; //是否能预约
|
private boolean notRese = true; //是否能预约
|
||||||
private List<LpkReserveOrderCardVo> orderCardVoList;
|
private List<LpkReserveOrderCardVo> orderCardVoList;
|
||||||
|
|||||||
@@ -1,9 +1,14 @@
|
|||||||
package com.yxt.yyth.api.lpkcustomer;
|
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 com.yxt.common.core.dto.Dto;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author wangpengfei
|
* @author wangpengfei
|
||||||
* @date 2023/11/21 15:13
|
* @date 2023/11/21 15:13
|
||||||
@@ -11,4 +16,21 @@ import lombok.Data;
|
|||||||
@ApiModel(value = "客户信息 数据传输对象", description = "客户信息 数据传输对象")
|
@ApiModel(value = "客户信息 数据传输对象", description = "客户信息 数据传输对象")
|
||||||
@Data
|
@Data
|
||||||
public class LpkCustomerDto implements Dto {
|
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ public class AppletVo {
|
|||||||
private List<StoreSelect> select;
|
private List<StoreSelect> select;
|
||||||
private String storeSid;//上次提货地点
|
private String storeSid;//上次提货地点
|
||||||
private String addressName;
|
private String addressName;
|
||||||
|
private String customerName;
|
||||||
|
private String cPhone;
|
||||||
private String isReservation;//是否超过预约时间 0 否 1是
|
private String isReservation;//是否超过预约时间 0 否 1是
|
||||||
private boolean notRese=true; //是否能预约
|
private boolean notRese=true; //是否能预约
|
||||||
private List<LpkReserveOrderCardVo> orderCardVoList;
|
private List<LpkReserveOrderCardVo> orderCardVoList;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class LpkReserveOrderCardVo implements Vo {
|
|||||||
private String goods;
|
private String goods;
|
||||||
private String serialNumber;
|
private String serialNumber;
|
||||||
private String type;
|
private String type;
|
||||||
|
private String phone;
|
||||||
public String getBagName() {
|
public String getBagName() {
|
||||||
if(StringUtils.isBlank(bagName)){
|
if(StringUtils.isBlank(bagName)){
|
||||||
bagName="福礼卡";
|
bagName="福礼卡";
|
||||||
|
|||||||
@@ -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<CustomerStore> {
|
||||||
|
CustomerStoreVo getStoreBySid(@Param("customerSid") String customerSid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.yxt.yyth.biz.customerstore.CustomerStoreMapper">
|
||||||
|
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||||
|
<!-- ${ew.customSqlSegment} -->
|
||||||
|
|
||||||
|
<select id="getStoreBySid" resultType="com.yxt.yyth.api.customerstore.CustomerStoreVo">
|
||||||
|
select s.name ,s.phone,t.name as storeName,t.address ,t.businessHours from customer_store s left join lpk_store t on s.storeSid=t.sid
|
||||||
|
where customerSid=#{customerSid}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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<CustomerStoreMapper, CustomerStore> {
|
||||||
|
|
||||||
|
public ResultBean<CustomerStoreVo> 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<CustomerStore>().eq("sid",dto.getCustomerSid()));
|
||||||
|
CustomerStore customerStore=new CustomerStore();
|
||||||
|
BeanUtil.copyProperties(dto, customerStore, "id", "sid");
|
||||||
|
baseMapper.insert(customerStore);
|
||||||
|
return rb.success().setMsg("成功");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@ import com.yxt.common.base.utils.StringUtils;
|
|||||||
import com.yxt.common.core.query.PagerQuery;
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
import com.yxt.common.core.result.ResultBean;
|
||||||
import com.yxt.common.core.vo.PagerVo;
|
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.empcard.*;
|
||||||
import com.yxt.yyth.api.empcardbuildrecord.EmpCardBuildRecord;
|
import com.yxt.yyth.api.empcardbuildrecord.EmpCardBuildRecord;
|
||||||
import com.yxt.yyth.api.empcardgift.EmpCardGift;
|
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.lpkreserveorder.LpkReserveOrderVo;
|
||||||
import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods;
|
import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods;
|
||||||
import com.yxt.yyth.api.lpkstore.LpkStoreDetailsVo;
|
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.empcardbuildrecord.EmpCardBuildRecordService;
|
||||||
import com.yxt.yyth.biz.empcardgift.EmpCardGiftService;
|
import com.yxt.yyth.biz.empcardgift.EmpCardGiftService;
|
||||||
import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService;
|
import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService;
|
||||||
@@ -96,7 +98,8 @@ public class EmpCardService extends MybatisBaseService<EmpCardMapper, EmpCard> {
|
|||||||
private String urlPrefix;
|
private String urlPrefix;
|
||||||
@Value("${weixin.qrcode.empCard}")
|
@Value("${weixin.qrcode.empCard}")
|
||||||
String qrUrl;
|
String qrUrl;
|
||||||
|
@Autowired
|
||||||
|
CustomerStoreService customerStoreService;
|
||||||
|
|
||||||
|
|
||||||
public ResultBean bindCard(EmpCardDto bindCardDto) {
|
public ResultBean bindCard(EmpCardDto bindCardDto) {
|
||||||
@@ -448,15 +451,22 @@ public class EmpCardService extends MybatisBaseService<EmpCardMapper, EmpCard> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//上次取货点
|
CustomerStoreVo customerStoreVo=customerStoreService.getStoreBySid(vo.getCustomerSid()).getData();
|
||||||
LpkReserveOrderVo vo1 = lpkReserveOrderService.getStoreByCustomerSid(vo.getCustomerSid()).getData();
|
if(null!=customerStoreVo){
|
||||||
if (null != vo1) {
|
vo.setAddressName(customerStoreVo.getStoreName());
|
||||||
LpkStoreDetailsVo vo2 = lpkStoreService.storeInit(vo1.getStoreSid()).getData();
|
vo.setValue(customerStoreVo.getStoreSid());
|
||||||
if (null != vo2) {
|
vo.setCustomerName(customerStoreVo.getName());
|
||||||
vo.setAddressName(vo2.getName());
|
vo.setCPhone(customerStoreVo.getPhone());
|
||||||
vo.setValue(vo2.getSid());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
//上次取货点
|
||||||
|
// 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.setPName("企业菜窖");
|
||||||
vo.setOrderCardVoList(empReserveOrderCardVos);
|
vo.setOrderCardVoList(empReserveOrderCardVos);
|
||||||
return rb.success().setData(vo);
|
return rb.success().setData(vo);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.yxt.common.base.utils.StringUtils;
|
|||||||
import com.yxt.common.core.query.PagerQuery;
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
import com.yxt.common.core.result.ResultBean;
|
||||||
import com.yxt.common.core.vo.PagerVo;
|
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.EmpAppletVo;
|
||||||
import com.yxt.yyth.api.empcard.EmpCard;
|
import com.yxt.yyth.api.empcard.EmpCard;
|
||||||
import com.yxt.yyth.api.empcardgift.*;
|
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.lpkstore.LpkStoreDetailsVo;
|
||||||
import com.yxt.yyth.api.ordorder.OrdOrder;
|
import com.yxt.yyth.api.ordorder.OrdOrder;
|
||||||
import com.yxt.yyth.api.ordorderdetails.OrdOrderDetail;
|
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.empcard.EmpCardService;
|
||||||
import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService;
|
import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService;
|
||||||
import com.yxt.yyth.biz.empcardgrantlog.EmpCardGrantLogService;
|
import com.yxt.yyth.biz.empcardgrantlog.EmpCardGrantLogService;
|
||||||
@@ -96,6 +98,8 @@ public class EmpCardGiftService extends MybatisBaseService<EmpCardGiftMapper, Em
|
|||||||
OrdOrderService ordOrderService;
|
OrdOrderService ordOrderService;
|
||||||
@Autowired
|
@Autowired
|
||||||
OrdOrderDetailService ordOrderDetailsService;
|
OrdOrderDetailService ordOrderDetailsService;
|
||||||
|
@Autowired
|
||||||
|
CustomerStoreService customerStoreService;
|
||||||
|
|
||||||
|
|
||||||
public ResultBean bindCard(BindCardDto bindCardDto) {
|
public ResultBean bindCard(BindCardDto bindCardDto) {
|
||||||
@@ -290,14 +294,21 @@ public class EmpCardGiftService extends MybatisBaseService<EmpCardGiftMapper, Em
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//上次取货点
|
//上次取货点
|
||||||
LpkReserveOrderVo vo1 = lpkReserveOrderService.getStoreByCustomerSid(vo.getCustomerSid()).getData();
|
CustomerStoreVo customerStoreVo=customerStoreService.getStoreBySid(vo.getCustomerSid()).getData();
|
||||||
if (null != vo1) {
|
if(null!=customerStoreVo){
|
||||||
LpkStoreDetailsVo vo2 = lpkStoreService.storeInit(vo1.getStoreSid()).getData();
|
vo.setAddressName(customerStoreVo.getStoreName());
|
||||||
if (null != vo2) {
|
vo.setValue(customerStoreVo.getStoreSid());
|
||||||
vo.setAddressName(vo2.getName());
|
vo.setCustomerName(customerStoreVo.getName());
|
||||||
vo.setValue(vo2.getSid());
|
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());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
List<EmpCardGift> empCardGift =baseMapper.selectList(new QueryWrapper<EmpCardGift>().eq("empCardSid",vo.getSid()).eq("cardType","2").orderByDesc("createTime"));
|
List<EmpCardGift> empCardGift =baseMapper.selectList(new QueryWrapper<EmpCardGift>().eq("empCardSid",vo.getSid()).eq("cardType","2").orderByDesc("createTime"));
|
||||||
empCardGift.forEach(s->{
|
empCardGift.forEach(s->{
|
||||||
List<EmpCardGiftGoods> list1= empCardGiftGoodsService.list(new QueryWrapper<EmpCardGiftGoods>().eq("empCardGiftSid",s.getSid()));
|
List<EmpCardGiftGoods> list1= empCardGiftGoodsService.list(new QueryWrapper<EmpCardGiftGoods>().eq("empCardGiftSid",s.getSid()));
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
|
|||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import com.yxt.common.base.service.MybatisBaseService;
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
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.empcard.EmpAppletVo;
|
||||||
import com.yxt.yyth.api.empcardgift.EmpGiftAppletVo;
|
import com.yxt.yyth.api.empcardgift.EmpGiftAppletVo;
|
||||||
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoodsVo;
|
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.empcardgift.GoodsVo;
|
||||||
import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderDto;
|
import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderDto;
|
||||||
import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods;
|
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.empcard.EmpCardService;
|
||||||
import com.yxt.yyth.biz.empcardgift.EmpCardGiftService;
|
import com.yxt.yyth.biz.empcardgift.EmpCardGiftService;
|
||||||
import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService;
|
import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService;
|
||||||
@@ -38,6 +41,8 @@ public class EmpReserveOrderGoodsService extends MybatisBaseService<EmpReserveOr
|
|||||||
private EmpCardService empCardService;
|
private EmpCardService empCardService;
|
||||||
@Autowired
|
@Autowired
|
||||||
EmpCardGiftGoodsService empCardGiftGoodsService;
|
EmpCardGiftGoodsService empCardGiftGoodsService;
|
||||||
|
@Autowired
|
||||||
|
CustomerStoreService customerStoreService;
|
||||||
public ResultBean<EmpReserveOrderGoods> getReserveByCardSid(String carSid, String goodsSid) {
|
public ResultBean<EmpReserveOrderGoods> getReserveByCardSid(String carSid, String goodsSid) {
|
||||||
ResultBean rb = new ResultBean();
|
ResultBean rb = new ResultBean();
|
||||||
EmpReserveOrderGoods goods = baseMapper.getReserveByCardSid(carSid, goodsSid);
|
EmpReserveOrderGoods goods = baseMapper.getReserveByCardSid(carSid, goodsSid);
|
||||||
@@ -95,6 +100,12 @@ public class EmpReserveOrderGoodsService extends MybatisBaseService<EmpReserveOr
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
CustomerStoreDto dto1=new CustomerStoreDto();
|
||||||
|
dto1.setCustomerSid(dto.getCustomerSid());
|
||||||
|
dto1.setName(dto.getUserName());
|
||||||
|
dto1.setPhone(dto.getUserPhone());
|
||||||
|
dto1.setStoreSid(dto.getStoreSid());
|
||||||
|
customerStoreService.saveStore(dto1);
|
||||||
return rb.success().setData("预约成功");
|
return rb.success().setData("预约成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,6 +156,12 @@ public class EmpReserveOrderGoodsService extends MybatisBaseService<EmpReserveOr
|
|||||||
} else {
|
} else {
|
||||||
empCardService.changState(dto.getSid(), "4");
|
empCardService.changState(dto.getSid(), "4");
|
||||||
}
|
}
|
||||||
|
CustomerStoreDto dto1=new CustomerStoreDto();
|
||||||
|
dto1.setCustomerSid(dto.getCustomerSid());
|
||||||
|
dto1.setName(dto.getUserName());
|
||||||
|
dto1.setPhone(dto.getUserPhone());
|
||||||
|
dto1.setStoreSid(dto.getStoreSid());
|
||||||
|
customerStoreService.saveStore(dto1);
|
||||||
return rb.success().setData("预约成功");
|
return rb.success().setData("预约成功");
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -2,18 +2,18 @@ package com.yxt.yyth.biz.lpkcustomer;
|
|||||||
|
|
||||||
import cn.hutool.Hutool;
|
import cn.hutool.Hutool;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||||
import com.yxt.common.core.query.PagerQuery;
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
|
import com.yxt.common.core.result.FileUploadResult;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
import com.yxt.common.core.result.ResultBean;
|
||||||
import com.yxt.common.core.vo.PagerVo;
|
import com.yxt.common.core.vo.PagerVo;
|
||||||
import com.yxt.yyth.api.lpkcustomer.LpkCustomer;
|
import com.yxt.yyth.api.lpkcustomer.*;
|
||||||
import com.yxt.yyth.api.lpkcustomer.LpkCustomerQuery;
|
|
||||||
import com.yxt.yyth.api.lpkcustomer.LpkCustomerVo;
|
|
||||||
import com.yxt.yyth.api.lpkcustomer.WxBindMobileDto;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author wangpengfei
|
* @author wangpengfei
|
||||||
@@ -27,6 +27,8 @@ public class LpkCustomerRest {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
LpkCustomerService lpkCustomerService;
|
LpkCustomerService lpkCustomerService;
|
||||||
|
@Autowired
|
||||||
|
private FileUploadComponent fileUploadComponent;
|
||||||
|
|
||||||
@PostMapping("/wxBindMobile")
|
@PostMapping("/wxBindMobile")
|
||||||
@ApiOperation(value = "微信绑定手机")
|
@ApiOperation(value = "微信绑定手机")
|
||||||
@@ -46,10 +48,25 @@ public class LpkCustomerRest {
|
|||||||
return lpkCustomerService.customerListPage(pq);
|
return lpkCustomerService.customerListPage(pq);
|
||||||
}
|
}
|
||||||
@ApiOperation("客户个人信息")
|
@ApiOperation("客户个人信息")
|
||||||
@GetMapping("/customerInfo")
|
@GetMapping("/customerInfo/{sid}")
|
||||||
public ResultBean customerInfo(String sid){
|
public ResultBean customerInfo(@PathVariable("sid") String sid){
|
||||||
return lpkCustomerService.getCustomerInfo(sid);
|
return lpkCustomerService.getCustomerInfo(sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/uploadfile")
|
||||||
|
public ResultBean<FileUploadResult> 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
|
@Test
|
||||||
public void a (){
|
public void a (){
|
||||||
long id= IdUtil.createSnowflake(1,1).nextId();
|
long id= IdUtil.createSnowflake(1,1).nextId();
|
||||||
|
|||||||
@@ -12,10 +12,7 @@ import com.yxt.common.base.utils.StringUtils;
|
|||||||
import com.yxt.common.core.query.PagerQuery;
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
import com.yxt.common.core.result.ResultBean;
|
||||||
import com.yxt.common.core.vo.PagerVo;
|
import com.yxt.common.core.vo.PagerVo;
|
||||||
import com.yxt.yyth.api.lpkcustomer.LpkCustomer;
|
import com.yxt.yyth.api.lpkcustomer.*;
|
||||||
import com.yxt.yyth.api.lpkcustomer.LpkCustomerQuery;
|
|
||||||
import com.yxt.yyth.api.lpkcustomer.LpkCustomerVo;
|
|
||||||
import com.yxt.yyth.api.lpkcustomer.WxBindMobileDto;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@@ -126,8 +123,23 @@ public class LpkCustomerService extends MybatisBaseService<LpkCustomerMapper, Lp
|
|||||||
public ResultBean<LpkCustomerVo> getCustomerInfo(String sid) {
|
public ResultBean<LpkCustomerVo> getCustomerInfo(String sid) {
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
LpkCustomerVo lpkCustomer= baseMapper.getCustomerInfo(sid);
|
LpkCustomerVo lpkCustomer= baseMapper.getCustomerInfo(sid);
|
||||||
|
lpkCustomer.setPhoto(fileUploadComponent.getUrlPrefix() +lpkCustomer.getPhoto());
|
||||||
return rb.success().setData(lpkCustomer);
|
return rb.success().setData(lpkCustomer);
|
||||||
}
|
}
|
||||||
|
public ResultBean<LpkCustomerVo> uploadAvatar(LpkCustomerDto dto) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
LpkCustomer lpkCustomer= baseMapper.selectOne(new QueryWrapper<LpkCustomer>().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<PagerVo<LpkCustomerVo>> customerListPage(PagerQuery<LpkCustomerQuery> pq) {
|
public ResultBean<PagerVo<LpkCustomerVo>> customerListPage(PagerQuery<LpkCustomerQuery> pq) {
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import com.yxt.common.base.utils.StringUtils;
|
|||||||
import com.yxt.common.core.query.PagerQuery;
|
import com.yxt.common.core.query.PagerQuery;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
import com.yxt.common.core.result.ResultBean;
|
||||||
import com.yxt.common.core.vo.PagerVo;
|
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.EmpAppletNewVo;
|
||||||
import com.yxt.yyth.api.empcard.EmpAppletVo;
|
import com.yxt.yyth.api.empcard.EmpAppletVo;
|
||||||
import com.yxt.yyth.api.empcardgift.*;
|
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.lpkreserveordergoods.LpkReserveOrderGoods;
|
||||||
import com.yxt.yyth.api.lpkstore.LpkStoreDetailsVo;
|
import com.yxt.yyth.api.lpkstore.LpkStoreDetailsVo;
|
||||||
import com.yxt.yyth.api.lpkstore.StoreSelect;
|
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.empcard.EmpCardService;
|
||||||
import com.yxt.yyth.biz.empcardgift.EmpCardGiftService;
|
import com.yxt.yyth.biz.empcardgift.EmpCardGiftService;
|
||||||
import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService;
|
import com.yxt.yyth.biz.empcardgiftgoods.EmpCardGiftGoodsService;
|
||||||
@@ -119,6 +121,8 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp
|
|||||||
EmpCardGiftGoodsService empCardGiftGoodsService;
|
EmpCardGiftGoodsService empCardGiftGoodsService;
|
||||||
@Autowired
|
@Autowired
|
||||||
EmpCardService empCardService;
|
EmpCardService empCardService;
|
||||||
|
@Autowired
|
||||||
|
CustomerStoreService customerStoreService;
|
||||||
|
|
||||||
public ResultBean bindCard(BindCardDto bindCardDto) {
|
public ResultBean bindCard(BindCardDto bindCardDto) {
|
||||||
ResultBean rb = new ResultBean().fail();
|
ResultBean rb = new ResultBean().fail();
|
||||||
@@ -338,14 +342,21 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LpkReserveOrderVo vo1 = lpkReserveOrderService.getStoreByCustomerSid(vo.getCustomerSid()).getData();
|
CustomerStoreVo customerStoreVo=customerStoreService.getStoreBySid(vo.getCustomerSid()).getData();
|
||||||
if (null != vo1) {
|
if(null!=customerStoreVo){
|
||||||
LpkStoreDetailsVo vo2 = lpkStoreService.storeInit(vo1.getStoreSid()).getData();
|
vo.setAddressName(customerStoreVo.getStoreName());
|
||||||
if (null != vo2) {
|
vo.setValue(customerStoreVo.getStoreSid());
|
||||||
vo.setAddressName(vo2.getName());
|
vo.setCustomerName(customerStoreVo.getName());
|
||||||
vo.setValue(vo2.getSid());
|
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());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
List<EmpCardGift> empCardGift =empCardGiftService.list(new QueryWrapper<EmpCardGift>().eq("empCardSid",vo.getSid()).eq("cardType","3").orderByDesc("createTime"));
|
List<EmpCardGift> empCardGift =empCardGiftService.list(new QueryWrapper<EmpCardGift>().eq("empCardSid",vo.getSid()).eq("cardType","3").orderByDesc("createTime"));
|
||||||
empCardGift.forEach(s->{
|
empCardGift.forEach(s->{
|
||||||
List<EmpCardGiftGoods> list1= empCardGiftGoodsService.list(new QueryWrapper<EmpCardGiftGoods>().eq("empCardGiftSid",s.getSid()));
|
List<EmpCardGiftGoods> list1= empCardGiftGoodsService.list(new QueryWrapper<EmpCardGiftGoods>().eq("empCardGiftSid",s.getSid()));
|
||||||
|
|||||||
@@ -362,7 +362,8 @@
|
|||||||
o.sid as orderSid,
|
o.sid as orderSid,
|
||||||
o.userName,
|
o.userName,
|
||||||
o.userPhone,c.serialNumber as serialNumber,
|
o.userPhone,c.serialNumber as serialNumber,
|
||||||
o.sid
|
o.sid,
|
||||||
|
s.phone
|
||||||
FROM lpk_reserve_order AS o
|
FROM lpk_reserve_order AS o
|
||||||
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid
|
||||||
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid
|
||||||
@@ -382,7 +383,8 @@
|
|||||||
o.sid as orderSid,
|
o.sid as orderSid,
|
||||||
o.userName,
|
o.userName,
|
||||||
o.userPhone,c.serialNumber as serialNumber,
|
o.userPhone,c.serialNumber as serialNumber,
|
||||||
o.sid
|
o.sid,
|
||||||
|
s.phone
|
||||||
FROM lpk_reserve_order AS o
|
FROM lpk_reserve_order AS o
|
||||||
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid
|
||||||
LEFT JOIN emp_card_gift AS c ON o.cardSid = c.sid
|
LEFT JOIN emp_card_gift AS c ON o.cardSid = c.sid
|
||||||
@@ -402,7 +404,8 @@
|
|||||||
o.sid as orderSid,
|
o.sid as orderSid,
|
||||||
o.userName,
|
o.userName,
|
||||||
o.userPhone,c.serialNumber as serialNumber,
|
o.userPhone,c.serialNumber as serialNumber,
|
||||||
o.sid
|
o.sid,
|
||||||
|
s.phone
|
||||||
FROM lpk_reserve_order AS o
|
FROM lpk_reserve_order AS o
|
||||||
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid
|
||||||
LEFT JOIN emp_card AS c ON o.cardSid = c.sid
|
LEFT JOIN emp_card AS c ON o.cardSid = c.sid
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import cn.hutool.core.date.DateTime;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.yxt.common.base.service.MybatisBaseService;
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
import com.yxt.common.core.result.ResultBean;
|
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.empcardgiftgoods.EmpCardGiftGoodsVo;
|
||||||
import com.yxt.yyth.api.lpkgiftcard.AppletVo;
|
import com.yxt.yyth.api.lpkgiftcard.AppletVo;
|
||||||
import com.yxt.yyth.api.lpkgiftcard.GoodsVo;
|
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.lpkreserveorder.LpkReserveOrderDto;
|
||||||
import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods;
|
import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods;
|
||||||
import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoodsDto;
|
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.empcardgiftgoods.EmpCardGiftGoodsService;
|
||||||
import com.yxt.yyth.biz.lpkgiftcard.LpkGiftCardService;
|
import com.yxt.yyth.biz.lpkgiftcard.LpkGiftCardService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -30,6 +32,8 @@ public class LpkReserveOrderGoodsService extends MybatisBaseService<LpkReserveOr
|
|||||||
LpkGiftCardService lpkGiftCardService;
|
LpkGiftCardService lpkGiftCardService;
|
||||||
@Autowired
|
@Autowired
|
||||||
EmpCardGiftGoodsService empCardGiftGoodsService;
|
EmpCardGiftGoodsService empCardGiftGoodsService;
|
||||||
|
@Autowired
|
||||||
|
CustomerStoreService customerStoreService;
|
||||||
|
|
||||||
public ResultBean<LpkReserveOrderGoods> getReserveByCardSid(String carSid, String goodsSid) {
|
public ResultBean<LpkReserveOrderGoods> getReserveByCardSid(String carSid, String goodsSid) {
|
||||||
ResultBean rb = new ResultBean();
|
ResultBean rb = new ResultBean();
|
||||||
@@ -79,6 +83,12 @@ public class LpkReserveOrderGoodsService extends MybatisBaseService<LpkReserveOr
|
|||||||
} else {
|
} else {
|
||||||
lpkGiftCardService.changState(dto.getSid(), "4");
|
lpkGiftCardService.changState(dto.getSid(), "4");
|
||||||
}
|
}
|
||||||
|
CustomerStoreDto dto1=new CustomerStoreDto();
|
||||||
|
dto1.setCustomerSid(dto.getCustomerSid());
|
||||||
|
dto1.setName(dto.getUserName());
|
||||||
|
dto1.setPhone(dto.getUserPhone());
|
||||||
|
dto1.setStoreSid(dto.getStoreSid());
|
||||||
|
customerStoreService.saveStore(dto1);
|
||||||
return rb.success().setData("预约成功");
|
return rb.success().setData("预约成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,4 +31,5 @@ public class OrdOrderRest {
|
|||||||
public ResultBean createOrder(@RequestBody OrdOrderDto dto) {
|
public ResultBean createOrder(@RequestBody OrdOrderDto dto) {
|
||||||
return ordOrderService.createOrder(dto);
|
return ordOrderService.createOrder(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user