* 'order' of http://139.159.177.244:3000/hurui/hai-server:
  提交代码
dev-discount
袁野 2 years ago
commit cb9444a1fb
  1. 4
      hai-order/src/main/java/com/web/controller/OrderController.java
  2. 140
      hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java
  3. 33
      hai-service/src/main/java/com/hai/dao/HighOrderMapper.java
  4. 14
      hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java
  5. 46
      hai-service/src/main/java/com/hai/dao/order/OrderMapperExt.java
  6. 16
      hai-service/src/main/java/com/hai/entity/HighOrder.java
  7. 70
      hai-service/src/main/java/com/hai/entity/HighOrderExample.java
  8. 18
      hai-service/src/main/java/com/hai/order/model/OrderCouponModel.java
  9. 63
      hai-service/src/main/java/com/hai/order/model/OrderIntegralRechargeModel.java
  10. 8
      hai-service/src/main/java/com/hai/order/service/OrderServiceExt.java
  11. 24
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceExtImpl.java
  12. 16
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java

@ -205,6 +205,7 @@ public class OrderController {
@ResponseBody @ResponseBody
@ApiOperation(value = "获取用户订单列表") @ApiOperation(value = "获取用户订单列表")
public ResponseData getUserOrderList(@RequestParam(name = "title", required = false) String title, public ResponseData getUserOrderList(@RequestParam(name = "title", required = false) String title,
@RequestParam(name = "searchTitle", required = false) String searchTitle,
@RequestParam(name = "orderNo", required = false) String orderNo, @RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "productType", required = false) Integer productType, @RequestParam(name = "productType", required = false) Integer productType,
@RequestParam(name = "status", required = false) Integer status, @RequestParam(name = "status", required = false) Integer status,
@ -217,7 +218,8 @@ public class OrderController {
} }
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("searchTitle", title); param.put("title", title);
param.put("searchTitle", searchTitle);
param.put("orderNo", orderNo); param.put("orderNo", orderNo);
param.put("productType", productType); param.put("productType", productType);
param.put("status", status); param.put("status", status);

@ -0,0 +1,140 @@
package com.web.controller.business;
import com.alibaba.excel.EasyExcel;
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.entity.HighGasOrder;
import com.hai.enum_type.UserObjectTypeEnum;
import com.hai.enum_type.UserRoleTypeEnum;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.order.model.ExportGasOrderModel;
import com.hai.order.model.OrderCouponModel;
import com.hai.order.model.OrderIntegralRechargeModel;
import com.hai.order.service.OrderService;
import com.hai.order.service.OrderServiceExt;
import com.hai.order.type.OrderOilStatus;
import com.hai.service.HighGasOrderService;
import com.web.config.SysConst;
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.io.File;
import java.math.BigDecimal;
import java.util.*;
@Controller
@RequestMapping(value = "integralRecharge")
@Api(value = "积分充值业务")
public class OrderIntegralRechargeController {
private static Logger log = LoggerFactory.getLogger(OrderIntegralRechargeController.class);
@Resource
private UserCenter userCenter;
@Resource
private OrderService orderService;
@Resource
private OrderServiceExt orderServiceExt;
@RequestMapping(value="/getOrderList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询订单列表")
public ResponseData getOrderList(@RequestParam(name = "memPhone", required = false) String memPhone,
@RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "status", required = false) Long status,
@RequestParam(name = "createTimeS", required = false) Long createTimeS,
@RequestParam(name = "createTimeE", required = false) Long createTimeE,
@RequestParam(name = "payTimeS", required = false) Long payTimeS,
@RequestParam(name = "payTimeE", required = false) Long payTimeE,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize
) {
try {
Map<String, Object> param = new HashMap<>();
param.put("orderNo", orderNo);
param.put("memPhone", memPhone);
param.put("status", status);
param.put("createTimeS", createTimeS);
param.put("createTimeE", createTimeE);
param.put("payTimeS", payTimeS);
param.put("payTimeE", payTimeE);
PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(orderServiceExt.getOrderIntegralRechargeList(param)));
} catch (Exception e) {
log.error("OrderIntegralRechargeController -> getOrderList() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getOrderDetail",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询油站详情")
public ResponseData getOilOrdergetOrderDetailDetail(@RequestParam(name = "orderNo", required = true) String orderNo) {
try {
Map<String, Object> map = new HashMap<>();
map.put("tradeOrder", orderService.getOrderDetailByNo(orderNo));
return ResponseMsgUtil.success(map);
} catch (Exception e) {
log.error("OrderIntegralRechargeController -> getOrderDetail() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/exportOrder",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "导出订单")
public ResponseData exportOrder(@RequestParam(name = "memPhone", required = false) String memPhone,
@RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "status", required = false) Long status,
@RequestParam(name = "createTimeS", required = false) Long createTimeS,
@RequestParam(name = "createTimeE", required = false) Long createTimeE,
@RequestParam(name = "payTimeS", required = false) Long payTimeS,
@RequestParam(name = "payTimeE", required = false) Long payTimeE
) {
try {
Map<String, Object> param = new HashMap<>();
param.put("orderNo", orderNo);
param.put("memPhone", memPhone);
param.put("status", status);
param.put("createTimeS", createTimeS);
param.put("createTimeE", createTimeE);
param.put("payTimeS", payTimeS);
param.put("payTimeE", payTimeE);
List<OrderIntegralRechargeModel> list = orderServiceExt.getOrderIntegralRechargeList(param);
String fileName = "/temporary/" + System.currentTimeMillis() + ".xlsx";
EasyExcel.write(SysConst.getSysConfig().getFileUrl() + fileName, OrderIntegralRechargeModel.class)
.sheet("卡券订单")
.doWrite(list);
return ResponseMsgUtil.success(fileName);
} catch (Exception e) {
log.error("OrderIntegralRechargeController -> exportOrder() error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -39,11 +39,11 @@ public interface HighOrderMapper extends HighOrderMapperExt {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
@Insert({ @Insert({
"insert into high_order (search_title, product_type, ", "insert into high_order (title, search_title, ",
"company_id, company_name, ", "product_type, company_id, ",
"promote_code, mem_discount_id, ", "company_name, promote_code, ",
"mem_discount_name, mem_id, ", "mem_discount_id, mem_discount_name, ",
"mem_name, mem_phone, ", "mem_id, mem_name, mem_phone, ",
"order_no, pay_serial_no, ", "order_no, pay_serial_no, ",
"pay_type, mem_card_id, ", "pay_type, mem_card_id, ",
"mem_card_type, mem_card_no, ", "mem_card_type, mem_card_no, ",
@ -61,11 +61,11 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"exception_content, ext_1, ", "exception_content, ext_1, ",
"ext_2, ext_3, ext_4, ", "ext_2, ext_3, ext_4, ",
"ext_5, ext_6)", "ext_5, ext_6)",
"values (#{searchTitle,jdbcType=VARCHAR}, #{productType,jdbcType=INTEGER}, ", "values (#{title,jdbcType=VARCHAR}, #{searchTitle,jdbcType=VARCHAR}, ",
"#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ", "#{productType,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT}, ",
"#{promoteCode,jdbcType=VARCHAR}, #{memDiscountId,jdbcType=BIGINT}, ", "#{companyName,jdbcType=VARCHAR}, #{promoteCode,jdbcType=VARCHAR}, ",
"#{memDiscountName,jdbcType=VARCHAR}, #{memId,jdbcType=BIGINT}, ", "#{memDiscountId,jdbcType=BIGINT}, #{memDiscountName,jdbcType=VARCHAR}, ",
"#{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ", "#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ",
"#{orderNo,jdbcType=VARCHAR}, #{paySerialNo,jdbcType=VARCHAR}, ", "#{orderNo,jdbcType=VARCHAR}, #{paySerialNo,jdbcType=VARCHAR}, ",
"#{payType,jdbcType=INTEGER}, #{memCardId,jdbcType=BIGINT}, ", "#{payType,jdbcType=INTEGER}, #{memCardId,jdbcType=BIGINT}, ",
"#{memCardType,jdbcType=INTEGER}, #{memCardNo,jdbcType=VARCHAR}, ", "#{memCardType,jdbcType=INTEGER}, #{memCardNo,jdbcType=VARCHAR}, ",
@ -94,6 +94,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@SelectProvider(type=HighOrderSqlProvider.class, method="selectByExample") @SelectProvider(type=HighOrderSqlProvider.class, method="selectByExample")
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
@Result(column="search_title", property="searchTitle", jdbcType=JdbcType.VARCHAR), @Result(column="search_title", property="searchTitle", jdbcType=JdbcType.VARCHAR),
@Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER), @Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@ -144,10 +145,10 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Select({ @Select({
"select", "select",
"id, search_title, product_type, company_id, company_name, promote_code, mem_discount_id, ", "id, title, search_title, product_type, company_id, company_name, promote_code, ",
"mem_discount_name, mem_id, mem_name, mem_phone, order_no, pay_serial_no, pay_type, ", "mem_discount_id, mem_discount_name, mem_id, mem_name, mem_phone, order_no, pay_serial_no, ",
"mem_card_id, mem_card_type, mem_card_no, total_price, deduction_price, pay_gold, ", "pay_type, mem_card_id, mem_card_type, mem_card_no, total_price, deduction_price, ",
"payable_price, pay_price, pay_real_price, order_status, remarks, create_time, ", "pay_gold, payable_price, pay_price, pay_real_price, order_status, remarks, create_time, ",
"surplus_refund_price, surplus_refund_integral, pay_time, finish_time, cancel_time, ", "surplus_refund_price, surplus_refund_integral, pay_time, finish_time, cancel_time, ",
"cancel_remarks, refund_time, account_merchant_num, profit_sharing_status, profit_sharing_record_id, ", "cancel_remarks, refund_time, account_merchant_num, profit_sharing_status, profit_sharing_record_id, ",
"whether_check, whether_rebate, exception_status, exception_content, ext_1, ext_2, ", "whether_check, whether_rebate, exception_status, exception_content, ext_1, ext_2, ",
@ -157,6 +158,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
}) })
@Results({ @Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
@Result(column="search_title", property="searchTitle", jdbcType=JdbcType.VARCHAR), @Result(column="search_title", property="searchTitle", jdbcType=JdbcType.VARCHAR),
@Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER), @Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@ -216,7 +218,8 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Update({ @Update({
"update high_order", "update high_order",
"set search_title = #{searchTitle,jdbcType=VARCHAR},", "set title = #{title,jdbcType=VARCHAR},",
"search_title = #{searchTitle,jdbcType=VARCHAR},",
"product_type = #{productType,jdbcType=INTEGER},", "product_type = #{productType,jdbcType=INTEGER},",
"company_id = #{companyId,jdbcType=BIGINT},", "company_id = #{companyId,jdbcType=BIGINT},",
"company_name = #{companyName,jdbcType=VARCHAR},", "company_name = #{companyName,jdbcType=VARCHAR},",

@ -28,6 +28,10 @@ public class HighOrderSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.INSERT_INTO("high_order"); sql.INSERT_INTO("high_order");
if (record.getTitle() != null) {
sql.VALUES("title", "#{title,jdbcType=VARCHAR}");
}
if (record.getSearchTitle() != null) { if (record.getSearchTitle() != null) {
sql.VALUES("search_title", "#{searchTitle,jdbcType=VARCHAR}"); sql.VALUES("search_title", "#{searchTitle,jdbcType=VARCHAR}");
} }
@ -218,6 +222,7 @@ public class HighOrderSqlProvider {
} else { } else {
sql.SELECT("id"); sql.SELECT("id");
} }
sql.SELECT("title");
sql.SELECT("search_title"); sql.SELECT("search_title");
sql.SELECT("product_type"); sql.SELECT("product_type");
sql.SELECT("company_id"); sql.SELECT("company_id");
@ -284,6 +289,10 @@ public class HighOrderSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
} }
if (record.getTitle() != null) {
sql.SET("title = #{record.title,jdbcType=VARCHAR}");
}
if (record.getSearchTitle() != null) { if (record.getSearchTitle() != null) {
sql.SET("search_title = #{record.searchTitle,jdbcType=VARCHAR}"); sql.SET("search_title = #{record.searchTitle,jdbcType=VARCHAR}");
} }
@ -473,6 +482,7 @@ public class HighOrderSqlProvider {
sql.UPDATE("high_order"); sql.UPDATE("high_order");
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("title = #{record.title,jdbcType=VARCHAR}");
sql.SET("search_title = #{record.searchTitle,jdbcType=VARCHAR}"); sql.SET("search_title = #{record.searchTitle,jdbcType=VARCHAR}");
sql.SET("product_type = #{record.productType,jdbcType=INTEGER}"); sql.SET("product_type = #{record.productType,jdbcType=INTEGER}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
@ -528,6 +538,10 @@ public class HighOrderSqlProvider {
SQL sql = new SQL(); SQL sql = new SQL();
sql.UPDATE("high_order"); sql.UPDATE("high_order");
if (record.getTitle() != null) {
sql.SET("title = #{title,jdbcType=VARCHAR}");
}
if (record.getSearchTitle() != null) { if (record.getSearchTitle() != null) {
sql.SET("search_title = #{searchTitle,jdbcType=VARCHAR}"); sql.SET("search_title = #{searchTitle,jdbcType=VARCHAR}");
} }

@ -1,6 +1,7 @@
package com.hai.dao.order; package com.hai.dao.order;
import com.hai.order.model.OrderCouponModel; import com.hai.order.model.OrderCouponModel;
import com.hai.order.model.OrderIntegralRechargeModel;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
@ -74,4 +75,49 @@ public interface OrderMapperExt {
"</script>"}) "</script>"})
List<OrderCouponModel> queryOrderCoupon(@Param("param") Map<String, Object> param); List<OrderCouponModel> queryOrderCoupon(@Param("param") Map<String, Object> param);
@Select({"<script>" +
" select" +
" b.order_no orderNo," +
" b.mem_phone memPhone," +
" a.goods_price*100 goodsPrice," +
" b.total_price totalPrice," +
" b.deduction_price deductionPrice," +
" b.payable_price payablePrice," +
" b.pay_gold payGold," +
" b.pay_price payPrice," +
" CASE b.pay_type " +
" WHEN 1 THEN '支付宝' " +
" WHEN 2 THEN '微信'" +
" WHEN 3 THEN '积分抵扣'" +
" WHEN 4 THEN '贵州汇联通工会卡'" +
" WHEN 5 THEN '银联'" +
" WHEN 6 THEN '银联分期'" +
" WHEN 7 THEN '嗨森逛油卡'" +
" ELSE '未知' END payType," +
" CASE b.order_status " +
" WHEN 1 THEN '待支付' " +
" WHEN 2 THEN '已支付'" +
" WHEN 3 THEN '已完成'" +
" WHEN 4 THEN '已退款'" +
" WHEN 5 THEN '已取消'" +
" WHEN 6 THEN '退款中'" +
" WHEN 7 THEN '退款拒绝'" +
" ELSE '未知' END orderStatus," +
" b.create_time createTime," +
" b.pay_time payTime" +
" from high_child_order a" +
" LEFT JOIN high_order b on b.id = a.order_id" +
" where a.goods_type = 2 " +
" <if test='param.orderNo != null'> and b.order_no like concat('%', #{param.orderNo}, '%') </if>" +
" <if test='param.memPhone != null'> and b.mem_phone like concat('%', #{param.memPhone}, '%') </if>" +
" <if test='param.payType != null'> and b.pay_type = #{param.payType} </if>" +
" <if test='param.orderStatus != null'> and b.order_status = #{param.orderStatus} </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>" +
" <if test='param.payTimeS != null'> <![CDATA[ and b.pay_time >= #{param.payTimeS} ]]> </if>" +
" <if test='param.payTimeE != null'> <![CDATA[ and b.pay_time <= #{param.payTimeE} ]]> </if>" +
" ORDER BY b.create_time desc" +
"</script>"})
List<OrderIntegralRechargeModel> queryOrderIntegralRecharge(@Param("param") Map<String, Object> param);
} }

@ -20,6 +20,11 @@ public class HighOrder implements Serializable {
*/ */
private Long id; private Long id;
/**
* 标题
*/
private String title;
/** /**
* 搜索标题 * 搜索标题
*/ */
@ -256,6 +261,14 @@ public class HighOrder implements Serializable {
this.id = id; this.id = id;
} }
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getSearchTitle() { public String getSearchTitle() {
return searchTitle; return searchTitle;
} }
@ -629,6 +642,7 @@ public class HighOrder implements Serializable {
} }
HighOrder other = (HighOrder) that; HighOrder other = (HighOrder) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
&& (this.getSearchTitle() == null ? other.getSearchTitle() == null : this.getSearchTitle().equals(other.getSearchTitle())) && (this.getSearchTitle() == null ? other.getSearchTitle() == null : this.getSearchTitle().equals(other.getSearchTitle()))
&& (this.getProductType() == null ? other.getProductType() == null : this.getProductType().equals(other.getProductType())) && (this.getProductType() == null ? other.getProductType() == null : this.getProductType().equals(other.getProductType()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
@ -681,6 +695,7 @@ public class HighOrder implements Serializable {
final int prime = 31; final int prime = 31;
int result = 1; int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getSearchTitle() == null) ? 0 : getSearchTitle().hashCode()); result = prime * result + ((getSearchTitle() == null) ? 0 : getSearchTitle().hashCode());
result = prime * result + ((getProductType() == null) ? 0 : getProductType().hashCode()); result = prime * result + ((getProductType() == null) ? 0 : getProductType().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
@ -736,6 +751,7 @@ public class HighOrder implements Serializable {
sb.append(" ["); sb.append(" [");
sb.append("Hash = ").append(hashCode()); sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", title=").append(title);
sb.append(", searchTitle=").append(searchTitle); sb.append(", searchTitle=").append(searchTitle);
sb.append(", productType=").append(productType); sb.append(", productType=").append(productType);
sb.append(", companyId=").append(companyId); sb.append(", companyId=").append(companyId);

@ -186,6 +186,76 @@ public class HighOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andTitleIsNull() {
addCriterion("title is null");
return (Criteria) this;
}
public Criteria andTitleIsNotNull() {
addCriterion("title is not null");
return (Criteria) this;
}
public Criteria andTitleEqualTo(String value) {
addCriterion("title =", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotEqualTo(String value) {
addCriterion("title <>", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThan(String value) {
addCriterion("title >", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThanOrEqualTo(String value) {
addCriterion("title >=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThan(String value) {
addCriterion("title <", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThanOrEqualTo(String value) {
addCriterion("title <=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLike(String value) {
addCriterion("title like", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotLike(String value) {
addCriterion("title not like", value, "title");
return (Criteria) this;
}
public Criteria andTitleIn(List<String> values) {
addCriterion("title in", values, "title");
return (Criteria) this;
}
public Criteria andTitleNotIn(List<String> values) {
addCriterion("title not in", values, "title");
return (Criteria) this;
}
public Criteria andTitleBetween(String value1, String value2) {
addCriterion("title between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andTitleNotBetween(String value1, String value2) {
addCriterion("title not between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andSearchTitleIsNull() { public Criteria andSearchTitleIsNull() {
addCriterion("search_title is null"); addCriterion("search_title is null");
return (Criteria) this; return (Criteria) this;

@ -1,6 +1,7 @@
package com.hai.order.model; package com.hai.order.model;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -15,48 +16,63 @@ import java.util.Date;
@Data @Data
public class OrderCouponModel { public class OrderCouponModel {
@ColumnWidth(25)
@ExcelProperty(value = "交易订单号") @ExcelProperty(value = "交易订单号")
private String orderNo; private String orderNo;
@ColumnWidth(15)
@ExcelProperty(value = "客户电话") @ExcelProperty(value = "客户电话")
private String memPhone; private String memPhone;
@ColumnWidth(30)
@ExcelProperty(value = "卡券名称") @ExcelProperty(value = "卡券名称")
private String couponName; private String couponName;
@ColumnWidth(13)
@ExcelProperty(value = "卡券面值") @ExcelProperty(value = "卡券面值")
private String couponPrice; private String couponPrice;
@ExcelProperty(value = "总价格") @ColumnWidth(13)
@ExcelProperty(value = "订单总额")
private BigDecimal totalPrice; private BigDecimal totalPrice;
@ColumnWidth(13)
@ExcelProperty(value = "优惠价格") @ExcelProperty(value = "优惠价格")
private BigDecimal deductionPrice; private BigDecimal deductionPrice;
@ColumnWidth(13)
@ExcelProperty(value = "应付金额") @ExcelProperty(value = "应付金额")
private BigDecimal payablePrice; private BigDecimal payablePrice;
@ColumnWidth(13)
@ExcelProperty(value = "积分抵扣") @ExcelProperty(value = "积分抵扣")
private Long payGold; private Long payGold;
@ColumnWidth(13)
@ExcelProperty(value = "实付金额") @ExcelProperty(value = "实付金额")
private BigDecimal payPrice; private BigDecimal payPrice;
@ColumnWidth(13)
@ExcelProperty(value = "支付方式") @ExcelProperty(value = "支付方式")
private String payType; private String payType;
@ColumnWidth(15)
@ExcelProperty(value = "支付卡号") @ExcelProperty(value = "支付卡号")
private String memCardNo; private String memCardNo;
@ColumnWidth(13)
@ExcelProperty(value = "订单状态") @ExcelProperty(value = "订单状态")
private String orderStatus; private String orderStatus;
@ColumnWidth(20)
@ExcelProperty(value = "创建时间") @ExcelProperty(value = "创建时间")
private Date createTime; private Date createTime;
@ColumnWidth(20)
@ExcelProperty(value = "支付时间") @ExcelProperty(value = "支付时间")
private Date payTime; private Date payTime;
@ColumnWidth(20)
@ExcelProperty(value = "完成时间") @ExcelProperty(value = "完成时间")
private Date finishTime; private Date finishTime;
} }

@ -0,0 +1,63 @@
package com.hai.order.model;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 积分充值订单模型
* @className: OrderCouponModel
* @author: HuRui
* @date: 2022/9/30
**/
@Data
public class OrderIntegralRechargeModel {
@ColumnWidth(25)
@ExcelProperty(value = "交易订单号")
private String orderNo;
@ColumnWidth(15)
@ExcelProperty(value = "客户电话")
private String memPhone;
@ColumnWidth(15)
@ExcelProperty(value = "充值积分")
private Integer goodsPrice;
@ColumnWidth(13)
@ExcelProperty(value = "订单总额")
private BigDecimal totalPrice;
@ColumnWidth(13)
@ExcelProperty(value = "优惠价格")
private BigDecimal deductionPrice;
@ColumnWidth(13)
@ExcelProperty(value = "应付金额")
private BigDecimal payablePrice;
@ColumnWidth(13)
@ExcelProperty(value = "实付金额")
private BigDecimal payPrice;
@ColumnWidth(13)
@ExcelProperty(value = "支付方式")
private String payType;
@ColumnWidth(13)
@ExcelProperty(value = "订单状态")
private String orderStatus;
@ColumnWidth(20)
@ExcelProperty(value = "创建时间")
private Date createTime;
@ColumnWidth(20)
@ExcelProperty(value = "支付时间")
private Date payTime;
}

@ -2,6 +2,7 @@ package com.hai.order.service;
import com.hai.order.model.OrderCouponModel; import com.hai.order.model.OrderCouponModel;
import com.hai.order.model.OrderIntegralRechargeModel;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -29,4 +30,11 @@ public interface OrderServiceExt {
*/ */
List<OrderCouponModel> getOrderCouponList(Map<String, Object> param) throws Exception; List<OrderCouponModel> getOrderCouponList(Map<String, Object> param) throws Exception;
/**
* 查询积分充值订单
* @param param
* @return
*/
List<OrderIntegralRechargeModel> getOrderIntegralRechargeList(Map<String, Object> param) throws Exception;
} }

@ -3,6 +3,7 @@ package com.hai.order.service.impl;
import com.hai.common.utils.DateUtil; import com.hai.common.utils.DateUtil;
import com.hai.dao.order.OrderMapperExt; import com.hai.dao.order.OrderMapperExt;
import com.hai.order.model.OrderCouponModel; import com.hai.order.model.OrderCouponModel;
import com.hai.order.model.OrderIntegralRechargeModel;
import com.hai.order.service.OrderServiceExt; import com.hai.order.service.OrderServiceExt;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -54,7 +55,30 @@ public class OrderServiceExtImpl implements OrderServiceExt {
if (MapUtils.getLong(param, "finishTimeE") != null) { if (MapUtils.getLong(param, "finishTimeE") != null) {
param.put("finishTimeE", DateUtil.date2String(new Date(MapUtils.getLong(param, "finishTimeE")), DateUtil.Y_M_D_HMS)); param.put("finishTimeE", DateUtil.date2String(new Date(MapUtils.getLong(param, "finishTimeE")), DateUtil.Y_M_D_HMS));
} }
return orderMapperExt.queryOrderCoupon(param); return orderMapperExt.queryOrderCoupon(param);
} }
@Override
public List<OrderIntegralRechargeModel> getOrderIntegralRechargeList(Map<String, Object> param) throws Exception {
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));
}
if (MapUtils.getLong(param, "payTimeS") != null) {
param.put("payTimeS", DateUtil.date2String(new Date(MapUtils.getLong(param, "payTimeS")), DateUtil.Y_M_D_HMS));
}
if (MapUtils.getLong(param, "payTimeE") != null) {
param.put("payTimeE", DateUtil.date2String(new Date(MapUtils.getLong(param, "payTimeE")), DateUtil.Y_M_D_HMS));
}
return orderMapperExt.queryOrderIntegralRecharge(param);
}
} }

@ -159,9 +159,9 @@ public class OrderServiceImpl implements OrderService {
childOrderList = couponOrderList; childOrderList = couponOrderList;
for (HighChildOrder childOrder : couponOrderList) { for (HighChildOrder childOrder : couponOrderList) {
if (StringUtils.isBlank(order.getSearchTitle())) { if (StringUtils.isBlank(order.getSearchTitle())) {
order.setSearchTitle(childOrder.getGoodsName()); order.setTitle(childOrder.getGoodsName());
} else { } else {
order.setSearchTitle("+"+childOrder.getGoodsName()); order.setTitle("+"+childOrder.getGoodsName());
} }
} }
// 积分充值 // 积分充值
@ -170,7 +170,7 @@ public class OrderServiceImpl implements OrderService {
// 创建积分充值订单业务 // 创建积分充值订单业务
HighChildOrder oilOrder = orderCreateHandleService.integralRecharge(child); HighChildOrder oilOrder = orderCreateHandleService.integralRecharge(child);
childOrderList.add(oilOrder); childOrderList.add(oilOrder);
order.setSearchTitle("积分充值"); order.setTitle("积分充值");
// 加油订单 // 加油订单
} else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE3.getNumber())) { } else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE3.getNumber())) {
@ -178,7 +178,7 @@ public class OrderServiceImpl implements OrderService {
// 创建加油订单业务 // 创建加油订单业务
HighChildOrder oilOrder = orderCreateHandleService.oilHandle(order, discountUserRel, createOrderModel, child); HighChildOrder oilOrder = orderCreateHandleService.oilHandle(order, discountUserRel, createOrderModel, child);
childOrderList.add(oilOrder); childOrderList.add(oilOrder);
order.setSearchTitle(oilOrder.getGoodsName()); order.setTitle(oilOrder.getGoodsName());
// 肯德基 // 肯德基
} else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE4.getNumber())) { } else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE4.getNumber())) {
@ -339,6 +339,7 @@ public class OrderServiceImpl implements OrderService {
order.setSurplusRefundPrice(new BigDecimal("0")); order.setSurplusRefundPrice(new BigDecimal("0"));
order.setSurplusRefundIntegral(0); order.setSurplusRefundIntegral(0);
order.setSearchTitle(order.getOrderNo());
// 订单入库前处理 // 订单入库前处理
for (HighChildOrder childOrder : order.getHighChildOrderList()) { for (HighChildOrder childOrder : order.getHighChildOrderList()) {
@ -363,6 +364,7 @@ public class OrderServiceImpl implements OrderService {
} }
order.setSurplusRefundPrice(order.getSurplusRefundPrice().add(childOrder.getSurplusRefundPrice())); order.setSurplusRefundPrice(order.getSurplusRefundPrice().add(childOrder.getSurplusRefundPrice()));
order.setSurplusRefundIntegral(order.getSurplusRefundIntegral() + childOrder.getSurplusRefundIntegral()); order.setSurplusRefundIntegral(order.getSurplusRefundIntegral() + childOrder.getSurplusRefundIntegral());
order.setSearchTitle(order.getSearchTitle()+childOrder.getGoodsName());
} }
// 订单入库 // 订单入库
@ -577,8 +579,12 @@ public class OrderServiceImpl implements OrderService {
criteria.andMemIdEqualTo(MapUtils.getLong(param, "userId")); criteria.andMemIdEqualTo(MapUtils.getLong(param, "userId"));
} }
if (StringUtils.isNotBlank(MapUtils.getString(param, "title"))) {
criteria.andTitleEqualTo("%" + MapUtils.getString(param, "title") + "%");
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "searchTitle"))) { if (StringUtils.isNotBlank(MapUtils.getString(param, "searchTitle"))) {
criteria.andSearchTitleLike("%" + MapUtils.getString(param, "title") + "%"); criteria.andSearchTitleLike("%" + MapUtils.getString(param, "searchTitle") + "%");
} }
if (StringUtils.isNotBlank(MapUtils.getString(param, "orderNo"))) { if (StringUtils.isNotBlank(MapUtils.getString(param, "orderNo"))) {

Loading…
Cancel
Save