提交代码

master
胡锐 3 months ago
parent 4d8f14656b
commit 82bd2954ed
  1. 42
      order/src/main/java/com/order/controller/business/OrderCouponController.java
  2. 59
      service/src/main/java/com/hfkj/dao/BsOrderCouponMapper.java
  3. 6
      service/src/main/java/com/hfkj/dao/BsOrderCouponMapperExt.java
  4. 14
      service/src/main/java/com/hfkj/dao/BsOrderCouponSqlProvider.java
  5. 16
      service/src/main/java/com/hfkj/entity/BsOrderCoupon.java
  6. 60
      service/src/main/java/com/hfkj/entity/BsOrderCouponExample.java
  7. 8
      service/src/main/java/com/hfkj/model/order/OrderCouponModel.java
  8. 1
      service/src/main/java/com/hfkj/service/order/OrderCreateService.java
  9. 4
      service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java
  10. 2
      service/src/main/resources/dev/commonConfig.properties

@ -7,15 +7,19 @@ import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.config.CommonSysConst;
import com.hfkj.entity.BsOrderCoupon;
import com.hfkj.entity.FileRecords;
import com.hfkj.model.ResponseData;
import com.hfkj.model.SecUserSessionObject;
import com.hfkj.model.order.OrderCouponModel;
import com.hfkj.service.coupon.BsOrderCouponNoService;
import com.hfkj.service.coupon.BsOrderCouponService;
import com.hfkj.service.file.FileRecordsService;
import com.hfkj.sysenum.SecUserObjectTypeEnum;
import com.hfkj.sysenum.fileRecords.FileRecordsEnum;
import com.hfkj.sysenum.order.OrderChildStatusEnum;
import com.hfkj.sysenum.order.OrderCouponNoStatusEnum;
import com.hfkj.sysenum.order.OrderPayChannelEnum;
@ -30,6 +34,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.thymeleaf.util.DateUtils;
import javax.annotation.Resource;
import java.io.File;
@ -52,6 +57,8 @@ public class OrderCouponController {
private BsOrderCouponNoService orderCouponNoService;
@Resource
private UserCenter userCenter;
@Resource
private FileRecordsService fileRecordsService;
@RequestMapping(value="/queryCouNo",method = RequestMethod.GET)
@ResponseBody
@ -148,6 +155,8 @@ public class OrderCouponController {
@RequestParam(value = "couStatus" , required = false) Integer couStatus,
@RequestParam(value = "createTimeS" , required = false) Long createTimeS,
@RequestParam(value = "createTimeE" , required = false) Long createTimeE) {
FileRecords fileRecords = new FileRecords();
try {
Map<String,Object> param = new HashMap<>();
SecUserSessionObject userSessionObject = userCenter.getSessionModel(SecUserSessionObject.class);
@ -155,6 +164,8 @@ public class OrderCouponController {
} else if (SecUserObjectTypeEnum.type2.getCode() == userSessionObject.getAccount().getObjectType()) {
param.put("merId", userSessionObject.getAccount().getObjectId());
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, "");
}
param.put("orderNo", orderNo);
param.put("userPhone", userPhone);
@ -166,8 +177,22 @@ public class OrderCouponController {
param.put("couStatus", couStatus);
param.put("createTimeS", createTimeS);
param.put("createTimeE", createTimeE);
List<OrderCouponModel> orderList = orderCouponService.getOrderList(param);
// 下载记录
fileRecords.setCreateTime(new Date());
fileRecords.setBusinessType(FileRecordsEnum.status2.getCode());
fileRecords.setDownloadConditions(param.toString());
fileRecords.setOpId(userSessionObject.getAccount().getId());
fileRecords.setOpName(userSessionObject.getAccount().getUserName());
fileRecords.setStatus(2);
fileRecords.setDownloadStatus(2);
fileRecords.setTitle(FileRecordsEnum.status2.getName() + DateUtil.date2String(new Date(System.currentTimeMillis()),DateUtil.YMDHMS) + ".xlsx");
fileRecords.setFileUrl(CommonSysConst.getSysConfig().getDomainName() + "/filesystem/temporary/" + fileRecords.getTitle());
fileRecords.setType("2");
fileRecordsService.create(fileRecords);
// 查询数据
List<OrderCouponModel> orderList = orderCouponService.getOrderList(param);
for (OrderCouponModel coupon : orderList) {
if (coupon.getPayChannel() != null) {
coupon.setPayChannel(OrderPayChannelEnum.getData(Integer.valueOf(coupon.getPayChannel())).getName());
@ -180,8 +205,8 @@ public class OrderCouponController {
coupon.setExceptionStatus(Boolean.getBoolean(coupon.getExceptionStatus())?"是":"否");
}
// 文件存放地址
String fileUrl = CommonSysConst.getSysConfig().getFileUrl() + "/temporary/";
String pathName = System.currentTimeMillis()+".xlsx";
File file = new File(fileUrl);
if (!file.exists()) {
file.mkdirs();
@ -191,15 +216,24 @@ public class OrderCouponController {
// 需要从第几行开始合并
int mergeRowIndex = 1;
EasyExcel.write(fileUrl+pathName)
// 生成excel文件
EasyExcel.write(fileUrl+fileRecords.getTitle())
.head(OrderCouponModel.class)
.sheet("虚拟商品订单")
.registerWriteHandler(new OrderCouponExcelMergeHandler(mergeRowIndex, mergeColumnIndex))
.doWrite(orderList);
return ResponseMsgUtil.success(pathName);
fileRecords.setStatus(1);
fileRecords.setUpdateTime(new Date());
fileRecordsService.update(fileRecords);
return ResponseMsgUtil.success(fileRecords);
} catch (Exception e) {
fileRecords.setStatus(3);
fileRecords.setUpdateTime(new Date());
fileRecords.setExt1(e.toString());
fileRecordsService.update(fileRecords);
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}

@ -45,34 +45,36 @@ public interface BsOrderCouponMapper extends BsOrderCouponMapperExt {
"goods_type_id, goods_type_name, ",
"goods_brand_id, goods_brand_name, ",
"goods_specs_id, goods_specs_name, ",
"goods_spesc_original_price, goods_vpd_id, ",
"goods_vpd_key, goods_vpd_source, ",
"goods_count, total_price, ",
"total_deduction_price, coupon_discount_price, ",
"integral_discount_price, pay_real_price, ",
"pay_channel, pay_serial_no, ",
"pay_type, `status`, ",
"create_time, pay_time, ",
"cancel_time, refund_time, ",
"finish_time, update_time, ",
"ext_1, ext_2, ext_3)",
"goods_spesc_original_price, goods_spesc_sale_price, ",
"goods_vpd_id, goods_vpd_key, ",
"goods_vpd_source, goods_count, ",
"total_price, total_deduction_price, ",
"coupon_discount_price, integral_discount_price, ",
"pay_real_price, pay_channel, ",
"pay_serial_no, pay_type, ",
"`status`, create_time, ",
"pay_time, cancel_time, ",
"refund_time, finish_time, ",
"update_time, ext_1, ",
"ext_2, ext_3)",
"values (#{orderNo,jdbcType=VARCHAR}, #{childOrderNo,jdbcType=VARCHAR}, ",
"#{merId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{userPhone,jdbcType=VARCHAR}, ",
"#{goodsId,jdbcType=BIGINT}, #{goodsName,jdbcType=VARCHAR}, ",
"#{goodsTypeId,jdbcType=BIGINT}, #{goodsTypeName,jdbcType=VARCHAR}, ",
"#{goodsBrandId,jdbcType=BIGINT}, #{goodsBrandName,jdbcType=VARCHAR}, ",
"#{goodsSpecsId,jdbcType=BIGINT}, #{goodsSpecsName,jdbcType=VARCHAR}, ",
"#{goodsSpescOriginalPrice,jdbcType=DECIMAL}, #{goodsVpdId,jdbcType=BIGINT}, ",
"#{goodsVpdKey,jdbcType=VARCHAR}, #{goodsVpdSource,jdbcType=INTEGER}, ",
"#{goodsCount,jdbcType=INTEGER}, #{totalPrice,jdbcType=DECIMAL}, ",
"#{totalDeductionPrice,jdbcType=DECIMAL}, #{couponDiscountPrice,jdbcType=DECIMAL}, ",
"#{integralDiscountPrice,jdbcType=DECIMAL}, #{payRealPrice,jdbcType=DECIMAL}, ",
"#{payChannel,jdbcType=INTEGER}, #{paySerialNo,jdbcType=VARCHAR}, ",
"#{payType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ",
"#{cancelTime,jdbcType=TIMESTAMP}, #{refundTime,jdbcType=TIMESTAMP}, ",
"#{finishTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"#{goodsSpescOriginalPrice,jdbcType=DECIMAL}, #{goodsSpescSalePrice,jdbcType=DECIMAL}, ",
"#{goodsVpdId,jdbcType=BIGINT}, #{goodsVpdKey,jdbcType=VARCHAR}, ",
"#{goodsVpdSource,jdbcType=INTEGER}, #{goodsCount,jdbcType=INTEGER}, ",
"#{totalPrice,jdbcType=DECIMAL}, #{totalDeductionPrice,jdbcType=DECIMAL}, ",
"#{couponDiscountPrice,jdbcType=DECIMAL}, #{integralDiscountPrice,jdbcType=DECIMAL}, ",
"#{payRealPrice,jdbcType=DECIMAL}, #{payChannel,jdbcType=INTEGER}, ",
"#{paySerialNo,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER}, ",
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{payTime,jdbcType=TIMESTAMP}, #{cancelTime,jdbcType=TIMESTAMP}, ",
"#{refundTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsOrderCoupon record);
@ -98,6 +100,7 @@ public interface BsOrderCouponMapper extends BsOrderCouponMapperExt {
@Result(column="goods_specs_id", property="goodsSpecsId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_specs_name", property="goodsSpecsName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_spesc_original_price", property="goodsSpescOriginalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="goods_spesc_sale_price", property="goodsSpescSalePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="goods_vpd_id", property="goodsVpdId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_vpd_key", property="goodsVpdKey", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_vpd_source", property="goodsVpdSource", jdbcType=JdbcType.INTEGER),
@ -127,11 +130,11 @@ public interface BsOrderCouponMapper extends BsOrderCouponMapperExt {
"select",
"id, order_no, child_order_no, mer_id, user_id, user_phone, goods_id, goods_name, ",
"goods_type_id, goods_type_name, goods_brand_id, goods_brand_name, goods_specs_id, ",
"goods_specs_name, goods_spesc_original_price, goods_vpd_id, goods_vpd_key, goods_vpd_source, ",
"goods_count, total_price, total_deduction_price, coupon_discount_price, integral_discount_price, ",
"pay_real_price, pay_channel, pay_serial_no, pay_type, `status`, create_time, ",
"pay_time, cancel_time, refund_time, finish_time, update_time, ext_1, ext_2, ",
"ext_3",
"goods_specs_name, goods_spesc_original_price, goods_spesc_sale_price, goods_vpd_id, ",
"goods_vpd_key, goods_vpd_source, goods_count, total_price, total_deduction_price, ",
"coupon_discount_price, integral_discount_price, pay_real_price, pay_channel, ",
"pay_serial_no, pay_type, `status`, create_time, pay_time, cancel_time, refund_time, ",
"finish_time, update_time, ext_1, ext_2, ext_3",
"from bs_order_coupon",
"where id = #{id,jdbcType=BIGINT}"
})
@ -151,6 +154,7 @@ public interface BsOrderCouponMapper extends BsOrderCouponMapperExt {
@Result(column="goods_specs_id", property="goodsSpecsId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_specs_name", property="goodsSpecsName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_spesc_original_price", property="goodsSpescOriginalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="goods_spesc_sale_price", property="goodsSpescSalePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="goods_vpd_id", property="goodsVpdId", jdbcType=JdbcType.BIGINT),
@Result(column="goods_vpd_key", property="goodsVpdKey", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_vpd_source", property="goodsVpdSource", jdbcType=JdbcType.INTEGER),
@ -201,6 +205,7 @@ public interface BsOrderCouponMapper extends BsOrderCouponMapperExt {
"goods_specs_id = #{goodsSpecsId,jdbcType=BIGINT},",
"goods_specs_name = #{goodsSpecsName,jdbcType=VARCHAR},",
"goods_spesc_original_price = #{goodsSpescOriginalPrice,jdbcType=DECIMAL},",
"goods_spesc_sale_price = #{goodsSpescSalePrice,jdbcType=DECIMAL},",
"goods_vpd_id = #{goodsVpdId,jdbcType=BIGINT},",
"goods_vpd_key = #{goodsVpdKey,jdbcType=VARCHAR},",
"goods_vpd_source = #{goodsVpdSource,jdbcType=INTEGER},",

@ -20,7 +20,8 @@ public interface BsOrderCouponMapperExt {
" b.goods_vpd_key goodsKey," +
" b.goods_name goodsName," +
" b.goods_specs_name goodsSpecsName, " +
" b.goods_spesc_original_price goodsPrice," +
" b.goods_spesc_original_price goodsOriginalPrice," +
" b.goods_spesc_sale_price goodsSalePrice," +
" b.goods_count goodsCount," +
" b.total_price totalPrice," +
" b.total_deduction_price totalDeductionPrice," +
@ -56,7 +57,8 @@ public interface BsOrderCouponMapperExt {
" <if test='param.createTimeS != null'><![CDATA[ and b.create_time >= #{param.createTimeS} ]]></if>" +
" <if test='param.createTimeE != null'><![CDATA[ and b.create_time <= #{param.createTimeE} ]]></if>" +
" GROUP BY a.id" +
" ORDER BY b.create_time desc,b.order_no" +
" ORDER BY b.create_time desc,b.child_order_no" +
"</script>")
List<OrderCouponModel> getOrderList(@Param("param") Map<String,Object> param);
}

@ -84,6 +84,10 @@ public class BsOrderCouponSqlProvider {
sql.VALUES("goods_spesc_original_price", "#{goodsSpescOriginalPrice,jdbcType=DECIMAL}");
}
if (record.getGoodsSpescSalePrice() != null) {
sql.VALUES("goods_spesc_sale_price", "#{goodsSpescSalePrice,jdbcType=DECIMAL}");
}
if (record.getGoodsVpdId() != null) {
sql.VALUES("goods_vpd_id", "#{goodsVpdId,jdbcType=BIGINT}");
}
@ -196,6 +200,7 @@ public class BsOrderCouponSqlProvider {
sql.SELECT("goods_specs_id");
sql.SELECT("goods_specs_name");
sql.SELECT("goods_spesc_original_price");
sql.SELECT("goods_spesc_sale_price");
sql.SELECT("goods_vpd_id");
sql.SELECT("goods_vpd_key");
sql.SELECT("goods_vpd_source");
@ -295,6 +300,10 @@ public class BsOrderCouponSqlProvider {
sql.SET("goods_spesc_original_price = #{record.goodsSpescOriginalPrice,jdbcType=DECIMAL}");
}
if (record.getGoodsSpescSalePrice() != null) {
sql.SET("goods_spesc_sale_price = #{record.goodsSpescSalePrice,jdbcType=DECIMAL}");
}
if (record.getGoodsVpdId() != null) {
sql.SET("goods_vpd_id = #{record.goodsVpdId,jdbcType=BIGINT}");
}
@ -406,6 +415,7 @@ public class BsOrderCouponSqlProvider {
sql.SET("goods_specs_id = #{record.goodsSpecsId,jdbcType=BIGINT}");
sql.SET("goods_specs_name = #{record.goodsSpecsName,jdbcType=VARCHAR}");
sql.SET("goods_spesc_original_price = #{record.goodsSpescOriginalPrice,jdbcType=DECIMAL}");
sql.SET("goods_spesc_sale_price = #{record.goodsSpescSalePrice,jdbcType=DECIMAL}");
sql.SET("goods_vpd_id = #{record.goodsVpdId,jdbcType=BIGINT}");
sql.SET("goods_vpd_key = #{record.goodsVpdKey,jdbcType=VARCHAR}");
sql.SET("goods_vpd_source = #{record.goodsVpdSource,jdbcType=INTEGER}");
@ -494,6 +504,10 @@ public class BsOrderCouponSqlProvider {
sql.SET("goods_spesc_original_price = #{goodsSpescOriginalPrice,jdbcType=DECIMAL}");
}
if (record.getGoodsSpescSalePrice() != null) {
sql.SET("goods_spesc_sale_price = #{goodsSpescSalePrice,jdbcType=DECIMAL}");
}
if (record.getGoodsVpdId() != null) {
sql.SET("goods_vpd_id = #{goodsVpdId,jdbcType=BIGINT}");
}

@ -89,6 +89,11 @@ public class BsOrderCoupon implements Serializable {
*/
private BigDecimal goodsSpescOriginalPrice;
/**
* 商品规格销售价
*/
private BigDecimal goodsSpescSalePrice;
/**
* 商品虚拟id
*/
@ -312,6 +317,14 @@ public class BsOrderCoupon implements Serializable {
this.goodsSpescOriginalPrice = goodsSpescOriginalPrice;
}
public BigDecimal getGoodsSpescSalePrice() {
return goodsSpescSalePrice;
}
public void setGoodsSpescSalePrice(BigDecimal goodsSpescSalePrice) {
this.goodsSpescSalePrice = goodsSpescSalePrice;
}
public Long getGoodsVpdId() {
return goodsVpdId;
}
@ -515,6 +528,7 @@ public class BsOrderCoupon implements Serializable {
&& (this.getGoodsSpecsId() == null ? other.getGoodsSpecsId() == null : this.getGoodsSpecsId().equals(other.getGoodsSpecsId()))
&& (this.getGoodsSpecsName() == null ? other.getGoodsSpecsName() == null : this.getGoodsSpecsName().equals(other.getGoodsSpecsName()))
&& (this.getGoodsSpescOriginalPrice() == null ? other.getGoodsSpescOriginalPrice() == null : this.getGoodsSpescOriginalPrice().equals(other.getGoodsSpescOriginalPrice()))
&& (this.getGoodsSpescSalePrice() == null ? other.getGoodsSpescSalePrice() == null : this.getGoodsSpescSalePrice().equals(other.getGoodsSpescSalePrice()))
&& (this.getGoodsVpdId() == null ? other.getGoodsVpdId() == null : this.getGoodsVpdId().equals(other.getGoodsVpdId()))
&& (this.getGoodsVpdKey() == null ? other.getGoodsVpdKey() == null : this.getGoodsVpdKey().equals(other.getGoodsVpdKey()))
&& (this.getGoodsVpdSource() == null ? other.getGoodsVpdSource() == null : this.getGoodsVpdSource().equals(other.getGoodsVpdSource()))
@ -558,6 +572,7 @@ public class BsOrderCoupon implements Serializable {
result = prime * result + ((getGoodsSpecsId() == null) ? 0 : getGoodsSpecsId().hashCode());
result = prime * result + ((getGoodsSpecsName() == null) ? 0 : getGoodsSpecsName().hashCode());
result = prime * result + ((getGoodsSpescOriginalPrice() == null) ? 0 : getGoodsSpescOriginalPrice().hashCode());
result = prime * result + ((getGoodsSpescSalePrice() == null) ? 0 : getGoodsSpescSalePrice().hashCode());
result = prime * result + ((getGoodsVpdId() == null) ? 0 : getGoodsVpdId().hashCode());
result = prime * result + ((getGoodsVpdKey() == null) ? 0 : getGoodsVpdKey().hashCode());
result = prime * result + ((getGoodsVpdSource() == null) ? 0 : getGoodsVpdSource().hashCode());
@ -604,6 +619,7 @@ public class BsOrderCoupon implements Serializable {
sb.append(", goodsSpecsId=").append(goodsSpecsId);
sb.append(", goodsSpecsName=").append(goodsSpecsName);
sb.append(", goodsSpescOriginalPrice=").append(goodsSpescOriginalPrice);
sb.append(", goodsSpescSalePrice=").append(goodsSpescSalePrice);
sb.append(", goodsVpdId=").append(goodsVpdId);
sb.append(", goodsVpdKey=").append(goodsVpdKey);
sb.append(", goodsVpdSource=").append(goodsVpdSource);

@ -1096,6 +1096,66 @@ public class BsOrderCouponExample {
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceIsNull() {
addCriterion("goods_spesc_sale_price is null");
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceIsNotNull() {
addCriterion("goods_spesc_sale_price is not null");
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceEqualTo(BigDecimal value) {
addCriterion("goods_spesc_sale_price =", value, "goodsSpescSalePrice");
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceNotEqualTo(BigDecimal value) {
addCriterion("goods_spesc_sale_price <>", value, "goodsSpescSalePrice");
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceGreaterThan(BigDecimal value) {
addCriterion("goods_spesc_sale_price >", value, "goodsSpescSalePrice");
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("goods_spesc_sale_price >=", value, "goodsSpescSalePrice");
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceLessThan(BigDecimal value) {
addCriterion("goods_spesc_sale_price <", value, "goodsSpescSalePrice");
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("goods_spesc_sale_price <=", value, "goodsSpescSalePrice");
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceIn(List<BigDecimal> values) {
addCriterion("goods_spesc_sale_price in", values, "goodsSpescSalePrice");
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceNotIn(List<BigDecimal> values) {
addCriterion("goods_spesc_sale_price not in", values, "goodsSpescSalePrice");
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("goods_spesc_sale_price between", value1, value2, "goodsSpescSalePrice");
return (Criteria) this;
}
public Criteria andGoodsSpescSalePriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("goods_spesc_sale_price not between", value1, value2, "goodsSpescSalePrice");
return (Criteria) this;
}
public Criteria andGoodsVpdIdIsNull() {
addCriterion("goods_vpd_id is null");
return (Criteria) this;

@ -41,8 +41,12 @@ public class OrderCouponModel {
public String goodsSpecsName;
@ColumnWidth(20)
@ExcelProperty("商品价格")
public String goodsPrice;
@ExcelProperty("商品原价(单价)")
public String goodsOriginalPrice;
@ColumnWidth(20)
@ExcelProperty("商品销售价(单价)")
public String goodsSalePrice;
@ColumnWidth(20)
@ExcelProperty("购买数量")

@ -133,6 +133,7 @@ public class OrderCreateService {
orderCoupon.setGoodsSpecsId(goodsSpecs.getId());
orderCoupon.setGoodsSpecsName(goodsSpecs.getName());
orderCoupon.setGoodsSpescOriginalPrice(goodsSpecs.getOriginalPrice());
orderCoupon.setGoodsSpescSalePrice(goodsSpecs.getSalePrice());
orderCoupon.setGoodsVpdId(goodsVpd.getId());
orderCoupon.setGoodsVpdKey(goodsVpd.getKey());
orderCoupon.setGoodsVpdSource(goodsVpd.getSource());

@ -124,6 +124,7 @@ public class OrderPaySuccessService {
for (Object data : dataArray) {
JSONObject dataObject = (JSONObject) data;
couponNo.setExpireTime(dataObject.getDate("validEndDate"));
couponNo.setDeliverTime(new Date());
couponNo.setGoodsVpdSourceCouNo(dataObject.getString("couNo"));
couponNo.setStatus(OrderCouponNoStatusEnum.status2.getCode());
orderCouponNoService.editData(couponNo);
@ -140,6 +141,7 @@ public class OrderPaySuccessService {
JSONArray codeList = response.getJSONArray("codeList");
for (Object data : codeList) {
couponNo.setExpireTime(DateUtil.format(couponDetail.getString("expiredDate"), "yyyy-MM-dd"));
couponNo.setDeliverTime(new Date());
couponNo.setGoodsVpdSourceCouNo(ChongQingCNPCCouponService.decryptCouponCode(String.valueOf(data)));
couponNo.setStatus(OrderCouponNoStatusEnum.status2.getCode());
orderCouponNoService.editData(couponNo);
@ -157,6 +159,7 @@ public class OrderPaySuccessService {
String data = PetroConfig.decrypt(jsonObject.getString("jsonResult"));
JSONObject object = JSONObject.parseObject(data);
couponNo.setExpireTime(vpd.getSalesEndTime());
couponNo.setDeliverTime(new Date());
couponNo.setGoodsVpdSourceCouNo(object.getString("voucher"));
couponNo.setStatus(OrderCouponNoStatusEnum.status2.getCode());
orderCouponService.editData(orderCoupon);
@ -169,6 +172,7 @@ public class OrderPaySuccessService {
}
JSONObject object = jsonObject.getJSONObject("data");
couponNo.setExpireTime(vpd.getSalesEndTime());
couponNo.setDeliverTime(new Date());
couponNo.setGoodsVpdSourceCouNo(object.getString("couponCode"));
couponNo.setStatus(OrderCouponNoStatusEnum.status2.getCode());
orderCouponNoService.editData(couponNo);

@ -1,4 +1,4 @@
fileUrl=/Users/chenyao/Desktop/img
fileUrl=/home/project/phg/filesystem
domainName=https://phgcs.dctpay.com
wechatMpAppid=wxa075e8509802f826

Loading…
Cancel
Save