1/8
This commit is contained in:
@@ -46,5 +46,6 @@ public class EmpCardGift {
|
|||||||
private Date endDate; //结束日期
|
private Date endDate; //结束日期
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date startDate; //开始日期
|
private Date startDate; //开始日期
|
||||||
|
private String isSenior;//是否是最高级的卡 1 是 2不是
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
34
src/main/java/com/yxt/yyth/api/ordorder/OrdOrder.java
Normal file
34
src/main/java/com/yxt/yyth/api/ordorder/OrdOrder.java
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
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 OrdOrder {
|
||||||
|
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 mainSid;
|
||||||
|
private int payStatus;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date payTime;
|
||||||
|
private int cardNumber;
|
||||||
|
private int source;
|
||||||
|
private String totalTee;
|
||||||
|
private String openId;
|
||||||
|
private String userSid;
|
||||||
|
private String name;
|
||||||
|
private int timeRemarks;
|
||||||
|
private String returnUrl;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
36
src/main/java/com/yxt/yyth/api/ordorder/OrdOrderDto.java
Normal file
36
src/main/java/com/yxt/yyth/api/ordorder/OrdOrderDto.java
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.yxt.common.core.dto.Dto;
|
||||||
|
import com.yxt.yyth.api.ordorderdetails.OrdOrderDetailVo;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/12/8 9:11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrdOrderDto 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 mainSid;
|
||||||
|
private int payStatus;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date payTime;
|
||||||
|
private int cardNumber;
|
||||||
|
private int source;
|
||||||
|
private String totalTee;
|
||||||
|
private String openId;
|
||||||
|
private String userSid;
|
||||||
|
private String name;
|
||||||
|
private int timeRemarks;
|
||||||
|
private String returnUrl;
|
||||||
|
private String customerSid;
|
||||||
|
private List<OrdOrderDetailVo> ordOrderDetailsVoList;
|
||||||
|
}
|
||||||
15
src/main/java/com/yxt/yyth/api/ordorder/OrdOrderQuery.java
Normal file
15
src/main/java/com/yxt/yyth/api/ordorder/OrdOrderQuery.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
import com.yxt.common.core.query.Query;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/12/8 9:11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrdOrderQuery implements Query {
|
||||||
|
private String startDate; //开始时间
|
||||||
|
private String endDate; //结束时间
|
||||||
|
private String countNumber; //总数
|
||||||
|
}
|
||||||
33
src/main/java/com/yxt/yyth/api/ordorder/OrdOrderVo.java
Normal file
33
src/main/java/com/yxt/yyth/api/ordorder/OrdOrderVo.java
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
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 OrdOrderVo 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 mainSid;
|
||||||
|
private int payStatus;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date payTime;
|
||||||
|
private int cardNumber;
|
||||||
|
private int source;
|
||||||
|
private String totalTee;
|
||||||
|
private String openId;
|
||||||
|
private String userSid;
|
||||||
|
private String name;
|
||||||
|
private int timeRemarks;
|
||||||
|
private String returnUrl;
|
||||||
|
}
|
||||||
12
src/main/java/com/yxt/yyth/api/ordorder/OrderParams.java
Normal file
12
src/main/java/com/yxt/yyth/api/ordorder/OrderParams.java
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/1/8 17:12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderParams {
|
||||||
|
private String mainSid;
|
||||||
|
}
|
||||||
14
src/main/java/com/yxt/yyth/api/ordorder/OrderUrl.java
Normal file
14
src/main/java/com/yxt/yyth/api/ordorder/OrderUrl.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/1/8 17:09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderUrl {
|
||||||
|
private String page=null;
|
||||||
|
private OrderParams params;
|
||||||
|
|
||||||
|
}
|
||||||
23
src/main/java/com/yxt/yyth/api/ordorder/PayOrderVo.java
Normal file
23
src/main/java/com/yxt/yyth/api/ordorder/PayOrderVo.java
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:
|
||||||
|
* @author: dimengzhe
|
||||||
|
* @date: 2024/1/8
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class PayOrderVo {
|
||||||
|
@ApiModelProperty("主订单sid")
|
||||||
|
private String mainSid;
|
||||||
|
@ApiModelProperty("订单编号")
|
||||||
|
private String outTradeNo;
|
||||||
|
@ApiModelProperty("订单创建时间")
|
||||||
|
private String createTime;
|
||||||
|
@ApiModelProperty("商品总价格")
|
||||||
|
private String price;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String goods;
|
||||||
|
}
|
||||||
12
src/main/java/com/yxt/yyth/api/ordorder/PayParams.java
Normal file
12
src/main/java/com/yxt/yyth/api/ordorder/PayParams.java
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/1/8 17:15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PayParams {
|
||||||
|
private String mainSid;
|
||||||
|
}
|
||||||
19
src/main/java/com/yxt/yyth/api/ordorder/PayResult.java
Normal file
19
src/main/java/com/yxt/yyth/api/ordorder/PayResult.java
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/1/8 17:08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PayResult {
|
||||||
|
private String price;
|
||||||
|
private String goods;
|
||||||
|
private String remainder;
|
||||||
|
private String orderId;
|
||||||
|
private OrderUrl order_url;
|
||||||
|
private PayUrl pay_url;
|
||||||
|
private TradeNoUrl trade_no_url;
|
||||||
|
private String[] bus;
|
||||||
|
}
|
||||||
13
src/main/java/com/yxt/yyth/api/ordorder/PayUrl.java
Normal file
13
src/main/java/com/yxt/yyth/api/ordorder/PayUrl.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/1/8 17:10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PayUrl {
|
||||||
|
private String url;
|
||||||
|
private PayParams params;
|
||||||
|
}
|
||||||
13
src/main/java/com/yxt/yyth/api/ordorder/TradeNoUrl.java
Normal file
13
src/main/java/com/yxt/yyth/api/ordorder/TradeNoUrl.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/1/8 17:11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class TradeNoUrl {
|
||||||
|
private String url;
|
||||||
|
private TradeParams params;
|
||||||
|
}
|
||||||
12
src/main/java/com/yxt/yyth/api/ordorder/TradeParams.java
Normal file
12
src/main/java/com/yxt/yyth/api/ordorder/TradeParams.java
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
package com.yxt.yyth.api.ordorder;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2024/1/8 17:17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class TradeParams {
|
||||||
|
private String trade_no;
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.yxt.yyth.api.ordorderdetails;
|
||||||
|
|
||||||
|
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 OrdOrderDetail {
|
||||||
|
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 String goodsName;
|
||||||
|
private int partNumber;
|
||||||
|
private double numofPart;
|
||||||
|
private double priceUnit;
|
||||||
|
private double pricePart;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.yxt.yyth.api.ordorderdetails;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.yxt.common.core.dto.Dto;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/12/8 9:11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrdOrderDetailDto 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 orderSid;
|
||||||
|
private String goodsSid;
|
||||||
|
private String goodsName;
|
||||||
|
private int partNumber;
|
||||||
|
private double numofPart;
|
||||||
|
private double priceUnit;
|
||||||
|
private double pricePart;
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.yxt.yyth.api.ordorderdetails;
|
||||||
|
|
||||||
|
import com.yxt.common.core.query.Query;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/12/8 9:11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrdOrderDetailQuery implements Query {
|
||||||
|
private String startDate; //开始时间
|
||||||
|
private String endDate; //结束时间
|
||||||
|
private String countNumber; //总数
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.yxt.yyth.api.ordorderdetails;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/12/8 9:11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrdOrderDetailVo 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 orderSid;
|
||||||
|
private String goodsSid;
|
||||||
|
private String goodsName;
|
||||||
|
private int partNumber;
|
||||||
|
private double numofPart;
|
||||||
|
private double priceUnit;
|
||||||
|
private double pricePart;
|
||||||
|
}
|
||||||
@@ -220,7 +220,7 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper
|
|||||||
DecimalFormat decimalFormat = new DecimalFormat("#0.00");
|
DecimalFormat decimalFormat = new DecimalFormat("#0.00");
|
||||||
for(GiftBagGoods goods:goodsList){
|
for(GiftBagGoods goods:goodsList){
|
||||||
// i=i+Double.valueOf(goods.getJPrice())*Double.valueOf(goods.getGoodsNumber());
|
// i=i+Double.valueOf(goods.getJPrice())*Double.valueOf(goods.getGoodsNumber());
|
||||||
i=i+Double.valueOf(goods.getJPrice())*Double.valueOf(goods.getWeight());
|
i=i+Double.valueOf(goods.getJPrice())*Double.valueOf(goods.getWeight())*Double.valueOf(goods.getGoodsNumber());
|
||||||
goods.setIconUrl(fileUploadComponent.getUrlPrefix() +goods.getIconUrl());
|
goods.setIconUrl(fileUploadComponent.getUrlPrefix() +goods.getIconUrl());
|
||||||
goods.setTotalValue(String.valueOf(decimalFormat.format(Double.valueOf(goods.getGoodsNumber())*Double.valueOf(goods.getJPrice())*Double.valueOf(goods.getWeight()))));
|
goods.setTotalValue(String.valueOf(decimalFormat.format(Double.valueOf(goods.getGoodsNumber())*Double.valueOf(goods.getJPrice())*Double.valueOf(goods.getWeight()))));
|
||||||
// goods.setJPrice(String.valueOf(decimalFormat.format(Double.valueOf(goods.getPrice())*Double.valueOf(goods.getWeight()))));
|
// goods.setJPrice(String.valueOf(decimalFormat.format(Double.valueOf(goods.getPrice())*Double.valueOf(goods.getWeight()))));
|
||||||
|
|||||||
@@ -75,6 +75,13 @@ public class EmpCardGiftRest {
|
|||||||
ResultBean<EmpCardGiftStatisticsVo> empCardGiftStatisticsList(@RequestBody PagerQuery<EmpCardGiftStatisticsQuery> query){
|
ResultBean<EmpCardGiftStatisticsVo> empCardGiftStatisticsList(@RequestBody PagerQuery<EmpCardGiftStatisticsQuery> query){
|
||||||
return EmpCardGiftService.empCardGiftStatisticsList(query);
|
return EmpCardGiftService.empCardGiftStatisticsList(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/generateTopEmpCard")
|
||||||
|
@ApiOperation(value = "云选菜购买生成顶级亲情卡")
|
||||||
|
public ResultBean generateTopEmpCard(@RequestParam("mainSid") String mainSid) {
|
||||||
|
return EmpCardGiftService.generateTopEmpCard(mainSid);
|
||||||
|
}
|
||||||
|
|
||||||
// @GetMapping("/getCardByBank")
|
// @GetMapping("/getCardByBank")
|
||||||
// @ApiOperation(value = "生成礼包卡信息")
|
// @ApiOperation(value = "生成礼包卡信息")
|
||||||
// public JSONObject getCardByBank(@RequestParam(value = "pageNo",defaultValue = "1")Integer pageNo,
|
// public JSONObject getCardByBank(@RequestParam(value = "pageNo",defaultValue = "1")Integer pageNo,
|
||||||
|
|||||||
@@ -15,34 +15,26 @@ 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.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.empcard.EmpCardQuery;
|
|
||||||
import com.yxt.yyth.api.empcard.EmpCardVo;
|
|
||||||
import com.yxt.yyth.api.empcardgift.*;
|
import com.yxt.yyth.api.empcardgift.*;
|
||||||
|
import com.yxt.yyth.api.empcardgift.GoodsVo;
|
||||||
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoods;
|
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoods;
|
||||||
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoodsDto;
|
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoodsDto;
|
||||||
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoodsVo;
|
import com.yxt.yyth.api.empcardgiftgoods.EmpCardGiftGoodsVo;
|
||||||
import com.yxt.yyth.api.empcardgrantlog.EmpCardGrantLog;
|
import com.yxt.yyth.api.empcardgrantlog.EmpCardGrantLog;
|
||||||
import com.yxt.yyth.api.empcardgrantlog.EmpCardGrantLogVo;
|
import com.yxt.yyth.api.empcardgrantlog.EmpCardGrantLogVo;
|
||||||
import com.yxt.yyth.api.empreserveorder.EmpReserveOrderCardVo;
|
|
||||||
import com.yxt.yyth.api.empreserveorder.EmpReserveOrderVo;
|
|
||||||
import com.yxt.yyth.api.empreserveordergoods.EmpReserveOrderGoods;
|
|
||||||
import com.yxt.yyth.api.lpkcardbuildrecord.LpkCardBuildRecord;
|
|
||||||
import com.yxt.yyth.api.lpkgiftbag.LpkGiftBag;
|
import com.yxt.yyth.api.lpkgiftbag.LpkGiftBag;
|
||||||
import com.yxt.yyth.api.lpkgiftcard.AppletVo;
|
import com.yxt.yyth.api.lpkgiftcard.*;
|
||||||
import com.yxt.yyth.api.lpkgiftcard.BindCardDto;
|
|
||||||
import com.yxt.yyth.api.lpkgiftcard.LpkGiftCard;
|
|
||||||
import com.yxt.yyth.api.lpkgoods.LpkGoods;
|
import com.yxt.yyth.api.lpkgoods.LpkGoods;
|
||||||
import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderCardVo;
|
import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderCardVo;
|
||||||
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.api.ordorder.OrdOrder;
|
||||||
|
import com.yxt.yyth.api.ordorderdetails.OrdOrderDetail;
|
||||||
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;
|
||||||
import com.yxt.yyth.biz.empreserveorder.EmpReserveOrderService;
|
|
||||||
import com.yxt.yyth.biz.empreserveordergoods.EmpReserveOrderGoodsService;
|
|
||||||
import com.yxt.yyth.biz.lpkgiftbag.LpkGiftBagService;
|
import com.yxt.yyth.biz.lpkgiftbag.LpkGiftBagService;
|
||||||
import com.yxt.yyth.biz.lpkgiftcard.LpkGiftCardRest;
|
|
||||||
import com.yxt.yyth.biz.lpkgiftcard.LpkGiftCardService;
|
import com.yxt.yyth.biz.lpkgiftcard.LpkGiftCardService;
|
||||||
import com.yxt.yyth.biz.lpkgiftcard.generateRule.UniqueIdGenerator;
|
import com.yxt.yyth.biz.lpkgiftcard.generateRule.UniqueIdGenerator;
|
||||||
import com.yxt.yyth.biz.lpkgoods.LpkGoodsService;
|
import com.yxt.yyth.biz.lpkgoods.LpkGoodsService;
|
||||||
@@ -50,22 +42,17 @@ import com.yxt.yyth.biz.lpkreserveorder.LpkReserveOrderService;
|
|||||||
import com.yxt.yyth.biz.lpkreserveordergoods.LpkReserveOrderGoodsMapper;
|
import com.yxt.yyth.biz.lpkreserveordergoods.LpkReserveOrderGoodsMapper;
|
||||||
import com.yxt.yyth.biz.lpkreserveordergoods.LpkReserveOrderGoodsService;
|
import com.yxt.yyth.biz.lpkreserveordergoods.LpkReserveOrderGoodsService;
|
||||||
import com.yxt.yyth.biz.lpkstore.LpkStoreService;
|
import com.yxt.yyth.biz.lpkstore.LpkStoreService;
|
||||||
|
import com.yxt.yyth.biz.ordorder.OrdOrderService;
|
||||||
|
import com.yxt.yyth.biz.ordorderdetails.OrdOrderDetailService;
|
||||||
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;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.*;
|
import java.time.*;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author wangpengfei
|
* @author wangpengfei
|
||||||
@@ -104,6 +91,10 @@ public class EmpCardGiftService extends MybatisBaseService<EmpCardGiftMapper, Em
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private HttpServletResponse response;
|
private HttpServletResponse response;
|
||||||
|
@Autowired
|
||||||
|
OrdOrderService ordOrderService;
|
||||||
|
@Autowired
|
||||||
|
OrdOrderDetailService ordOrderDetailsService;
|
||||||
|
|
||||||
|
|
||||||
public ResultBean bindCard(BindCardDto bindCardDto) {
|
public ResultBean bindCard(BindCardDto bindCardDto) {
|
||||||
@@ -1064,4 +1055,60 @@ public class EmpCardGiftService extends MybatisBaseService<EmpCardGiftMapper, Em
|
|||||||
vo.setReserveDate(vo.getStart());
|
vo.setReserveDate(vo.getStart());
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public ResultBean generateTopEmpCard(String mainSid) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
|
||||||
|
int count=0;
|
||||||
|
OrdOrder order=ordOrderService.getOne(new QueryWrapper<OrdOrder>().eq("mainSid",mainSid));
|
||||||
|
count=order.getCardNumber();
|
||||||
|
List<OrdOrderDetail> list=ordOrderDetailsService.list(new QueryWrapper<OrdOrderDetail>().eq("orderSid",order.getSid()));
|
||||||
|
for (int k = 0; k < count; k++) {
|
||||||
|
EmpCardGift card = new EmpCardGift();
|
||||||
|
card.setCardType("3");
|
||||||
|
// card.setRemarks(dto.getRemarks());
|
||||||
|
card.setState("3");
|
||||||
|
card.setCreateTime(new DateTime());
|
||||||
|
card.setGrantDate(new Date());
|
||||||
|
card.setEndDate(DateUtil.parse("2024-03-31"));
|
||||||
|
card.setStartDate(new Date());
|
||||||
|
card.setIsSenior("1");
|
||||||
|
card.setCustomerSid(order.getSid());
|
||||||
|
String cardArea = "1";
|
||||||
|
String maxSerNum = baseMapper.selctMaxSerNum(cardArea);
|
||||||
|
String uuid = UniqueIdGenerator.generateUniqueID();
|
||||||
|
int randomNumber = new Random().nextInt(900000) + 100000;
|
||||||
|
card.setCodeKey(String.valueOf(randomNumber));
|
||||||
|
card.setCode("99" + uuid.substring(2));
|
||||||
|
if (StringUtils.isBlank(maxSerNum)) {
|
||||||
|
card.setSerialNumber(cardArea + "0000001");
|
||||||
|
} else {
|
||||||
|
String substringSer = maxSerNum.substring(cardArea.length());
|
||||||
|
int i1 = Integer.parseInt(substringSer);
|
||||||
|
int finNum = i1 + 1;
|
||||||
|
int length = String.valueOf(finNum).length();
|
||||||
|
int len = 7 - length;
|
||||||
|
String num = String.valueOf(finNum);
|
||||||
|
for (int a = 0; a < len; a++) {
|
||||||
|
num = "0" + num;
|
||||||
|
}
|
||||||
|
card.setSerialNumber(cardArea + num);
|
||||||
|
}
|
||||||
|
baseMapper.insert(card);
|
||||||
|
for (OrdOrderDetail vo : list) {
|
||||||
|
if(vo.getPartNumber()!=0){
|
||||||
|
EmpCardGiftGoodsDto dto1 = new EmpCardGiftGoodsDto();
|
||||||
|
dto1.setEmpCardGiftSid(card.getSid());
|
||||||
|
dto1.setGoodsSid(vo.getGoodsSid());
|
||||||
|
dto1.setGoodsNumber(vo.getPartNumber()/count);
|
||||||
|
empCardGiftGoodsService.save(dto1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rb.success();
|
||||||
|
}
|
||||||
|
///
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ public class LpkCustomerService extends MybatisBaseService<LpkCustomerMapper, Lp
|
|||||||
baseMapper.updateById(lpkCustomer);
|
baseMapper.updateById(lpkCustomer);
|
||||||
return rb.success().setMsg("绑定成功").setData(lpkCustomer.getSid());
|
return rb.success().setMsg("绑定成功").setData(lpkCustomer.getSid());
|
||||||
}
|
}
|
||||||
public ResultBean 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);
|
||||||
return rb.success().setData(lpkCustomer);
|
return rb.success().setData(lpkCustomer);
|
||||||
|
|||||||
22
src/main/java/com/yxt/yyth/biz/ordorder/OrdOrderMapper.java
Normal file
22
src/main/java/com/yxt/yyth/biz/ordorder/OrdOrderMapper.java
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package com.yxt.yyth.biz.ordorder;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
|
import com.yxt.yyth.api.empreserveorder.*;
|
||||||
|
import com.yxt.yyth.api.ordorder.OrdOrder;
|
||||||
|
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 OrdOrderMapper extends BaseMapper<OrdOrder> {
|
||||||
|
|
||||||
|
}
|
||||||
114
src/main/java/com/yxt/yyth/biz/ordorder/OrdOrderMapper.xml
Normal file
114
src/main/java/com/yxt/yyth/biz/ordorder/OrdOrderMapper.xml
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
<?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.ordorder.OrdOrderMapper">
|
||||||
|
<!-- <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>
|
||||||
|
<select id="orderList" resultType="com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderVo">
|
||||||
|
select
|
||||||
|
o.sid,
|
||||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
o.userName,
|
||||||
|
o.userPhone,
|
||||||
|
s.`name` as store,
|
||||||
|
b.`name` as bagName,
|
||||||
|
c.`code`
|
||||||
|
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
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="orderListByStore" resultType="com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderVo">
|
||||||
|
select
|
||||||
|
o.sid,
|
||||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
s.`name` as store,
|
||||||
|
s.sid as storeSid
|
||||||
|
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
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="orderByCardSid" resultType="com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderCardVo">
|
||||||
|
SELECT date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
c.`code`,
|
||||||
|
s.`name` as store,
|
||||||
|
b.`name` as bagName,
|
||||||
|
o.sid as orderSid
|
||||||
|
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
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
WHERE o.cardSid = #{sid}
|
||||||
|
</select>
|
||||||
|
<select id="orderListByUserSid" resultType="com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderCardVo">
|
||||||
|
SELECT date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
c.`code`,
|
||||||
|
s.`name` as store,
|
||||||
|
b.`name` as bagName,
|
||||||
|
o.cardSid as cardSid,
|
||||||
|
o.sid as orderSid,
|
||||||
|
o.userName,
|
||||||
|
o.userPhone,c.serialNumber as serialNumber,
|
||||||
|
o.sid
|
||||||
|
FROM lpk_reserve_order AS o
|
||||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid
|
||||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="exportExcel" resultType="com.yxt.yyth.api.lpkreserveorder.ReserveOrderExport">
|
||||||
|
select
|
||||||
|
o.sid,
|
||||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
o.userName,
|
||||||
|
o.userPhone,
|
||||||
|
s.`name` as store,
|
||||||
|
b.`name` as bagName,
|
||||||
|
c.`code`
|
||||||
|
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
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="exportExcelByStore" resultType="com.yxt.yyth.api.lpkreserveorder.ReserveOrderExportByStore">
|
||||||
|
select
|
||||||
|
o.sid,
|
||||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
s.`name` as store,
|
||||||
|
s.sid as storeSid
|
||||||
|
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
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
34
src/main/java/com/yxt/yyth/biz/ordorder/OrdOrderRest.java
Normal file
34
src/main/java/com/yxt/yyth/biz/ordorder/OrdOrderRest.java
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
package com.yxt.yyth.biz.ordorder;
|
||||||
|
|
||||||
|
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.empcardgift.EmpCardGiftDto;
|
||||||
|
import com.yxt.yyth.api.empreserveorder.EmpReserveOrderCardVo;
|
||||||
|
import com.yxt.yyth.api.empreserveorder.EmpReserveOrderQuery;
|
||||||
|
import com.yxt.yyth.api.empreserveorder.EmpReserveOrderVo;
|
||||||
|
import com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderDto;
|
||||||
|
import com.yxt.yyth.api.ordorder.OrdOrderDto;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:35
|
||||||
|
*/
|
||||||
|
@Api(tags = "预约订单信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/empsreservoorder")
|
||||||
|
public class OrdOrderRest {
|
||||||
|
@Autowired
|
||||||
|
OrdOrderService ordOrderService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/createOrder")
|
||||||
|
@ApiOperation(value = "创建订单")
|
||||||
|
public ResultBean createOrder(@RequestBody OrdOrderDto dto) {
|
||||||
|
return ordOrderService.createOrder(dto);
|
||||||
|
}
|
||||||
|
}
|
||||||
123
src/main/java/com/yxt/yyth/biz/ordorder/OrdOrderService.java
Normal file
123
src/main/java/com/yxt/yyth/biz/ordorder/OrdOrderService.java
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
package com.yxt.yyth.biz.ordorder;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
import com.yxt.common.core.result.ResultBean;
|
||||||
|
import com.yxt.yyth.api.lpkcustomer.LpkCustomerVo;
|
||||||
|
import com.yxt.yyth.api.ordorder.*;
|
||||||
|
import com.yxt.yyth.api.ordorderdetails.OrdOrderDetail;
|
||||||
|
import com.yxt.yyth.biz.lpkcustomer.LpkCustomerService;
|
||||||
|
import com.yxt.yyth.biz.ordorderdetails.OrdOrderDetailService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:36
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OrdOrderService extends MybatisBaseService<OrdOrderMapper, OrdOrder> {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
OrdOrderDetailService ordOrderDetailsService;
|
||||||
|
@Autowired
|
||||||
|
LpkCustomerService lpkCustomerService;
|
||||||
|
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public ResultBean createOrder(OrdOrderDto dto) {
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
PayResult result=new PayResult();
|
||||||
|
Map<String,Object>map =new HashMap<>();
|
||||||
|
LpkCustomerVo vo= lpkCustomerService.getCustomerInfo(dto.getCustomerSid()).getData();
|
||||||
|
Map<String, Object> sendBody=buildMessageBody( vo.getSid(), vo.getWxMpOpenid(),dto.getTotalTee(),dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"等"+(dto.getOrdOrderDetailsVoList().size()-1)+"件商品");
|
||||||
|
ResponseEntity<ResultBean> postForEntity=new RestTemplate().postForEntity("https://supervise.yxtsoft.com/wxPay/order/createOrder", sendBody,ResultBean.class);
|
||||||
|
|
||||||
|
ResultBean<PayOrderVo> rb1= postForEntity.getBody();
|
||||||
|
LinkedHashMap rb2= (LinkedHashMap)postForEntity.getBody().getData();
|
||||||
|
if(!rb1.getCode().equals("200")){
|
||||||
|
return rb1;
|
||||||
|
}
|
||||||
|
OrdOrder order=new OrdOrder();
|
||||||
|
BeanUtil.copyProperties(dto, order, "id", "sid");
|
||||||
|
|
||||||
|
order.setMainSid(rb2.get("mainSid").toString());
|
||||||
|
order.setPayStatus(1);
|
||||||
|
order.setPayTime(new Date());
|
||||||
|
order.setCardNumber(dto.getCardNumber());
|
||||||
|
order.setSource(0);
|
||||||
|
order.setUserSid(vo.getSid());
|
||||||
|
order.setOpenId(vo.getWxMpOpenid());
|
||||||
|
order.setTotalTee(dto.getTotalTee());
|
||||||
|
if(dto.getOrdOrderDetailsVoList().size()>1){
|
||||||
|
order.setName(dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"等"+(dto.getOrdOrderDetailsVoList().size()-1)+"件商品");
|
||||||
|
}
|
||||||
|
// order.setName("商品");
|
||||||
|
order.setTimeRemarks(10);
|
||||||
|
order.setReturnUrl("https://supervise.yxtsoft.com/lpkapi/empcardgift/generateTopEmpCard?mainSid=");
|
||||||
|
baseMapper.insert(order);
|
||||||
|
|
||||||
|
|
||||||
|
List<OrdOrderDetail> ordOrders=new ArrayList<>();
|
||||||
|
dto.getOrdOrderDetailsVoList().forEach(s->{
|
||||||
|
OrdOrderDetail ordOrderDetails=new OrdOrderDetail();
|
||||||
|
BeanUtil.copyProperties(s, ordOrderDetails, "id", "sid");
|
||||||
|
ordOrderDetails.setOrderSid(order.getSid());
|
||||||
|
|
||||||
|
ordOrders.add(ordOrderDetails);
|
||||||
|
|
||||||
|
});
|
||||||
|
ordOrderDetailsService.saveBatch(ordOrders);
|
||||||
|
if(dto.getOrdOrderDetailsVoList().size()>1){
|
||||||
|
result.setGoods(dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"等"+(dto.getOrdOrderDetailsVoList().size()-1)+"件商品");
|
||||||
|
}else{
|
||||||
|
result.setGoods(dto.getOrdOrderDetailsVoList().get(0).getGoodsName().toString()+"商品");
|
||||||
|
}
|
||||||
|
|
||||||
|
result.setPrice(dto.getTotalTee());
|
||||||
|
// result.setOrderId(rbData.getOutTradeNo());
|
||||||
|
result.setOrderId(rb2.get("outTradeNo").toString());
|
||||||
|
result.setRemainder(String.valueOf(10*60));
|
||||||
|
|
||||||
|
PayUrl payUrl=new PayUrl();
|
||||||
|
payUrl.setUrl("https://supervise.yxtsoft.com/wxPay/order/pay");
|
||||||
|
PayParams aVoid=new PayParams();
|
||||||
|
aVoid.setMainSid(rb2.get("mainSid").toString());
|
||||||
|
payUrl.setParams(aVoid);
|
||||||
|
|
||||||
|
OrderUrl orderUrl=new OrderUrl();
|
||||||
|
orderUrl.setPage("");
|
||||||
|
OrderParams orderParams=new OrderParams();
|
||||||
|
orderParams.setMainSid("");
|
||||||
|
orderUrl.setParams(orderParams);
|
||||||
|
|
||||||
|
TradeNoUrl tradeNoUrl=new TradeNoUrl();
|
||||||
|
tradeNoUrl.setUrl("https://supervise.yxtsoft.com/wxPay/order/orderQuery");
|
||||||
|
TradeParams tradeParams=new TradeParams();
|
||||||
|
tradeParams.setTrade_no(rb2.get("mainSid").toString());
|
||||||
|
tradeNoUrl.setParams(tradeParams);
|
||||||
|
|
||||||
|
result.setOrder_url(orderUrl);
|
||||||
|
result.setPay_url(payUrl);
|
||||||
|
// result
|
||||||
|
return rb.success().setData(result);
|
||||||
|
}
|
||||||
|
private static Map<String, Object> buildMessageBody(String userSid,String openId,String totalTee,String name){
|
||||||
|
//拼接base参数
|
||||||
|
Map<String, Object> mp_template_msg = new HashMap<>();
|
||||||
|
mp_template_msg.put("source", "0");
|
||||||
|
mp_template_msg.put("totalTee", totalTee);
|
||||||
|
mp_template_msg.put("openId", openId);
|
||||||
|
mp_template_msg.put("userSid", userSid);
|
||||||
|
mp_template_msg.put("name", name);
|
||||||
|
mp_template_msg.put("timeRemarks", "10");
|
||||||
|
mp_template_msg.put("returnUrl", "https://supervise.yxtsoft.com/lpkapi/empcardgift/generateTopEmpCard?mainSid=");
|
||||||
|
return mp_template_msg;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.yxt.yyth.biz.ordorderdetails;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.yxt.yyth.api.ordorderdetails.OrdOrderDetail;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:36
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface OrdOrderDetailMapper extends BaseMapper<OrdOrderDetail> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
<?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.ordorderdetails.OrdOrderDetailMapper">
|
||||||
|
<!-- <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>
|
||||||
|
<select id="orderList" resultType="com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderVo">
|
||||||
|
select
|
||||||
|
o.sid,
|
||||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
o.userName,
|
||||||
|
o.userPhone,
|
||||||
|
s.`name` as store,
|
||||||
|
b.`name` as bagName,
|
||||||
|
c.`code`
|
||||||
|
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
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="orderListByStore" resultType="com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderVo">
|
||||||
|
select
|
||||||
|
o.sid,
|
||||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
s.`name` as store,
|
||||||
|
s.sid as storeSid
|
||||||
|
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
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="orderByCardSid" resultType="com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderCardVo">
|
||||||
|
SELECT date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
c.`code`,
|
||||||
|
s.`name` as store,
|
||||||
|
b.`name` as bagName,
|
||||||
|
o.sid as orderSid
|
||||||
|
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
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
WHERE o.cardSid = #{sid}
|
||||||
|
</select>
|
||||||
|
<select id="orderListByUserSid" resultType="com.yxt.yyth.api.lpkreserveorder.LpkReserveOrderCardVo">
|
||||||
|
SELECT date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
c.`code`,
|
||||||
|
s.`name` as store,
|
||||||
|
b.`name` as bagName,
|
||||||
|
o.cardSid as cardSid,
|
||||||
|
o.sid as orderSid,
|
||||||
|
o.userName,
|
||||||
|
o.userPhone,c.serialNumber as serialNumber,
|
||||||
|
o.sid
|
||||||
|
FROM lpk_reserve_order AS o
|
||||||
|
LEFT JOIN lpk_store AS s ON o.storeSid = s.sid
|
||||||
|
LEFT JOIN lpk_giftcard AS c ON o.cardSid = c.sid
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="exportExcel" resultType="com.yxt.yyth.api.lpkreserveorder.ReserveOrderExport">
|
||||||
|
select
|
||||||
|
o.sid,
|
||||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
o.userName,
|
||||||
|
o.userPhone,
|
||||||
|
s.`name` as store,
|
||||||
|
b.`name` as bagName,
|
||||||
|
c.`code`
|
||||||
|
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
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="exportExcelByStore" resultType="com.yxt.yyth.api.lpkreserveorder.ReserveOrderExportByStore">
|
||||||
|
select
|
||||||
|
o.sid,
|
||||||
|
date_format(o.reserveDate, '%Y-%m-%d') as reserveDate,
|
||||||
|
s.`name` as store,
|
||||||
|
s.sid as storeSid
|
||||||
|
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
|
||||||
|
LEFT JOIN lpk_giftbag AS b ON c.giftbagSid = b.sid
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.yxt.yyth.biz.ordorderdetails;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:35
|
||||||
|
*/
|
||||||
|
@Api(tags = "预约订单信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/empsreservoorder")
|
||||||
|
public class OrdOrderDetailRest {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.yxt.yyth.biz.ordorderdetails;
|
||||||
|
|
||||||
|
import com.yxt.common.base.service.MybatisBaseService;
|
||||||
|
import com.yxt.yyth.api.ordorderdetails.OrdOrderDetail;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wangpengfei
|
||||||
|
* @date 2023/11/23 10:36
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OrdOrderDetailService extends MybatisBaseService<OrdOrderDetailMapper, OrdOrderDetail> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -53,6 +53,8 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
|||||||
.excludePathPatterns("/appletgiftbag/appletGiftBagList")
|
.excludePathPatterns("/appletgiftbag/appletGiftBagList")
|
||||||
.excludePathPatterns("/lpkgiftcard/cardShareDetail/**")
|
.excludePathPatterns("/lpkgiftcard/cardShareDetail/**")
|
||||||
.excludePathPatterns("/lpkgiftcard/cardShareGoodsDetail/**")
|
.excludePathPatterns("/lpkgiftcard/cardShareGoodsDetail/**")
|
||||||
|
.excludePathPatterns("/empcardgift/generateTopEmpCard/**")
|
||||||
|
.excludePathPatterns("/empsreservoorder/createOrder")
|
||||||
.excludePathPatterns("/lpkgiftcard/bindAllCard");
|
.excludePathPatterns("/lpkgiftcard/bindAllCard");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user