diff --git a/hai-order/src/main/java/com/web/controller/OrderController.java b/hai-order/src/main/java/com/web/controller/OrderController.java index 047e08d5..dfe5243b 100644 --- a/hai-order/src/main/java/com/web/controller/OrderController.java +++ b/hai-order/src/main/java/com/web/controller/OrderController.java @@ -205,6 +205,7 @@ public class OrderController { @ResponseBody @ApiOperation(value = "获取用户订单列表") 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 = "productType", required = false) Integer productType, @RequestParam(name = "status", required = false) Integer status, @@ -217,7 +218,8 @@ public class OrderController { } Map param = new HashMap<>(); - param.put("searchTitle", title); + param.put("title", title); + param.put("searchTitle", searchTitle); param.put("orderNo", orderNo); param.put("productType", productType); param.put("status", status); diff --git a/hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java b/hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java new file mode 100644 index 00000000..909cba29 --- /dev/null +++ b/hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java @@ -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 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 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 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 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); + } + } + +} diff --git a/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java b/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java index d4c5d2ae..3297c3e9 100644 --- a/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java @@ -39,11 +39,11 @@ public interface HighOrderMapper extends HighOrderMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into high_order (search_title, product_type, ", - "company_id, company_name, ", - "promote_code, mem_discount_id, ", - "mem_discount_name, mem_id, ", - "mem_name, mem_phone, ", + "insert into high_order (title, search_title, ", + "product_type, company_id, ", + "company_name, promote_code, ", + "mem_discount_id, mem_discount_name, ", + "mem_id, mem_name, mem_phone, ", "order_no, pay_serial_no, ", "pay_type, mem_card_id, ", "mem_card_type, mem_card_no, ", @@ -61,11 +61,11 @@ public interface HighOrderMapper extends HighOrderMapperExt { "exception_content, ext_1, ", "ext_2, ext_3, ext_4, ", "ext_5, ext_6)", - "values (#{searchTitle,jdbcType=VARCHAR}, #{productType,jdbcType=INTEGER}, ", - "#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ", - "#{promoteCode,jdbcType=VARCHAR}, #{memDiscountId,jdbcType=BIGINT}, ", - "#{memDiscountName,jdbcType=VARCHAR}, #{memId,jdbcType=BIGINT}, ", - "#{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ", + "values (#{title,jdbcType=VARCHAR}, #{searchTitle,jdbcType=VARCHAR}, ", + "#{productType,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT}, ", + "#{companyName,jdbcType=VARCHAR}, #{promoteCode,jdbcType=VARCHAR}, ", + "#{memDiscountId,jdbcType=BIGINT}, #{memDiscountName,jdbcType=VARCHAR}, ", + "#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ", "#{orderNo,jdbcType=VARCHAR}, #{paySerialNo,jdbcType=VARCHAR}, ", "#{payType,jdbcType=INTEGER}, #{memCardId,jdbcType=BIGINT}, ", "#{memCardType,jdbcType=INTEGER}, #{memCardNo,jdbcType=VARCHAR}, ", @@ -94,6 +94,7 @@ public interface HighOrderMapper extends HighOrderMapperExt { @SelectProvider(type=HighOrderSqlProvider.class, method="selectByExample") @Results({ @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="product_type", property="productType", jdbcType=JdbcType.INTEGER), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @@ -144,10 +145,10 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Select({ "select", - "id, search_title, product_type, company_id, company_name, promote_code, mem_discount_id, ", - "mem_discount_name, mem_id, mem_name, mem_phone, order_no, pay_serial_no, pay_type, ", - "mem_card_id, mem_card_type, mem_card_no, total_price, deduction_price, pay_gold, ", - "payable_price, pay_price, pay_real_price, order_status, remarks, create_time, ", + "id, title, search_title, product_type, company_id, company_name, promote_code, ", + "mem_discount_id, mem_discount_name, mem_id, mem_name, mem_phone, order_no, pay_serial_no, ", + "pay_type, mem_card_id, mem_card_type, mem_card_no, total_price, deduction_price, ", + "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, ", "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, ", @@ -157,6 +158,7 @@ public interface HighOrderMapper extends HighOrderMapperExt { }) @Results({ @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="product_type", property="productType", jdbcType=JdbcType.INTEGER), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), @@ -216,7 +218,8 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Update({ "update high_order", - "set search_title = #{searchTitle,jdbcType=VARCHAR},", + "set title = #{title,jdbcType=VARCHAR},", + "search_title = #{searchTitle,jdbcType=VARCHAR},", "product_type = #{productType,jdbcType=INTEGER},", "company_id = #{companyId,jdbcType=BIGINT},", "company_name = #{companyName,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java index fc8e0bc1..edd1212f 100644 --- a/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java @@ -28,6 +28,10 @@ public class HighOrderSqlProvider { SQL sql = new SQL(); sql.INSERT_INTO("high_order"); + if (record.getTitle() != null) { + sql.VALUES("title", "#{title,jdbcType=VARCHAR}"); + } + if (record.getSearchTitle() != null) { sql.VALUES("search_title", "#{searchTitle,jdbcType=VARCHAR}"); } @@ -218,6 +222,7 @@ public class HighOrderSqlProvider { } else { sql.SELECT("id"); } + sql.SELECT("title"); sql.SELECT("search_title"); sql.SELECT("product_type"); sql.SELECT("company_id"); @@ -284,6 +289,10 @@ public class HighOrderSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); } + if (record.getTitle() != null) { + sql.SET("title = #{record.title,jdbcType=VARCHAR}"); + } + if (record.getSearchTitle() != null) { sql.SET("search_title = #{record.searchTitle,jdbcType=VARCHAR}"); } @@ -473,6 +482,7 @@ public class HighOrderSqlProvider { sql.UPDATE("high_order"); sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("title = #{record.title,jdbcType=VARCHAR}"); sql.SET("search_title = #{record.searchTitle,jdbcType=VARCHAR}"); sql.SET("product_type = #{record.productType,jdbcType=INTEGER}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); @@ -528,6 +538,10 @@ public class HighOrderSqlProvider { SQL sql = new SQL(); sql.UPDATE("high_order"); + if (record.getTitle() != null) { + sql.SET("title = #{title,jdbcType=VARCHAR}"); + } + if (record.getSearchTitle() != null) { sql.SET("search_title = #{searchTitle,jdbcType=VARCHAR}"); } diff --git a/hai-service/src/main/java/com/hai/dao/order/OrderMapperExt.java b/hai-service/src/main/java/com/hai/dao/order/OrderMapperExt.java index b7f4dd07..5c998c75 100644 --- a/hai-service/src/main/java/com/hai/dao/order/OrderMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/order/OrderMapperExt.java @@ -1,6 +1,7 @@ package com.hai.dao.order; import com.hai.order.model.OrderCouponModel; +import com.hai.order.model.OrderIntegralRechargeModel; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; @@ -74,4 +75,49 @@ public interface OrderMapperExt { ""}) List queryOrderCoupon(@Param("param") Map param); + @Select({""}) + List queryOrderIntegralRecharge(@Param("param") Map param); + } diff --git a/hai-service/src/main/java/com/hai/entity/HighOrder.java b/hai-service/src/main/java/com/hai/entity/HighOrder.java index c4bdc07a..dceb7bbe 100644 --- a/hai-service/src/main/java/com/hai/entity/HighOrder.java +++ b/hai-service/src/main/java/com/hai/entity/HighOrder.java @@ -20,6 +20,11 @@ public class HighOrder implements Serializable { */ private Long id; + /** + * 标题 + */ + private String title; + /** * 搜索标题 */ @@ -256,6 +261,14 @@ public class HighOrder implements Serializable { this.id = id; } + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + public String getSearchTitle() { return searchTitle; } @@ -629,6 +642,7 @@ public class HighOrder implements Serializable { } HighOrder other = (HighOrder) that; 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.getProductType() == null ? other.getProductType() == null : this.getProductType().equals(other.getProductType())) && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) @@ -681,6 +695,7 @@ public class HighOrder implements Serializable { final int prime = 31; int result = 1; 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 + ((getProductType() == null) ? 0 : getProductType().hashCode()); result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); @@ -736,6 +751,7 @@ public class HighOrder implements Serializable { sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); + sb.append(", title=").append(title); sb.append(", searchTitle=").append(searchTitle); sb.append(", productType=").append(productType); sb.append(", companyId=").append(companyId); diff --git a/hai-service/src/main/java/com/hai/entity/HighOrderExample.java b/hai-service/src/main/java/com/hai/entity/HighOrderExample.java index e51cba92..4a8935b1 100644 --- a/hai-service/src/main/java/com/hai/entity/HighOrderExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighOrderExample.java @@ -186,6 +186,76 @@ public class HighOrderExample { 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 values) { + addCriterion("title in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotIn(List 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() { addCriterion("search_title is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/order/model/OrderCouponModel.java b/hai-service/src/main/java/com/hai/order/model/OrderCouponModel.java index 49088478..4f30272d 100644 --- a/hai-service/src/main/java/com/hai/order/model/OrderCouponModel.java +++ b/hai-service/src/main/java/com/hai/order/model/OrderCouponModel.java @@ -1,6 +1,7 @@ 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; @@ -15,48 +16,63 @@ import java.util.Date; @Data public class OrderCouponModel { + @ColumnWidth(25) @ExcelProperty(value = "交易订单号") private String orderNo; + @ColumnWidth(15) @ExcelProperty(value = "客户电话") private String memPhone; + @ColumnWidth(30) @ExcelProperty(value = "卡券名称") private String couponName; + @ColumnWidth(13) @ExcelProperty(value = "卡券面值") private String couponPrice; - @ExcelProperty(value = "总价格") + @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 Long payGold; + @ColumnWidth(13) @ExcelProperty(value = "实付金额") private BigDecimal payPrice; + @ColumnWidth(13) @ExcelProperty(value = "支付方式") private String payType; + @ColumnWidth(15) @ExcelProperty(value = "支付卡号") private String memCardNo; + @ColumnWidth(13) @ExcelProperty(value = "订单状态") private String orderStatus; + @ColumnWidth(20) @ExcelProperty(value = "创建时间") private Date createTime; + @ColumnWidth(20) @ExcelProperty(value = "支付时间") private Date payTime; + @ColumnWidth(20) @ExcelProperty(value = "完成时间") private Date finishTime; } diff --git a/hai-service/src/main/java/com/hai/order/model/OrderIntegralRechargeModel.java b/hai-service/src/main/java/com/hai/order/model/OrderIntegralRechargeModel.java new file mode 100644 index 00000000..7cce6ce9 --- /dev/null +++ b/hai-service/src/main/java/com/hai/order/model/OrderIntegralRechargeModel.java @@ -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; + +} diff --git a/hai-service/src/main/java/com/hai/order/service/OrderServiceExt.java b/hai-service/src/main/java/com/hai/order/service/OrderServiceExt.java index 3471b344..34ba2a6a 100644 --- a/hai-service/src/main/java/com/hai/order/service/OrderServiceExt.java +++ b/hai-service/src/main/java/com/hai/order/service/OrderServiceExt.java @@ -2,6 +2,7 @@ package com.hai.order.service; import com.hai.order.model.OrderCouponModel; +import com.hai.order.model.OrderIntegralRechargeModel; import java.util.List; import java.util.Map; @@ -29,4 +30,11 @@ public interface OrderServiceExt { */ List getOrderCouponList(Map param) throws Exception; + /** + * 查询积分充值订单 + * @param param + * @return + */ + List getOrderIntegralRechargeList(Map param) throws Exception; + } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceExtImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceExtImpl.java index 8f08ca01..c1df54e8 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceExtImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceExtImpl.java @@ -3,6 +3,7 @@ package com.hai.order.service.impl; import com.hai.common.utils.DateUtil; import com.hai.dao.order.OrderMapperExt; import com.hai.order.model.OrderCouponModel; +import com.hai.order.model.OrderIntegralRechargeModel; import com.hai.order.service.OrderServiceExt; import org.apache.commons.collections4.MapUtils; import org.springframework.stereotype.Service; @@ -54,7 +55,30 @@ public class OrderServiceExtImpl implements OrderServiceExt { if (MapUtils.getLong(param, "finishTimeE") != null) { param.put("finishTimeE", DateUtil.date2String(new Date(MapUtils.getLong(param, "finishTimeE")), DateUtil.Y_M_D_HMS)); } + return orderMapperExt.queryOrderCoupon(param); } + @Override + public List getOrderIntegralRechargeList(Map 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); + } + } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java index c7ec8a4f..046c66bf 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java @@ -159,9 +159,9 @@ public class OrderServiceImpl implements OrderService { childOrderList = couponOrderList; for (HighChildOrder childOrder : couponOrderList) { if (StringUtils.isBlank(order.getSearchTitle())) { - order.setSearchTitle(childOrder.getGoodsName()); + order.setTitle(childOrder.getGoodsName()); } else { - order.setSearchTitle("+"+childOrder.getGoodsName()); + order.setTitle("+"+childOrder.getGoodsName()); } } // 积分充值 @@ -170,7 +170,7 @@ public class OrderServiceImpl implements OrderService { // 创建积分充值订单业务 HighChildOrder oilOrder = orderCreateHandleService.integralRecharge(child); childOrderList.add(oilOrder); - order.setSearchTitle("积分充值"); + order.setTitle("积分充值"); // 加油订单 } 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); childOrderList.add(oilOrder); - order.setSearchTitle(oilOrder.getGoodsName()); + order.setTitle(oilOrder.getGoodsName()); // 肯德基 } else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE4.getNumber())) { @@ -339,6 +339,7 @@ public class OrderServiceImpl implements OrderService { order.setSurplusRefundPrice(new BigDecimal("0")); order.setSurplusRefundIntegral(0); + order.setSearchTitle(order.getOrderNo()); // 订单入库前处理 for (HighChildOrder childOrder : order.getHighChildOrderList()) { @@ -363,6 +364,7 @@ public class OrderServiceImpl implements OrderService { } order.setSurplusRefundPrice(order.getSurplusRefundPrice().add(childOrder.getSurplusRefundPrice())); 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")); } + if (StringUtils.isNotBlank(MapUtils.getString(param, "title"))) { + criteria.andTitleEqualTo("%" + MapUtils.getString(param, "title") + "%"); + } + 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"))) {