提交代码

master
胡锐 6 months ago committed by yuanye
parent 6d096b294a
commit 3c4ef583df
  1. 49
      order/src/main/java/com/order/controller/business/OrderCouponController.java
  2. 53
      service/src/main/java/com/hfkj/dao/BsOrderCouponMapperExt.java
  3. 19
      service/src/main/java/com/hfkj/dao/BsOrderCouponNoMapper.java
  4. 14
      service/src/main/java/com/hfkj/dao/BsOrderCouponNoSqlProvider.java
  5. 16
      service/src/main/java/com/hfkj/entity/BsOrderCouponNo.java
  6. 60
      service/src/main/java/com/hfkj/entity/BsOrderCouponNoExample.java
  7. 43
      service/src/main/java/com/hfkj/model/order/OrderCouponModel.java
  8. 8
      service/src/main/java/com/hfkj/service/coupon/BsOrderCouponService.java
  9. 14
      service/src/main/java/com/hfkj/service/coupon/impl/BsOrderCouponServiceImpl.java

@ -1,12 +1,10 @@
package com.order.controller.business; package com.order.controller.business;
import com.alibaba.excel.EasyExcel;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.model.ResponseData; import com.hfkj.model.ResponseData;
import com.hfkj.service.coupon.BsOrderCouponService; import com.hfkj.service.coupon.BsOrderCouponService;
import com.order.controller.OrderController;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -35,42 +33,53 @@ public class OrderCouponController {
@Resource @Resource
private BsOrderCouponService orderCouponService; private BsOrderCouponService orderCouponService;
@RequestMapping(value="/queryDetail",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询交易订单详情")
public ResponseData queryDetail(@RequestParam(value = "orderChildOrderNo" , required = true) String orderChildOrderNo) {
try {
Map<String,Object> param = new HashMap<>();
param.put("orderNo", orderCouponService.getListByChildOrderNo(orderChildOrderNo));
param.put("goods", null);
return ResponseMsgUtil.success(param);
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/queryList",method = RequestMethod.GET) @RequestMapping(value="/queryList",method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "查询交易订单列表") @ApiOperation(value = "查询交易订单列表")
public ResponseData queryList(@RequestParam(value = "orderNo" , required = false) String orderNo, public ResponseData queryList(@RequestParam(value = "orderNo" , required = false) String orderNo,
@RequestParam(value = "childOrderNo" , required = false) String childOrderNo,
@RequestParam(value = "merId" , required = false) Long merId,
@RequestParam(value = "userPhone" , required = false) String userPhone, @RequestParam(value = "userPhone" , required = false) String userPhone,
@RequestParam(value = "payChannel" , required = false) Integer payChannel, @RequestParam(value = "tradeStatus" , required = false) Integer tradeStatus,
@RequestParam(value = "goodsName" , required = false) String goodsName,
@RequestParam(value = "payType" , required = false) Integer payType, @RequestParam(value = "payType" , required = false) Integer payType,
@RequestParam(value = "channelOrderNo" , required = false) String channelOrderNo,
@RequestParam(value = "couNo" , required = false) String couNo,
@RequestParam(value = "couStatus" , required = false) Integer couStatus,
@RequestParam(value = "createTimeS" , required = false) Long createTimeS, @RequestParam(value = "createTimeS" , required = false) Long createTimeS,
@RequestParam(value = "createTimeE" , required = false) Long createTimeE, @RequestParam(value = "createTimeE" , required = false) Long createTimeE,
@RequestParam(value = "payTimeS" , required = false) Long payTimeS,
@RequestParam(value = "payTimeE" , required = false) Long payTimeE,
@RequestParam(value = "finishTimeS" , required = false) Long finishTimeS,
@RequestParam(value = "finishTimeE" , required = false) Long finishTimeE,
@RequestParam(value = "cancelTimeS" , required = false) Long cancelTimeS,
@RequestParam(value = "cancelTimeE" , required = false) Long cancelTimeE,
@RequestParam(value = "pageNum" , required = true) Integer pageNum, @RequestParam(value = "pageNum" , required = true) Integer pageNum,
@RequestParam(value = "pageSize" , required = true) Integer pageSize) { @RequestParam(value = "pageSize" , required = true) Integer pageSize) {
try { try {
Map<String,Object> param = new HashMap<>(); Map<String,Object> param = new HashMap<>();
param.put("orderNo", orderNo); param.put("orderNo", orderNo);
param.put("userPhone", userPhone); param.put("userPhone", userPhone);
param.put("payChannel", payChannel); param.put("tradeStatus", tradeStatus);
param.put("goodsName", goodsName);
param.put("payType", payType); param.put("payType", payType);
param.put("channelOrderNo", channelOrderNo);
param.put("couNo", couNo);
param.put("couStatus", couStatus);
param.put("createTimeS", createTimeS); param.put("createTimeS", createTimeS);
param.put("createTimeE", createTimeE); param.put("createTimeE", createTimeE);
param.put("payTimeS", payTimeS);
param.put("payTimeE", payTimeE);
param.put("finishTimeS", finishTimeS);
param.put("finishTimeE", finishTimeE);
param.put("cancelTimeS", cancelTimeS);
param.put("cancelTimeE", cancelTimeE);
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>()); return ResponseMsgUtil.success(new PageInfo<>(orderCouponService.getOrderList(param)));
} catch (Exception e) { } catch (Exception e) {
log.error("error!",e); log.error("error!",e);
@ -80,4 +89,6 @@ public class OrderCouponController {
} }

@ -1,7 +1,60 @@
package com.hfkj.dao; package com.hfkj.dao;
import com.hfkj.model.order.OrderCouponModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/** /**
* mapper扩展类 * mapper扩展类
*/ */
public interface BsOrderCouponMapperExt { public interface BsOrderCouponMapperExt {
@Select("<script>" +
" SELECT" +
" b.order_no orderNo," +
" b.child_order_no childOrderNo," +
" b.user_phone userPhone," +
" b.goods_vpd_key goodsKey," +
" b.goods_name goodsName," +
" b.goods_specs_name goodsSpecsName, " +
" b.goods_spesc_original_price goodsPrice," +
" b.goods_count goodsCount," +
" b.total_price totalPrice," +
" b.total_deduction_price totalDeductionPrice," +
" b.coupon_discount_price couponDiscountPrice," +
" b.integral_discount_price integralDiscountPrice," +
" b.pay_real_price payRealPrice," +
" b.pay_channel payChannel," +
" b.pay_type payType," +
" b.pay_serial_no paySerialNo," +
" b.`status` tradeStatus," +
" b.create_time createTime," +
" b.pay_time payTime," +
" a.channel_order_no channelOrderNo," +
" a.goods_vpd_source_cou_no couNo," +
" a.`status` couStatus," +
" a.expire_time expireTime," +
" a.exception_status exceptionStatus," +
" a.finish_time finishTime" +
" FROM" +
" bs_order_coupon_no a" +
" LEFT JOIN bs_order_coupon b on a.coupon_order_id = b.id" +
" WHERE 1 = 1" +
" <if test='param.orderNo != null'> and b.order_no like concat('%',#{param.orderNo},'%') </if>" +
" <if test='param.userPhone != null'> and b.user_phone like concat('%',#{param.userPhone},'%') </if>" +
" <if test='param.payType != null'> and b.pay_type = #{param.payType}</if>" +
" <if test='param.tradeStatus != null'> and b.status = #{param.tradeStatus}</if>" +
" <if test='param.goodsName != null'> and b.goods_name like concat('%',#{param.goodsName},'%') </if>" +
" <if test='param.channelOrderNo != null'> and a.channel_order_no like concat('%',#{param.channelOrderNo},'%') </if>" +
" <if test='param.couNo != null'> and a.goods_vpd_source_cou_no like concat('%',#{param.couNo},'%') </if>" +
" <if test='param.couStatus != null'> and a.status = #{param.couStatus} </if>" +
" <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" +
"</script>")
List<OrderCouponModel> getOrderList(@Param("param") Map<String,Object> param);
} }

@ -43,16 +43,16 @@ public interface BsOrderCouponNoMapper extends BsOrderCouponNoMapperExt {
"channel_order_no, goods_vpd_source_cou_no, ", "channel_order_no, goods_vpd_source_cou_no, ",
"expire_status, expire_time, ", "expire_status, expire_time, ",
"`status`, exception_status, ", "`status`, exception_status, ",
"create_time, finish_time, ", "create_time, deliver_time, ",
"update_time, ext_1, ", "finish_time, update_time, ",
"ext_2, ext_3)", "ext_1, ext_2, ext_3)",
"values (#{couponOrderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ", "values (#{couponOrderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
"#{channelOrderNo,jdbcType=VARCHAR}, #{goodsVpdSourceCouNo,jdbcType=VARCHAR}, ", "#{channelOrderNo,jdbcType=VARCHAR}, #{goodsVpdSourceCouNo,jdbcType=VARCHAR}, ",
"#{expireStatus,jdbcType=BIT}, #{expireTime,jdbcType=TIMESTAMP}, ", "#{expireStatus,jdbcType=BIT}, #{expireTime,jdbcType=TIMESTAMP}, ",
"#{status,jdbcType=INTEGER}, #{exceptionStatus,jdbcType=BIT}, ", "#{status,jdbcType=INTEGER}, #{exceptionStatus,jdbcType=BIT}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ", "#{createTime,jdbcType=TIMESTAMP}, #{deliverTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", "#{finishTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsOrderCouponNo record); int insert(BsOrderCouponNo record);
@ -73,6 +73,7 @@ public interface BsOrderCouponNoMapper extends BsOrderCouponNoMapperExt {
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="exception_status", property="exceptionStatus", jdbcType=JdbcType.BIT), @Result(column="exception_status", property="exceptionStatus", jdbcType=JdbcType.BIT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="deliver_time", property="deliverTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@ -84,8 +85,8 @@ public interface BsOrderCouponNoMapper extends BsOrderCouponNoMapperExt {
@Select({ @Select({
"select", "select",
"id, coupon_order_id, order_no, channel_order_no, goods_vpd_source_cou_no, expire_status, ", "id, coupon_order_id, order_no, channel_order_no, goods_vpd_source_cou_no, expire_status, ",
"expire_time, `status`, exception_status, create_time, finish_time, update_time, ", "expire_time, `status`, exception_status, create_time, deliver_time, finish_time, ",
"ext_1, ext_2, ext_3", "update_time, ext_1, ext_2, ext_3",
"from bs_order_coupon_no", "from bs_order_coupon_no",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -100,6 +101,7 @@ public interface BsOrderCouponNoMapper extends BsOrderCouponNoMapperExt {
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="exception_status", property="exceptionStatus", jdbcType=JdbcType.BIT), @Result(column="exception_status", property="exceptionStatus", jdbcType=JdbcType.BIT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="deliver_time", property="deliverTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@ -128,6 +130,7 @@ public interface BsOrderCouponNoMapper extends BsOrderCouponNoMapperExt {
"`status` = #{status,jdbcType=INTEGER},", "`status` = #{status,jdbcType=INTEGER},",
"exception_status = #{exceptionStatus,jdbcType=BIT},", "exception_status = #{exceptionStatus,jdbcType=BIT},",
"create_time = #{createTime,jdbcType=TIMESTAMP},", "create_time = #{createTime,jdbcType=TIMESTAMP},",
"deliver_time = #{deliverTime,jdbcType=TIMESTAMP},",
"finish_time = #{finishTime,jdbcType=TIMESTAMP},", "finish_time = #{finishTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},", "update_time = #{updateTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},", "ext_1 = #{ext1,jdbcType=VARCHAR},",

@ -64,6 +64,10 @@ public class BsOrderCouponNoSqlProvider {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
} }
if (record.getDeliverTime() != null) {
sql.VALUES("deliver_time", "#{deliverTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) { if (record.getFinishTime() != null) {
sql.VALUES("finish_time", "#{finishTime,jdbcType=TIMESTAMP}"); sql.VALUES("finish_time", "#{finishTime,jdbcType=TIMESTAMP}");
} }
@ -103,6 +107,7 @@ public class BsOrderCouponNoSqlProvider {
sql.SELECT("`status`"); sql.SELECT("`status`");
sql.SELECT("exception_status"); sql.SELECT("exception_status");
sql.SELECT("create_time"); sql.SELECT("create_time");
sql.SELECT("deliver_time");
sql.SELECT("finish_time"); sql.SELECT("finish_time");
sql.SELECT("update_time"); sql.SELECT("update_time");
sql.SELECT("ext_1"); sql.SELECT("ext_1");
@ -165,6 +170,10 @@ public class BsOrderCouponNoSqlProvider {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
} }
if (record.getDeliverTime() != null) {
sql.SET("deliver_time = #{record.deliverTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) { if (record.getFinishTime() != null) {
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}"); sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}");
} }
@ -203,6 +212,7 @@ public class BsOrderCouponNoSqlProvider {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("exception_status = #{record.exceptionStatus,jdbcType=BIT}"); sql.SET("exception_status = #{record.exceptionStatus,jdbcType=BIT}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("deliver_time = #{record.deliverTime,jdbcType=TIMESTAMP}");
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}"); sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
@ -254,6 +264,10 @@ public class BsOrderCouponNoSqlProvider {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
} }
if (record.getDeliverTime() != null) {
sql.SET("deliver_time = #{deliverTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) { if (record.getFinishTime() != null) {
sql.SET("finish_time = #{finishTime,jdbcType=TIMESTAMP}"); sql.SET("finish_time = #{finishTime,jdbcType=TIMESTAMP}");
} }

@ -63,6 +63,11 @@ public class BsOrderCouponNo implements Serializable {
*/ */
private Date createTime; private Date createTime;
/**
* 派发时间
*/
private Date deliverTime;
/** /**
* 完成时间 * 完成时间
*/ */
@ -161,6 +166,14 @@ public class BsOrderCouponNo implements Serializable {
this.createTime = createTime; this.createTime = createTime;
} }
public Date getDeliverTime() {
return deliverTime;
}
public void setDeliverTime(Date deliverTime) {
this.deliverTime = deliverTime;
}
public Date getFinishTime() { public Date getFinishTime() {
return finishTime; return finishTime;
} }
@ -223,6 +236,7 @@ public class BsOrderCouponNo implements Serializable {
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getExceptionStatus() == null ? other.getExceptionStatus() == null : this.getExceptionStatus().equals(other.getExceptionStatus())) && (this.getExceptionStatus() == null ? other.getExceptionStatus() == null : this.getExceptionStatus().equals(other.getExceptionStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getDeliverTime() == null ? other.getDeliverTime() == null : this.getDeliverTime().equals(other.getDeliverTime()))
&& (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime())) && (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
@ -244,6 +258,7 @@ public class BsOrderCouponNo implements Serializable {
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getExceptionStatus() == null) ? 0 : getExceptionStatus().hashCode()); result = prime * result + ((getExceptionStatus() == null) ? 0 : getExceptionStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getDeliverTime() == null) ? 0 : getDeliverTime().hashCode());
result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode()); result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
@ -268,6 +283,7 @@ public class BsOrderCouponNo implements Serializable {
sb.append(", status=").append(status); sb.append(", status=").append(status);
sb.append(", exceptionStatus=").append(exceptionStatus); sb.append(", exceptionStatus=").append(exceptionStatus);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);
sb.append(", deliverTime=").append(deliverTime);
sb.append(", finishTime=").append(finishTime); sb.append(", finishTime=").append(finishTime);
sb.append(", updateTime=").append(updateTime); sb.append(", updateTime=").append(updateTime);
sb.append(", ext1=").append(ext1); sb.append(", ext1=").append(ext1);

@ -755,6 +755,66 @@ public class BsOrderCouponNoExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeliverTimeIsNull() {
addCriterion("deliver_time is null");
return (Criteria) this;
}
public Criteria andDeliverTimeIsNotNull() {
addCriterion("deliver_time is not null");
return (Criteria) this;
}
public Criteria andDeliverTimeEqualTo(Date value) {
addCriterion("deliver_time =", value, "deliverTime");
return (Criteria) this;
}
public Criteria andDeliverTimeNotEqualTo(Date value) {
addCriterion("deliver_time <>", value, "deliverTime");
return (Criteria) this;
}
public Criteria andDeliverTimeGreaterThan(Date value) {
addCriterion("deliver_time >", value, "deliverTime");
return (Criteria) this;
}
public Criteria andDeliverTimeGreaterThanOrEqualTo(Date value) {
addCriterion("deliver_time >=", value, "deliverTime");
return (Criteria) this;
}
public Criteria andDeliverTimeLessThan(Date value) {
addCriterion("deliver_time <", value, "deliverTime");
return (Criteria) this;
}
public Criteria andDeliverTimeLessThanOrEqualTo(Date value) {
addCriterion("deliver_time <=", value, "deliverTime");
return (Criteria) this;
}
public Criteria andDeliverTimeIn(List<Date> values) {
addCriterion("deliver_time in", values, "deliverTime");
return (Criteria) this;
}
public Criteria andDeliverTimeNotIn(List<Date> values) {
addCriterion("deliver_time not in", values, "deliverTime");
return (Criteria) this;
}
public Criteria andDeliverTimeBetween(Date value1, Date value2) {
addCriterion("deliver_time between", value1, value2, "deliverTime");
return (Criteria) this;
}
public Criteria andDeliverTimeNotBetween(Date value1, Date value2) {
addCriterion("deliver_time not between", value1, value2, "deliverTime");
return (Criteria) this;
}
public Criteria andFinishTimeIsNull() { public Criteria andFinishTimeIsNull() {
addCriterion("finish_time is null"); addCriterion("finish_time is null");
return (Criteria) this; return (Criteria) this;

@ -0,0 +1,43 @@
package com.hfkj.model.order;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 卡券订单模型
* @className: BsOrderCouponModel
* @author: HuRui
* @date: 2024/5/13
**/
@Data
public class OrderCouponModel {
public String orderNo;
public String childOrderNo;
public String userPhone;
public String goodsKey;
public String goodsName;
public String goodsSpecsName;
public String goodsPrice;
public String goodsCount;
public BigDecimal totalPrice;
public BigDecimal totalDeductionPrice;
public BigDecimal couponDiscountPrice;
public BigDecimal integralDiscountPrice;
public BigDecimal payRealPrice;
public Integer payChannel;
public Integer payType;
public String paySerialNo;
public Integer tradeStatus;
public Date createTime;
public Date payTime;
public String channelOrderNo;
public String couNo;
public Integer couStatus;
public Date expireTime;
public String exceptionStatus;
public Date finishTime;
}

@ -1,6 +1,7 @@
package com.hfkj.service.coupon; package com.hfkj.service.coupon;
import com.hfkj.entity.BsOrderCoupon; import com.hfkj.entity.BsOrderCoupon;
import com.hfkj.model.order.OrderCouponModel;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -26,4 +27,11 @@ public interface BsOrderCouponService {
*/ */
List<BsOrderCoupon> getListByChildOrderNo(String orderChildOrderNo); List<BsOrderCoupon> getListByChildOrderNo(String orderChildOrderNo);
/**
* 查询卡券订单
* @param param
* @return
*/
List<OrderCouponModel> getOrderList(Map<String,Object> param);
} }

@ -1,9 +1,12 @@
package com.hfkj.service.coupon.impl; package com.hfkj.service.coupon.impl;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.dao.BsOrderCouponMapper; import com.hfkj.dao.BsOrderCouponMapper;
import com.hfkj.entity.BsOrderCoupon; import com.hfkj.entity.BsOrderCoupon;
import com.hfkj.entity.BsOrderCouponExample; import com.hfkj.entity.BsOrderCouponExample;
import com.hfkj.model.order.OrderCouponModel;
import com.hfkj.service.coupon.BsOrderCouponService; import com.hfkj.service.coupon.BsOrderCouponService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -40,5 +43,16 @@ public class BsOrderCouponServiceImpl implements BsOrderCouponService {
return orderCouponMapper.selectByExample(example); return orderCouponMapper.selectByExample(example);
} }
@Override
public List<OrderCouponModel> getOrderList(Map<String, Object> param) {
if (MapUtils.getLong(param, "createTimeS") != null) {
param.put("createTimeS", DateUtil.date2String(new Date(MapUtils.getLong(param, "createTimeS")), DateUtil.Y_M_D_HMS));
}
if (MapUtils.getLong(param, "createTimeE") != null) {
param.put("createTimeE", DateUtil.date2String(new Date(MapUtils.getLong(param, "createTimeE")), DateUtil.Y_M_D_HMS));
}
return orderCouponMapper.getOrderList(param);
}
} }

Loading…
Cancel
Save