提交代码

dev-discount
胡锐 2 years ago
parent aaeb3473ff
commit c17032720e
  1. 64
      hai-order/src/main/java/com/web/controller/OrderRefundController.java
  2. 31
      hai-service/src/main/java/com/hai/dao/HighOrderRefundMapper.java
  3. 30
      hai-service/src/main/java/com/hai/dao/HighOrderRefundSqlProvider.java
  4. 32
      hai-service/src/main/java/com/hai/entity/HighOrderRefund.java
  5. 116
      hai-service/src/main/java/com/hai/entity/HighOrderRefundExample.java
  6. 7
      hai-service/src/main/java/com/hai/order/service/OrderRefundService.java
  7. 2
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  8. 23
      hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java
  9. 68
      hai-user/src/main/java/com/web/controller/DiscountController.java

@ -104,14 +104,30 @@ public class OrderRefundController {
}
}
@RequestMapping(value="/getRefundByRefundNo",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据退款订单号,查询退款详情")
public ResponseData getRefundByRefundNo(@RequestParam(name = "refundOrderNo", required = true) String refundOrderNo) {
try {
HighUserModel userModel = userCenter.getSessionModel(HighUserModel.class);
if (userModel == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.USE_VISIT_ILLEGAL, "");
}
@RequestMapping(value="/getRefundList",method = RequestMethod.GET)
return ResponseMsgUtil.success(orderRefundService.getRefundByRefundNo(refundOrderNo));
} catch (Exception e) {
log.error("OrderController -> getRefundByRefundNo() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getUserRefundList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取退款列表")
public ResponseData getRefundList(@RequestParam(name = "title", required = false) String title,
@RequestParam(name = "searchTitle", required = false) String searchTitle,
@RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "productType", required = false) Integer productType,
@ApiOperation(value = "获取用户退款列表")
public ResponseData getUserRefundList(@RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "orderChildNo", required = false) String orderChildNo,
@RequestParam(name = "goodsType", required = false) Integer goodsType,
@RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
@ -120,19 +136,45 @@ public class OrderRefundController {
if (userModel == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.USE_VISIT_ILLEGAL, "");
}
Map<String, Object> param = new HashMap<>();
param.put("memId", userModel.getHighUser().getId());
param.put("orderNo", orderNo);
param.put("orderChildNo", orderChildNo);
param.put("goodsType", goodsType);
param.put("status", status);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(orderRefundService.getRefundOrderList(param)));
} catch (Exception e) {
log.error("OrderRefundController -> getUserRefundList() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getRefundList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取退款列表")
public ResponseData getRefundList(@RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "orderChildNo", required = false) String orderChildNo,
@RequestParam(name = "memPhone", required = false) String memPhone,
@RequestParam(name = "goodsType", required = false) Integer goodsType,
@RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
try {
Map<String, Object> param = new HashMap<>();
param.put("title", title);
param.put("searchTitle", searchTitle);
param.put("orderNo", orderNo);
param.put("productType", productType);
param.put("orderChildNo", orderChildNo);
param.put("memPhone", memPhone);
param.put("goodsType", goodsType);
param.put("status", status);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(orderService.getOrderList(param)));
return ResponseMsgUtil.success(new PageInfo<>(orderRefundService.getRefundOrderList(param)));
} catch (Exception e) {
log.error("OrderController -> getUserOrderList() error!",e);
log.error("OrderRefundController -> getRefundList() error!",e);
return ResponseMsgUtil.exception(e);
}
}

@ -45,28 +45,28 @@ public interface HighOrderRefundMapper extends HighOrderRefundMapperExt {
"goods_type, goods_id, ",
"goods_name, goods_desc, ",
"goods_img, goods_spec_name, ",
"goods_count, refund_order, ",
"goods_count, refund_order_no, ",
"return_total_price, refund_goods_num, ",
"refund_price, refund_integral, ",
"refund_remark, refund_status, ",
"refund_fail_reason, create_time, ",
"update_time, ext_1, ",
"ext_2, ext_3, ext_4, ",
"ext_5, ext_6)",
"refund_time, update_time, ",
"ext_1, ext_2, ext_3, ",
"ext_4, ext_5, ext_6)",
"values (#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
"#{orderChildId,jdbcType=BIGINT}, #{orderChildNo,jdbcType=VARCHAR}, ",
"#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ",
"#{goodsType,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT}, ",
"#{goodsName,jdbcType=VARCHAR}, #{goodsDesc,jdbcType=VARCHAR}, ",
"#{goodsImg,jdbcType=VARCHAR}, #{goodsSpecName,jdbcType=VARCHAR}, ",
"#{goodsCount,jdbcType=INTEGER}, #{refundOrder,jdbcType=VARCHAR}, ",
"#{goodsCount,jdbcType=INTEGER}, #{refundOrderNo,jdbcType=VARCHAR}, ",
"#{returnTotalPrice,jdbcType=DECIMAL}, #{refundGoodsNum,jdbcType=INTEGER}, ",
"#{refundPrice,jdbcType=DECIMAL}, #{refundIntegral,jdbcType=INTEGER}, ",
"#{refundRemark,jdbcType=VARCHAR}, #{refundStatus,jdbcType=INTEGER}, ",
"#{refundFailReason,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR}, ",
"#{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
"#{refundTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighOrderRefund record);
@ -92,7 +92,7 @@ public interface HighOrderRefundMapper extends HighOrderRefundMapperExt {
@Result(column="goods_img", property="goodsImg", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_spec_name", property="goodsSpecName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_count", property="goodsCount", jdbcType=JdbcType.INTEGER),
@Result(column="refund_order", property="refundOrder", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_order_no", property="refundOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="return_total_price", property="returnTotalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_goods_num", property="refundGoodsNum", jdbcType=JdbcType.INTEGER),
@Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
@ -101,6 +101,7 @@ public interface HighOrderRefundMapper extends HighOrderRefundMapperExt {
@Result(column="refund_status", property="refundStatus", jdbcType=JdbcType.INTEGER),
@Result(column="refund_fail_reason", property="refundFailReason", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@ -115,9 +116,9 @@ public interface HighOrderRefundMapper extends HighOrderRefundMapperExt {
"select",
"id, order_id, order_no, order_child_id, order_child_no, mem_id, mem_name, mem_phone, ",
"goods_type, goods_id, goods_name, goods_desc, goods_img, goods_spec_name, goods_count, ",
"refund_order, return_total_price, refund_goods_num, refund_price, refund_integral, ",
"refund_remark, refund_status, refund_fail_reason, create_time, update_time, ",
"ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
"refund_order_no, return_total_price, refund_goods_num, refund_price, refund_integral, ",
"refund_remark, refund_status, refund_fail_reason, create_time, refund_time, ",
"update_time, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
"from high_order_refund",
"where id = #{id,jdbcType=BIGINT}"
})
@ -137,7 +138,7 @@ public interface HighOrderRefundMapper extends HighOrderRefundMapperExt {
@Result(column="goods_img", property="goodsImg", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_spec_name", property="goodsSpecName", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_count", property="goodsCount", jdbcType=JdbcType.INTEGER),
@Result(column="refund_order", property="refundOrder", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_order_no", property="refundOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="return_total_price", property="returnTotalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_goods_num", property="refundGoodsNum", jdbcType=JdbcType.INTEGER),
@Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
@ -146,6 +147,7 @@ public interface HighOrderRefundMapper extends HighOrderRefundMapperExt {
@Result(column="refund_status", property="refundStatus", jdbcType=JdbcType.INTEGER),
@Result(column="refund_fail_reason", property="refundFailReason", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@ -181,7 +183,7 @@ public interface HighOrderRefundMapper extends HighOrderRefundMapperExt {
"goods_img = #{goodsImg,jdbcType=VARCHAR},",
"goods_spec_name = #{goodsSpecName,jdbcType=VARCHAR},",
"goods_count = #{goodsCount,jdbcType=INTEGER},",
"refund_order = #{refundOrder,jdbcType=VARCHAR},",
"refund_order_no = #{refundOrderNo,jdbcType=VARCHAR},",
"return_total_price = #{returnTotalPrice,jdbcType=DECIMAL},",
"refund_goods_num = #{refundGoodsNum,jdbcType=INTEGER},",
"refund_price = #{refundPrice,jdbcType=DECIMAL},",
@ -190,6 +192,7 @@ public interface HighOrderRefundMapper extends HighOrderRefundMapperExt {
"refund_status = #{refundStatus,jdbcType=INTEGER},",
"refund_fail_reason = #{refundFailReason,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"refund_time = #{refundTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",

@ -84,8 +84,8 @@ public class HighOrderRefundSqlProvider {
sql.VALUES("goods_count", "#{goodsCount,jdbcType=INTEGER}");
}
if (record.getRefundOrder() != null) {
sql.VALUES("refund_order", "#{refundOrder,jdbcType=VARCHAR}");
if (record.getRefundOrderNo() != null) {
sql.VALUES("refund_order_no", "#{refundOrderNo,jdbcType=VARCHAR}");
}
if (record.getReturnTotalPrice() != null) {
@ -120,6 +120,10 @@ public class HighOrderRefundSqlProvider {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundTime() != null) {
sql.VALUES("refund_time", "#{refundTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
@ -172,7 +176,7 @@ public class HighOrderRefundSqlProvider {
sql.SELECT("goods_img");
sql.SELECT("goods_spec_name");
sql.SELECT("goods_count");
sql.SELECT("refund_order");
sql.SELECT("refund_order_no");
sql.SELECT("return_total_price");
sql.SELECT("refund_goods_num");
sql.SELECT("refund_price");
@ -181,6 +185,7 @@ public class HighOrderRefundSqlProvider {
sql.SELECT("refund_status");
sql.SELECT("refund_fail_reason");
sql.SELECT("create_time");
sql.SELECT("refund_time");
sql.SELECT("update_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
@ -265,8 +270,8 @@ public class HighOrderRefundSqlProvider {
sql.SET("goods_count = #{record.goodsCount,jdbcType=INTEGER}");
}
if (record.getRefundOrder() != null) {
sql.SET("refund_order = #{record.refundOrder,jdbcType=VARCHAR}");
if (record.getRefundOrderNo() != null) {
sql.SET("refund_order_no = #{record.refundOrderNo,jdbcType=VARCHAR}");
}
if (record.getReturnTotalPrice() != null) {
@ -301,6 +306,10 @@ public class HighOrderRefundSqlProvider {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundTime() != null) {
sql.SET("refund_time = #{record.refundTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
@ -352,7 +361,7 @@ public class HighOrderRefundSqlProvider {
sql.SET("goods_img = #{record.goodsImg,jdbcType=VARCHAR}");
sql.SET("goods_spec_name = #{record.goodsSpecName,jdbcType=VARCHAR}");
sql.SET("goods_count = #{record.goodsCount,jdbcType=INTEGER}");
sql.SET("refund_order = #{record.refundOrder,jdbcType=VARCHAR}");
sql.SET("refund_order_no = #{record.refundOrderNo,jdbcType=VARCHAR}");
sql.SET("return_total_price = #{record.returnTotalPrice,jdbcType=DECIMAL}");
sql.SET("refund_goods_num = #{record.refundGoodsNum,jdbcType=INTEGER}");
sql.SET("refund_price = #{record.refundPrice,jdbcType=DECIMAL}");
@ -361,6 +370,7 @@ public class HighOrderRefundSqlProvider {
sql.SET("refund_status = #{record.refundStatus,jdbcType=INTEGER}");
sql.SET("refund_fail_reason = #{record.refundFailReason,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("refund_time = #{record.refundTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
@ -434,8 +444,8 @@ public class HighOrderRefundSqlProvider {
sql.SET("goods_count = #{goodsCount,jdbcType=INTEGER}");
}
if (record.getRefundOrder() != null) {
sql.SET("refund_order = #{refundOrder,jdbcType=VARCHAR}");
if (record.getRefundOrderNo() != null) {
sql.SET("refund_order_no = #{refundOrderNo,jdbcType=VARCHAR}");
}
if (record.getReturnTotalPrice() != null) {
@ -470,6 +480,10 @@ public class HighOrderRefundSqlProvider {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getRefundTime() != null) {
sql.SET("refund_time = #{refundTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}

@ -102,7 +102,7 @@ public class HighOrderRefund implements Serializable {
/**
* 退款订单号
*/
private String refundOrder;
private String refundOrderNo;
/**
* 退款总金额
@ -147,6 +147,11 @@ public class HighOrderRefund implements Serializable {
*/
private Date createTime;
/**
* 退款时间
*/
private Date refundTime;
/**
* 更新时间
*/
@ -286,12 +291,12 @@ public class HighOrderRefund implements Serializable {
this.goodsCount = goodsCount;
}
public String getRefundOrder() {
return refundOrder;
public String getRefundOrderNo() {
return refundOrderNo;
}
public void setRefundOrder(String refundOrder) {
this.refundOrder = refundOrder;
public void setRefundOrderNo(String refundOrderNo) {
this.refundOrderNo = refundOrderNo;
}
public BigDecimal getReturnTotalPrice() {
@ -358,6 +363,14 @@ public class HighOrderRefund implements Serializable {
this.createTime = createTime;
}
public Date getRefundTime() {
return refundTime;
}
public void setRefundTime(Date refundTime) {
this.refundTime = refundTime;
}
public Date getUpdateTime() {
return updateTime;
}
@ -441,7 +454,7 @@ public class HighOrderRefund implements Serializable {
&& (this.getGoodsImg() == null ? other.getGoodsImg() == null : this.getGoodsImg().equals(other.getGoodsImg()))
&& (this.getGoodsSpecName() == null ? other.getGoodsSpecName() == null : this.getGoodsSpecName().equals(other.getGoodsSpecName()))
&& (this.getGoodsCount() == null ? other.getGoodsCount() == null : this.getGoodsCount().equals(other.getGoodsCount()))
&& (this.getRefundOrder() == null ? other.getRefundOrder() == null : this.getRefundOrder().equals(other.getRefundOrder()))
&& (this.getRefundOrderNo() == null ? other.getRefundOrderNo() == null : this.getRefundOrderNo().equals(other.getRefundOrderNo()))
&& (this.getReturnTotalPrice() == null ? other.getReturnTotalPrice() == null : this.getReturnTotalPrice().equals(other.getReturnTotalPrice()))
&& (this.getRefundGoodsNum() == null ? other.getRefundGoodsNum() == null : this.getRefundGoodsNum().equals(other.getRefundGoodsNum()))
&& (this.getRefundPrice() == null ? other.getRefundPrice() == null : this.getRefundPrice().equals(other.getRefundPrice()))
@ -450,6 +463,7 @@ public class HighOrderRefund implements Serializable {
&& (this.getRefundStatus() == null ? other.getRefundStatus() == null : this.getRefundStatus().equals(other.getRefundStatus()))
&& (this.getRefundFailReason() == null ? other.getRefundFailReason() == null : this.getRefundFailReason().equals(other.getRefundFailReason()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getRefundTime() == null ? other.getRefundTime() == null : this.getRefundTime().equals(other.getRefundTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
@ -478,7 +492,7 @@ public class HighOrderRefund implements Serializable {
result = prime * result + ((getGoodsImg() == null) ? 0 : getGoodsImg().hashCode());
result = prime * result + ((getGoodsSpecName() == null) ? 0 : getGoodsSpecName().hashCode());
result = prime * result + ((getGoodsCount() == null) ? 0 : getGoodsCount().hashCode());
result = prime * result + ((getRefundOrder() == null) ? 0 : getRefundOrder().hashCode());
result = prime * result + ((getRefundOrderNo() == null) ? 0 : getRefundOrderNo().hashCode());
result = prime * result + ((getReturnTotalPrice() == null) ? 0 : getReturnTotalPrice().hashCode());
result = prime * result + ((getRefundGoodsNum() == null) ? 0 : getRefundGoodsNum().hashCode());
result = prime * result + ((getRefundPrice() == null) ? 0 : getRefundPrice().hashCode());
@ -487,6 +501,7 @@ public class HighOrderRefund implements Serializable {
result = prime * result + ((getRefundStatus() == null) ? 0 : getRefundStatus().hashCode());
result = prime * result + ((getRefundFailReason() == null) ? 0 : getRefundFailReason().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getRefundTime() == null) ? 0 : getRefundTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
@ -518,7 +533,7 @@ public class HighOrderRefund implements Serializable {
sb.append(", goodsImg=").append(goodsImg);
sb.append(", goodsSpecName=").append(goodsSpecName);
sb.append(", goodsCount=").append(goodsCount);
sb.append(", refundOrder=").append(refundOrder);
sb.append(", refundOrderNo=").append(refundOrderNo);
sb.append(", returnTotalPrice=").append(returnTotalPrice);
sb.append(", refundGoodsNum=").append(refundGoodsNum);
sb.append(", refundPrice=").append(refundPrice);
@ -527,6 +542,7 @@ public class HighOrderRefund implements Serializable {
sb.append(", refundStatus=").append(refundStatus);
sb.append(", refundFailReason=").append(refundFailReason);
sb.append(", createTime=").append(createTime);
sb.append(", refundTime=").append(refundTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);

@ -1106,73 +1106,73 @@ public class HighOrderRefundExample {
return (Criteria) this;
}
public Criteria andRefundOrderIsNull() {
addCriterion("refund_order is null");
public Criteria andRefundOrderNoIsNull() {
addCriterion("refund_order_no is null");
return (Criteria) this;
}
public Criteria andRefundOrderIsNotNull() {
addCriterion("refund_order is not null");
public Criteria andRefundOrderNoIsNotNull() {
addCriterion("refund_order_no is not null");
return (Criteria) this;
}
public Criteria andRefundOrderEqualTo(String value) {
addCriterion("refund_order =", value, "refundOrder");
public Criteria andRefundOrderNoEqualTo(String value) {
addCriterion("refund_order_no =", value, "refundOrderNo");
return (Criteria) this;
}
public Criteria andRefundOrderNotEqualTo(String value) {
addCriterion("refund_order <>", value, "refundOrder");
public Criteria andRefundOrderNoNotEqualTo(String value) {
addCriterion("refund_order_no <>", value, "refundOrderNo");
return (Criteria) this;
}
public Criteria andRefundOrderGreaterThan(String value) {
addCriterion("refund_order >", value, "refundOrder");
public Criteria andRefundOrderNoGreaterThan(String value) {
addCriterion("refund_order_no >", value, "refundOrderNo");
return (Criteria) this;
}
public Criteria andRefundOrderGreaterThanOrEqualTo(String value) {
addCriterion("refund_order >=", value, "refundOrder");
public Criteria andRefundOrderNoGreaterThanOrEqualTo(String value) {
addCriterion("refund_order_no >=", value, "refundOrderNo");
return (Criteria) this;
}
public Criteria andRefundOrderLessThan(String value) {
addCriterion("refund_order <", value, "refundOrder");
public Criteria andRefundOrderNoLessThan(String value) {
addCriterion("refund_order_no <", value, "refundOrderNo");
return (Criteria) this;
}
public Criteria andRefundOrderLessThanOrEqualTo(String value) {
addCriterion("refund_order <=", value, "refundOrder");
public Criteria andRefundOrderNoLessThanOrEqualTo(String value) {
addCriterion("refund_order_no <=", value, "refundOrderNo");
return (Criteria) this;
}
public Criteria andRefundOrderLike(String value) {
addCriterion("refund_order like", value, "refundOrder");
public Criteria andRefundOrderNoLike(String value) {
addCriterion("refund_order_no like", value, "refundOrderNo");
return (Criteria) this;
}
public Criteria andRefundOrderNotLike(String value) {
addCriterion("refund_order not like", value, "refundOrder");
public Criteria andRefundOrderNoNotLike(String value) {
addCriterion("refund_order_no not like", value, "refundOrderNo");
return (Criteria) this;
}
public Criteria andRefundOrderIn(List<String> values) {
addCriterion("refund_order in", values, "refundOrder");
public Criteria andRefundOrderNoIn(List<String> values) {
addCriterion("refund_order_no in", values, "refundOrderNo");
return (Criteria) this;
}
public Criteria andRefundOrderNotIn(List<String> values) {
addCriterion("refund_order not in", values, "refundOrder");
public Criteria andRefundOrderNoNotIn(List<String> values) {
addCriterion("refund_order_no not in", values, "refundOrderNo");
return (Criteria) this;
}
public Criteria andRefundOrderBetween(String value1, String value2) {
addCriterion("refund_order between", value1, value2, "refundOrder");
public Criteria andRefundOrderNoBetween(String value1, String value2) {
addCriterion("refund_order_no between", value1, value2, "refundOrderNo");
return (Criteria) this;
}
public Criteria andRefundOrderNotBetween(String value1, String value2) {
addCriterion("refund_order not between", value1, value2, "refundOrder");
public Criteria andRefundOrderNoNotBetween(String value1, String value2) {
addCriterion("refund_order_no not between", value1, value2, "refundOrderNo");
return (Criteria) this;
}
@ -1676,6 +1676,66 @@ public class HighOrderRefundExample {
return (Criteria) this;
}
public Criteria andRefundTimeIsNull() {
addCriterion("refund_time is null");
return (Criteria) this;
}
public Criteria andRefundTimeIsNotNull() {
addCriterion("refund_time is not null");
return (Criteria) this;
}
public Criteria andRefundTimeEqualTo(Date value) {
addCriterion("refund_time =", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeNotEqualTo(Date value) {
addCriterion("refund_time <>", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeGreaterThan(Date value) {
addCriterion("refund_time >", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeGreaterThanOrEqualTo(Date value) {
addCriterion("refund_time >=", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeLessThan(Date value) {
addCriterion("refund_time <", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeLessThanOrEqualTo(Date value) {
addCriterion("refund_time <=", value, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeIn(List<Date> values) {
addCriterion("refund_time in", values, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeNotIn(List<Date> values) {
addCriterion("refund_time not in", values, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeBetween(Date value1, Date value2) {
addCriterion("refund_time between", value1, value2, "refundTime");
return (Criteria) this;
}
public Criteria andRefundTimeNotBetween(Date value1, Date value2) {
addCriterion("refund_time not between", value1, value2, "refundTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;

@ -37,5 +37,12 @@ public interface OrderRefundService {
*/
List<HighOrderRefund> getRefundOrderList(Map<String, Object> param);
/**
* 查询退款订单详情
* @param refundOrderNo
* @return
*/
HighOrderRefund getRefundByRefundNo(String refundOrderNo);
}

@ -331,7 +331,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
childOrder.setGoodsId(store.getId());
childOrder.setGoodsName(store.getStoreName());
childOrder.setGoodsImg(store.getStoreLogo());
childOrder.setGoodsSpecName("默认");
childOrder.setGoodsSpecName(createOrderChild.getGasOilNo()+"#");
childOrder.setGoodsPrice(priceModel.getOilingPrice());
childOrder.setGoodsActualPrice(priceModel.getPayPrice());
childOrder.setSaleCount(createOrderChild.getSaleCount());

@ -101,7 +101,7 @@ public class OrderRefundServiceImpl implements OrderRefundService {
orderRefund.setGoodsImg(orderChild.getGoodsImg());
orderRefund.setGoodsSpecName(orderChild.getGoodsSpecName());
orderRefund.setGoodsCount(orderChild.getSaleCount());
orderRefund.setRefundOrder(refundNo==null?OrderUtil.generateRefundOrderNo():refundNo);
orderRefund.setRefundOrderNo(refundNo==null?OrderUtil.generateRefundOrderNo():refundNo);
orderRefund.setRefundGoodsNum(refundGoodsCount);
orderRefund.setReturnTotalPrice(refundPrice.add(new BigDecimal(refundIntegral).divide(new BigDecimal("100"))));
orderRefund.setRefundPrice(refundPrice);
@ -124,13 +124,21 @@ public class OrderRefundServiceImpl implements OrderRefundService {
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "orderChildNo"))) {
criteria.andOrderChildNoEqualTo(MapUtils.getString(param, "orderChildNo"));
criteria.andOrderChildNoLike("%"+MapUtils.getString(param, "orderChildNo")+"%");
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "refundOrderNo"))) {
criteria.andRefundOrderNoLike("%"+MapUtils.getString(param, "refundOrderNo")+"%");
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "memPhone"))) {
criteria.andMemPhoneEqualTo(MapUtils.getString(param, "memPhone"));
}
if (MapUtils.getLong(param, "memId") != null) {
criteria.andMemIdEqualTo(MapUtils.getLong(param, "memId"));
}
if (MapUtils.getInteger(param, "goodsType") != null) {
criteria.andGoodsTypeEqualTo(MapUtils.getInteger(param, "goodsType"));
}
@ -147,6 +155,17 @@ public class OrderRefundServiceImpl implements OrderRefundService {
return orderRefundMapper.selectByExample(example);
}
@Override
public HighOrderRefund getRefundByRefundNo(String refundOrderNo) {
HighOrderRefundExample example = new HighOrderRefundExample();
example.createCriteria().andRefundOrderNoEqualTo(refundOrderNo);
List<HighOrderRefund> list = orderRefundMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
/**
* 金额退回用户
* @param orderNo 订单号

@ -0,0 +1,68 @@
package com.web.controller;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.model.HighUserModel;
import com.hai.model.ResponseData;
import com.hai.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
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 javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping(value = "/discount")
@Api(value = "优惠券接口")
public class DiscountController {
private static Logger log = LoggerFactory.getLogger(DiscountController.class);
@Resource
private UserCenter userCenter;
@Resource
private HighDiscountUserRelService discountUserRelService;
@RequestMapping(value="/getUserDiscountList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询用户优惠券列表")
public ResponseData getUserDiscountList(@RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "useScope", required = false) Integer useScope,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "ppageSizeageNum", required = true) Integer pageSize) {
try {
HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class);
if (userInfoModel == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");
}
Map<String, Object> param = new HashMap<>();
param.put("userId", userInfoModel.getHighUser().getId());
param.put("useScope", useScope);
param.put("status", status);
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(discountUserRelService.getDiscountList(param)));
} catch (Exception e) {
log.error("HighDiscountController -> getUserDiscountList() error!",e);
return ResponseMsgUtil.exception(e);
}
}
}
Loading…
Cancel
Save