11/22
This commit is contained in:
@@ -16,4 +16,5 @@ public class LpkGiftBagGoodsVo implements Vo {
|
|||||||
private String goodsName;
|
private String goodsName;
|
||||||
private double goodsNumber;
|
private double goodsNumber;
|
||||||
private String picUrl;
|
private String picUrl;
|
||||||
|
private String goodsSid;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.yxt.yyth.api.lpkgiftcard;
|
package com.yxt.yyth.api.lpkgiftcard;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.yxt.yyth.api.lpkstore.StoreSelect;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -26,6 +27,7 @@ public class AppletVo {
|
|||||||
private String name="卡号:";
|
private String name="卡号:";
|
||||||
private String pName;
|
private String pName;
|
||||||
private List<GoodsVo> goodsVos;
|
private List<GoodsVo> goodsVos;
|
||||||
|
private List<StoreSelect> select;
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
name=name+code;
|
name=name+code;
|
||||||
@@ -33,7 +35,7 @@ public class AppletVo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getTime() {
|
public String getTime() {
|
||||||
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf =new SimpleDateFormat("yyyy.MM.dd");
|
||||||
time=sdf.format(DateUtil.parse(dateStart))+"~"+sdf.format(DateUtil.parse(dateEnd));
|
time=sdf.format(DateUtil.parse(dateStart))+"~"+sdf.format(DateUtil.parse(dateEnd));
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
@@ -47,17 +49,18 @@ public class AppletVo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getState() {
|
public String getState() {
|
||||||
int i=DateUtil.parse(dateEnd).compareTo(DateUtil.date());
|
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
|
||||||
if( String.valueOf(i).equals("1")){
|
int i=DateUtil.parse(sdf.format(DateUtil.parse(dateEnd))).compareTo(DateUtil.parse(sdf.format(DateUtil.date())));
|
||||||
|
if( String.valueOf(i).equals("-1")){
|
||||||
|
state="失效";
|
||||||
|
showBtn=false;
|
||||||
|
// appletVo.setShowBtn(true);
|
||||||
|
}else{
|
||||||
state="正常";
|
state="正常";
|
||||||
if(states.equals("5")){
|
if(states.equals("5")){
|
||||||
this.state="失效";
|
this.state="失效";
|
||||||
showBtn=false;
|
showBtn=false;
|
||||||
}
|
}
|
||||||
// appletVo.setShowBtn(true);
|
|
||||||
}else{
|
|
||||||
state="失效";
|
|
||||||
showBtn=false;
|
|
||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.yxt.yyth.api.lpkreserveorder;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LpkReserveOrder{
|
||||||
|
private String id;
|
||||||
|
private String sid= UUID.randomUUID().toString();
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||||
|
private String createTime;
|
||||||
|
private String remarks;
|
||||||
|
private String reserveType;
|
||||||
|
private String cardSid;
|
||||||
|
private String cardCode;
|
||||||
|
private String isCustomer;
|
||||||
|
private String customerSid;
|
||||||
|
private String userName;
|
||||||
|
private String userPhone;
|
||||||
|
private String userAddress;
|
||||||
|
private String storeSid;
|
||||||
|
private String reserveDate;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.yxt.yyth.api.lpkreserveorder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:29
|
||||||
|
*/
|
||||||
|
public class LpkReserveOrderDto {
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.yxt.yyth.api.lpkreserveorder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:30
|
||||||
|
*/
|
||||||
|
public class LpkReserveOrderQuery {
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.yxt.yyth.api.lpkreserveordergoods;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LpkReserveOrderGoods {
|
||||||
|
private String id;
|
||||||
|
private String sid= UUID.randomUUID().toString();
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||||
|
private String createTime;
|
||||||
|
private String remarks;
|
||||||
|
private String cardSid;
|
||||||
|
private String goodsSid;
|
||||||
|
private double goodsNumber;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.yxt.yyth.api.lpkreserveordergoods;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:29
|
||||||
|
*/
|
||||||
|
public class LpkReserveOrderGoodsDto {
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.yxt.yyth.api.lpkreserveordergoods;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:30
|
||||||
|
*/
|
||||||
|
public class LpkReserveOrderGoodsQuery {
|
||||||
|
}
|
||||||
13
src/main/java/com/yxt/yyth/api/lpkstore/StoreSelect.java
Normal file
13
src/main/java/com/yxt/yyth/api/lpkstore/StoreSelect.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package com.yxt.yyth.api.lpkstore;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 11:53
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StoreSelect {
|
||||||
|
private String value;
|
||||||
|
private String text;
|
||||||
|
}
|
||||||
@@ -112,6 +112,7 @@ public class LpkCustomerService extends MybatisBaseService<LpkCustomerMapper, Lp
|
|||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
LpkCustomerQuery query = pq.getParams();
|
LpkCustomerQuery query = pq.getParams();
|
||||||
QueryWrapper<LpkCustomer> qw = new QueryWrapper<>();
|
QueryWrapper<LpkCustomer> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("1","1");
|
||||||
if (StringUtils.isNotBlank(query.getMobile())) {
|
if (StringUtils.isNotBlank(query.getMobile())) {
|
||||||
qw.like("mobile", query.getMobile());
|
qw.like("mobile", query.getMobile());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public class LpkGiftBagService extends MybatisBaseService<LpkGiftBagMapper, LpkG
|
|||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
LpkGiftBagQuery query = pq.getParams();
|
LpkGiftBagQuery query = pq.getParams();
|
||||||
QueryWrapper<LpkGiftBag> qw = new QueryWrapper<>();
|
QueryWrapper<LpkGiftBag> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("1","1");
|
||||||
if (StringUtils.isNotBlank(query.getName())) {
|
if (StringUtils.isNotBlank(query.getName())) {
|
||||||
qw.like("name", query.getName());
|
qw.like("name", query.getName());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,9 +20,7 @@ public interface LpkGiftBagGoodsMapper extends BaseMapper<LpkGiftBagGoods> {
|
|||||||
|
|
||||||
int deleteGoodsByBagSid(@Param("sid") String sid);
|
int deleteGoodsByBagSid(@Param("sid") String sid);
|
||||||
|
|
||||||
List<LpkGiftBagGoods> getRecordsByBagSid(String sid);
|
@Select("select goods.name as goodsName,bads.goodsNumber ,bads.goodsSid,goods.picUrl from lpk_giftbag_goods bads left join lpk_goods goods on goods.sid =bads.goodsSid where bads.giftbagSid=#{sid}")
|
||||||
|
|
||||||
@Select("select goods.name as goodsName,bads.goodsNumber ,goods.picUrl from lpk_giftbag_goods bads left join lpk_goods goods on goods.sid =bads.goodsSid where bads.giftbagSid=#{sid}")
|
|
||||||
List<LpkGiftBagGoodsVo> getGoodsByBagSid(String sid);
|
List<LpkGiftBagGoodsVo> getGoodsByBagSid(String sid);
|
||||||
List<LpkGiftBagGoods> getRecordsByBagSid(@Param("sid") String sid);
|
List<LpkGiftBagGoods> getRecordsByBagSid(@Param("sid") String sid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,12 @@ public class LpkGiftCardRest {
|
|||||||
}
|
}
|
||||||
@GetMapping("/getGifCardBySid/{sid}")
|
@GetMapping("/getGifCardBySid/{sid}")
|
||||||
@ApiOperation(value = "获取礼包卡的详情信息")
|
@ApiOperation(value = "获取礼包卡的详情信息")
|
||||||
public ResultBean wxBindMobile(@PathVariable("sid")String sid) {
|
public ResultBean getGifCardBySid(@PathVariable("sid")String sid) {
|
||||||
return lpkGiftCardService.getGifCardBySid(sid);
|
return lpkGiftCardService.getGifCardBySid(sid);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/getReservationBySid/{sid}")
|
||||||
|
@ApiOperation(value = "查询可预约取货的详情")
|
||||||
|
public ResultBean getReservationBySid(@PathVariable("sid")String sid) {
|
||||||
|
return lpkGiftCardService.getReservationBySid(sid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ 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.lpkgiftbaggoods.LpkGiftBagGoodsVo;
|
import com.yxt.yyth.api.lpkgiftbaggoods.LpkGiftBagGoodsVo;
|
||||||
import com.yxt.yyth.api.lpkgiftcard.*;
|
import com.yxt.yyth.api.lpkgiftcard.*;
|
||||||
|
import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods;
|
||||||
|
import com.yxt.yyth.api.lpkstore.StoreSelect;
|
||||||
|
import com.yxt.yyth.biz.lpkreserveordergoods.LpkReserveOrderGoodsService;
|
||||||
|
import com.yxt.yyth.biz.lpkstore.LpkStoreService;
|
||||||
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.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -29,6 +33,10 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp
|
|||||||
private String urlPrefix;
|
private String urlPrefix;
|
||||||
@Autowired
|
@Autowired
|
||||||
com.yxt.yyth.biz.lpkgiftbaggoods.LpkGiftBagGoodsService LpkGiftBagGoodsService;
|
com.yxt.yyth.biz.lpkgiftbaggoods.LpkGiftBagGoodsService LpkGiftBagGoodsService;
|
||||||
|
@Autowired
|
||||||
|
LpkReserveOrderGoodsService lpkReserveOrderGoodsService;
|
||||||
|
@Autowired
|
||||||
|
LpkStoreService lpkStoreService;
|
||||||
|
|
||||||
public ResultBean bindCard( BindCardDto bindCardDto) {
|
public ResultBean bindCard( BindCardDto bindCardDto) {
|
||||||
ResultBean rb=new ResultBean().fail();
|
ResultBean rb=new ResultBean().fail();
|
||||||
@@ -95,5 +103,32 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp
|
|||||||
vo.setGoodsVos(goodsVos);
|
vo.setGoodsVos(goodsVos);
|
||||||
return rb.success().setData(vo);
|
return rb.success().setData(vo);
|
||||||
}
|
}
|
||||||
|
public ResultBean getReservationBySid(String sid) {
|
||||||
|
ResultBean rb=new ResultBean().fail();
|
||||||
|
AppletVo vo=baseMapper.getGifCardBySid(sid);
|
||||||
|
List<LpkGiftBagGoodsVo> list=LpkGiftBagGoodsService.getGoodsByBagSid(vo.getGiftbagSid());
|
||||||
|
List<StoreSelect> l=lpkStoreService.getAllStore().getData();
|
||||||
|
|
||||||
|
List<GoodsVo> goodsVos=new ArrayList<>();
|
||||||
|
list.forEach(s->{
|
||||||
|
LpkReserveOrderGoods goods=lpkReserveOrderGoodsService.getReserveByCardSid(vo.getSid(),s.getGoodsSid()).getData();
|
||||||
|
GoodsVo goodsVo=new GoodsVo();
|
||||||
|
goodsVo.setGoods(s.getGoodsName());
|
||||||
|
goodsVo.setNum(s.getGoodsNumber());
|
||||||
|
goodsVo.setPic(urlPrefix+s.getPicUrl());
|
||||||
|
if(null!=goods){
|
||||||
|
if(goods.getGoodsNumber()!=s.getGoodsNumber()){
|
||||||
|
goodsVo.setLNum(s.getGoodsNumber()-goods.getGoodsNumber());
|
||||||
|
goodsVos.add(goodsVo);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
goodsVo.setLNum(s.getGoodsNumber());
|
||||||
|
goodsVos.add(goodsVo);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
vo.setGoodsVos(goodsVos);
|
||||||
|
vo.setSelect(l);
|
||||||
|
return rb.success().setData(vo);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
|
|||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
LpkGoodsQuery query = pq.getParams();
|
LpkGoodsQuery query = pq.getParams();
|
||||||
QueryWrapper<LpkGoods> qw = new QueryWrapper<>();
|
QueryWrapper<LpkGoods> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("1","1");
|
||||||
if (StringUtils.isNotBlank(query.getName())) {
|
if (StringUtils.isNotBlank(query.getName())) {
|
||||||
qw.like("name", query.getName());
|
qw.like("name", query.getName());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.yxt.yyth.biz.lpkreserveorder;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrder;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:36
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LpkReserveOrderMapper extends BaseMapper<LpkReserveOrder> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?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.lpkreserveorder.LpkReserveOrderMapper">
|
||||||
|
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||||
|
<!-- ${ew.customSqlSegment} -->
|
||||||
|
|
||||||
|
<select id="storeListPage" resultType="com.yxt.yyth.api.lpkstore.LpkStoreVo">
|
||||||
|
select
|
||||||
|
sid,
|
||||||
|
date_format(createTime, '%Y-%m-%d') as createTime,
|
||||||
|
code,
|
||||||
|
`name`,
|
||||||
|
address,
|
||||||
|
phone,
|
||||||
|
businessHours
|
||||||
|
from lpk_store
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.yxt.yyth.biz.lpkreserveorder;
|
||||||
|
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
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.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:35
|
||||||
|
*/
|
||||||
|
@Api(tags = "预约订单信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("lpksreservoorder")
|
||||||
|
public class LpkReserveOrderRest {
|
||||||
|
@Autowired
|
||||||
|
LpkReserveOrderService lpkReserveOrderService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("预约提交")
|
||||||
|
@PostMapping("/submission")
|
||||||
|
public ResultBean submission(){
|
||||||
|
return lpkReserveOrderService.submission();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.yxt.yyth.biz.lpkreserveorder;
|
||||||
|
|
||||||
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrder;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:36
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class LpkReserveOrderService extends MybatisBaseService<LpkReserveOrderMapper, LpkReserveOrder> {
|
||||||
|
public ResultBean submission(){
|
||||||
|
ResultBean rb=new ResultBean();
|
||||||
|
return rb.success().setData("1");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.yxt.yyth.biz.lpkreserveordergoods;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.yxt.yyth.api.lpkreserveordergoods.LpkReserveOrderGoods;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:36
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface LpkReserveOrderGoodsMapper extends BaseMapper<LpkReserveOrderGoods> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?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.lpkreserveordergoods.LpkReserveOrderGoodsMapper">
|
||||||
|
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||||
|
<!-- ${ew.customSqlSegment} -->
|
||||||
|
|
||||||
|
<select id="storeListPage" resultType="com.yxt.yyth.api.lpkstore.LpkStoreVo">
|
||||||
|
select
|
||||||
|
sid,
|
||||||
|
date_format(createTime, '%Y-%m-%d') as createTime,
|
||||||
|
code,
|
||||||
|
`name`,
|
||||||
|
address,
|
||||||
|
phone,
|
||||||
|
businessHours
|
||||||
|
from lpk_store
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.yxt.yyth.biz.lpkreserveordergoods;
|
||||||
|
|
||||||
|
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.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("lpksreservoorder")
|
||||||
|
public class LpkReserveOrderGoodsRest {
|
||||||
|
@Autowired
|
||||||
|
LpkReserveOrderGoodsService lpkReserveOrderGoodsService;
|
||||||
|
|
||||||
|
|
||||||
|
// @ApiOperation("预约提交")
|
||||||
|
// @PostMapping("/getReserveByCardSid")
|
||||||
|
// public ResultBean getReserveByCardSid(String sid){
|
||||||
|
// return lpkReserveOrderGoodsService.getReserveByCardSid(sid);
|
||||||
|
// }
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.yxt.yyth.biz.lpkreserveordergoods;
|
||||||
|
|
||||||
|
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.lpkreserveordergoods.LpkReserveOrderGoods;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:36
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class LpkReserveOrderGoodsService extends MybatisBaseService<LpkReserveOrderGoodsMapper, LpkReserveOrderGoods> {
|
||||||
|
public ResultBean<LpkReserveOrderGoods> getReserveByCardSid(String carSid,String goodsSid){
|
||||||
|
ResultBean rb=new ResultBean();
|
||||||
|
LpkReserveOrderGoods goods= baseMapper.selectOne(new QueryWrapper<LpkReserveOrderGoods>().eq("cardSid",carSid).eq("goodsSid",goodsSid));
|
||||||
|
return rb.success().setData(goods);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,8 +7,12 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
|
|||||||
import com.yxt.yyth.api.lpkgoods.LpkGoods;
|
import com.yxt.yyth.api.lpkgoods.LpkGoods;
|
||||||
import com.yxt.yyth.api.lpkstore.LpkStore;
|
import com.yxt.yyth.api.lpkstore.LpkStore;
|
||||||
import com.yxt.yyth.api.lpkstore.LpkStoreVo;
|
import com.yxt.yyth.api.lpkstore.LpkStoreVo;
|
||||||
|
import com.yxt.yyth.api.lpkstore.StoreSelect;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author wangpengfei
|
* @author wangpengfei
|
||||||
@@ -19,4 +23,6 @@ public interface LpkStoreMapper extends BaseMapper<LpkStore> {
|
|||||||
|
|
||||||
|
|
||||||
IPage<LpkStoreVo> storeListPage(IPage<LpkStore> page, @Param(Constants.WRAPPER) QueryWrapper<LpkStore> qw);
|
IPage<LpkStoreVo> storeListPage(IPage<LpkStore> page, @Param(Constants.WRAPPER) QueryWrapper<LpkStore> qw);
|
||||||
|
@Select("select sid as value,name as text from lpk_store")
|
||||||
|
List<StoreSelect> getAllStore();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ public class LpkStoreRest {
|
|||||||
public ResultBean deleteStore(@PathVariable("sid") String sid) {
|
public ResultBean deleteStore(@PathVariable("sid") String sid) {
|
||||||
return lpkStoreService.deleteStore(sid);
|
return lpkStoreService.deleteStore(sid);
|
||||||
}
|
}
|
||||||
|
@ApiOperation("获取全部取货点")
|
||||||
|
@DeleteMapping("/getAllStore")
|
||||||
|
public ResultBean getAllStore(){
|
||||||
|
return lpkStoreService.getAllStore();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ import com.yxt.yyth.api.lpkgoods.LpkGoods;
|
|||||||
import com.yxt.yyth.api.lpkgoods.LpkGoodsQuery;
|
import com.yxt.yyth.api.lpkgoods.LpkGoodsQuery;
|
||||||
import com.yxt.yyth.api.lpkgoods.LpkGoodsVo;
|
import com.yxt.yyth.api.lpkgoods.LpkGoodsVo;
|
||||||
import com.yxt.yyth.api.lpkstore.*;
|
import com.yxt.yyth.api.lpkstore.*;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -32,6 +34,7 @@ public class LpkStoreService extends MybatisBaseService<LpkStoreMapper, LpkStore
|
|||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
LpkStoreQuery query = pq.getParams();
|
LpkStoreQuery query = pq.getParams();
|
||||||
QueryWrapper<LpkStore> qw = new QueryWrapper<>();
|
QueryWrapper<LpkStore> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("1","1");
|
||||||
if (StringUtils.isNotBlank(query.getName())) {
|
if (StringUtils.isNotBlank(query.getName())) {
|
||||||
qw.like("name", query.getName());
|
qw.like("name", query.getName());
|
||||||
}
|
}
|
||||||
@@ -77,4 +80,14 @@ public class LpkStoreService extends MybatisBaseService<LpkStoreMapper, LpkStore
|
|||||||
}
|
}
|
||||||
return rb.success();
|
return rb.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ResultBean<List<StoreSelect>> getAllStore(){
|
||||||
|
ResultBean rb=new ResultBean();
|
||||||
|
List<StoreSelect> vos= baseMapper.getAllStore();
|
||||||
|
return rb.success().setData(vos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user