提交代码

dev-discount
胡锐 3 years ago
parent cf8dded993
commit 0ef6ba7957
  1. 25
      hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java
  2. 2
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  3. 11
      hai-service/src/main/java/com/hai/dao/HighOrderMapper.java
  4. 4
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java
  5. 28
      hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java
  6. 32
      hai-service/src/main/java/com/hai/entity/HighOrder.java
  7. 120
      hai-service/src/main/java/com/hai/entity/HighOrderExample.java
  8. 18
      hai-service/src/main/java/com/hai/model/GasOrderModel.java

@ -72,6 +72,31 @@ public class HighOrderController {
private HighTySalesmanService highTySalesmanService; private HighTySalesmanService highTySalesmanService;
@RequestMapping(value = "/print", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "打印")
public ResponseData print(@RequestParam(name = "orderId", required = true) Long orderId) {
try {
HighOrder order = highOrderService.getOrderById(orderId);
if (order == null) {
log.error("HighCouponController -> getCouponList() error!","权限不足");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, "");
}
order.setPrintStatus(true);
order.setPrintNum(order.getPrintNum() + 1);
highOrderService.updateOrderDetail(order);
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighOrderController --> print() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getOrderById", method = RequestMethod.GET) @RequestMapping(value = "/getOrderById", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "根据id查询订单详情") @ApiOperation(value = "根据id查询订单详情")

@ -431,6 +431,8 @@ public class HighOrderController {
highOrder.setMemPhone(userInfoModel.getHighUser().getPhone()); highOrder.setMemPhone(userInfoModel.getHighUser().getPhone());
highOrder.setCreateTime(new Date()); highOrder.setCreateTime(new Date());
highOrder.setOrderStatus(1); highOrder.setOrderStatus(1);
highOrder.setPrintStatus(false);
highOrder.setPrintNum(0);
highOrderService.insertOrder(highOrder); highOrderService.insertOrder(highOrder);

@ -55,6 +55,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"refund_content, refusal_refund_content, ", "refund_content, refusal_refund_content, ",
"Identification_code, profit_sharing_status, ", "Identification_code, profit_sharing_status, ",
"profit_sharing_ratio, account_merchant_num, ", "profit_sharing_ratio, account_merchant_num, ",
"print_status, print_num, ",
"ext_1, ext_2, ext_3)", "ext_1, ext_2, ext_3)",
"values (#{orderNo,jdbcType=VARCHAR}, #{memDiscountId,jdbcType=BIGINT}, ", "values (#{orderNo,jdbcType=VARCHAR}, #{memDiscountId,jdbcType=BIGINT}, ",
"#{memDiscountName,jdbcType=VARCHAR}, #{memId,jdbcType=BIGINT}, ", "#{memDiscountName,jdbcType=VARCHAR}, #{memId,jdbcType=BIGINT}, ",
@ -72,6 +73,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"#{refundContent,jdbcType=VARCHAR}, #{refusalRefundContent,jdbcType=VARCHAR}, ", "#{refundContent,jdbcType=VARCHAR}, #{refusalRefundContent,jdbcType=VARCHAR}, ",
"#{identificationCode,jdbcType=BIGINT}, #{profitSharingStatus,jdbcType=BIT}, ", "#{identificationCode,jdbcType=BIGINT}, #{profitSharingStatus,jdbcType=BIT}, ",
"#{profitSharingRatio,jdbcType=DECIMAL}, #{accountMerchantNum,jdbcType=VARCHAR}, ", "#{profitSharingRatio,jdbcType=DECIMAL}, #{accountMerchantNum,jdbcType=VARCHAR}, ",
"#{printStatus,jdbcType=BIT}, #{printNum,jdbcType=INTEGER}, ",
"#{ext1,jdbcType=VARCHAR}, #{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")
@ -116,6 +118,8 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT), @Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT),
@Result(column="profit_sharing_ratio", property="profitSharingRatio", jdbcType=JdbcType.DECIMAL), @Result(column="profit_sharing_ratio", property="profitSharingRatio", jdbcType=JdbcType.DECIMAL),
@Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR), @Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR),
@Result(column="print_status", property="printStatus", jdbcType=JdbcType.BIT),
@Result(column="print_num", property="printNum", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
@ -129,7 +133,8 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"pay_real_price, pay_serial_no, deduction_price, order_status, total_price, create_time, ", "pay_real_price, pay_serial_no, deduction_price, order_status, total_price, create_time, ",
"pay_time, cancel_time, cancel_remarks, finish_time, remarks, refund_time, refund_price, ", "pay_time, cancel_time, cancel_remarks, finish_time, remarks, refund_time, refund_price, ",
"refund_content, refusal_refund_content, Identification_code, profit_sharing_status, ", "refund_content, refusal_refund_content, Identification_code, profit_sharing_status, ",
"profit_sharing_ratio, account_merchant_num, ext_1, ext_2, ext_3", "profit_sharing_ratio, account_merchant_num, print_status, print_num, ext_1, ",
"ext_2, ext_3",
"from high_order", "from high_order",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -167,6 +172,8 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT), @Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT),
@Result(column="profit_sharing_ratio", property="profitSharingRatio", jdbcType=JdbcType.DECIMAL), @Result(column="profit_sharing_ratio", property="profitSharingRatio", jdbcType=JdbcType.DECIMAL),
@Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR), @Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR),
@Result(column="print_status", property="printStatus", jdbcType=JdbcType.BIT),
@Result(column="print_num", property="printNum", jdbcType=JdbcType.INTEGER),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
@ -216,6 +223,8 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"profit_sharing_status = #{profitSharingStatus,jdbcType=BIT},", "profit_sharing_status = #{profitSharingStatus,jdbcType=BIT},",
"profit_sharing_ratio = #{profitSharingRatio,jdbcType=DECIMAL},", "profit_sharing_ratio = #{profitSharingRatio,jdbcType=DECIMAL},",
"account_merchant_num = #{accountMerchantNum,jdbcType=VARCHAR},", "account_merchant_num = #{accountMerchantNum,jdbcType=VARCHAR},",
"print_status = #{printStatus,jdbcType=BIT},",
"print_num = #{printNum,jdbcType=INTEGER},",
"ext_1 = #{ext1,jdbcType=VARCHAR},", "ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},", "ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}", "ext_3 = #{ext3,jdbcType=VARCHAR}",

@ -1115,7 +1115,9 @@ public interface HighOrderMapperExt {
" b.pay_time payTime," + " b.pay_time payTime," +
" b.refund_time refundTime," + " b.refund_time refundTime," +
" b.refund_price refundPrice," + " b.refund_price refundPrice," +
" b.refund_content refundContent" + " b.refund_content refundContent," +
" b.print_status printStatus," +
" b.print_num printNum" +
" from high_child_order a,high_order b " + " from high_child_order a,high_order b " +
" where a.order_id = b.id " + " where a.order_id = b.id " +
" and goods_type = 3 " + " and goods_type = 3 " +

@ -156,6 +156,14 @@ public class HighOrderSqlProvider {
sql.VALUES("account_merchant_num", "#{accountMerchantNum,jdbcType=VARCHAR}"); sql.VALUES("account_merchant_num", "#{accountMerchantNum,jdbcType=VARCHAR}");
} }
if (record.getPrintStatus() != null) {
sql.VALUES("print_status", "#{printStatus,jdbcType=BIT}");
}
if (record.getPrintNum() != null) {
sql.VALUES("print_num", "#{printNum,jdbcType=INTEGER}");
}
if (record.getExt1() != null) { if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
} }
@ -210,6 +218,8 @@ public class HighOrderSqlProvider {
sql.SELECT("profit_sharing_status"); sql.SELECT("profit_sharing_status");
sql.SELECT("profit_sharing_ratio"); sql.SELECT("profit_sharing_ratio");
sql.SELECT("account_merchant_num"); sql.SELECT("account_merchant_num");
sql.SELECT("print_status");
sql.SELECT("print_num");
sql.SELECT("ext_1"); sql.SELECT("ext_1");
sql.SELECT("ext_2"); sql.SELECT("ext_2");
sql.SELECT("ext_3"); sql.SELECT("ext_3");
@ -362,6 +372,14 @@ public class HighOrderSqlProvider {
sql.SET("account_merchant_num = #{record.accountMerchantNum,jdbcType=VARCHAR}"); sql.SET("account_merchant_num = #{record.accountMerchantNum,jdbcType=VARCHAR}");
} }
if (record.getPrintStatus() != null) {
sql.SET("print_status = #{record.printStatus,jdbcType=BIT}");
}
if (record.getPrintNum() != null) {
sql.SET("print_num = #{record.printNum,jdbcType=INTEGER}");
}
if (record.getExt1() != null) { if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
} }
@ -415,6 +433,8 @@ public class HighOrderSqlProvider {
sql.SET("profit_sharing_status = #{record.profitSharingStatus,jdbcType=BIT}"); sql.SET("profit_sharing_status = #{record.profitSharingStatus,jdbcType=BIT}");
sql.SET("profit_sharing_ratio = #{record.profitSharingRatio,jdbcType=DECIMAL}"); sql.SET("profit_sharing_ratio = #{record.profitSharingRatio,jdbcType=DECIMAL}");
sql.SET("account_merchant_num = #{record.accountMerchantNum,jdbcType=VARCHAR}"); sql.SET("account_merchant_num = #{record.accountMerchantNum,jdbcType=VARCHAR}");
sql.SET("print_status = #{record.printStatus,jdbcType=BIT}");
sql.SET("print_num = #{record.printNum,jdbcType=INTEGER}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
@ -556,6 +576,14 @@ public class HighOrderSqlProvider {
sql.SET("account_merchant_num = #{accountMerchantNum,jdbcType=VARCHAR}"); sql.SET("account_merchant_num = #{accountMerchantNum,jdbcType=VARCHAR}");
} }
if (record.getPrintStatus() != null) {
sql.SET("print_status = #{printStatus,jdbcType=BIT}");
}
if (record.getPrintNum() != null) {
sql.SET("print_num = #{printNum,jdbcType=INTEGER}");
}
if (record.getExt1() != null) { if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
} }

@ -180,6 +180,16 @@ public class HighOrder implements Serializable {
*/ */
private String accountMerchantNum; private String accountMerchantNum;
/**
* 打印状态
*/
private Boolean printStatus;
/**
* 打印次数
*/
private Integer printNum;
private String ext1; private String ext1;
private String ext2; private String ext2;
@ -482,6 +492,22 @@ public class HighOrder implements Serializable {
this.accountMerchantNum = accountMerchantNum; this.accountMerchantNum = accountMerchantNum;
} }
public Boolean getPrintStatus() {
return printStatus;
}
public void setPrintStatus(Boolean printStatus) {
this.printStatus = printStatus;
}
public Integer getPrintNum() {
return printNum;
}
public void setPrintNum(Integer printNum) {
this.printNum = printNum;
}
public String getExt1() { public String getExt1() {
return ext1; return ext1;
} }
@ -551,6 +577,8 @@ public class HighOrder implements Serializable {
&& (this.getProfitSharingStatus() == null ? other.getProfitSharingStatus() == null : this.getProfitSharingStatus().equals(other.getProfitSharingStatus())) && (this.getProfitSharingStatus() == null ? other.getProfitSharingStatus() == null : this.getProfitSharingStatus().equals(other.getProfitSharingStatus()))
&& (this.getProfitSharingRatio() == null ? other.getProfitSharingRatio() == null : this.getProfitSharingRatio().equals(other.getProfitSharingRatio())) && (this.getProfitSharingRatio() == null ? other.getProfitSharingRatio() == null : this.getProfitSharingRatio().equals(other.getProfitSharingRatio()))
&& (this.getAccountMerchantNum() == null ? other.getAccountMerchantNum() == null : this.getAccountMerchantNum().equals(other.getAccountMerchantNum())) && (this.getAccountMerchantNum() == null ? other.getAccountMerchantNum() == null : this.getAccountMerchantNum().equals(other.getAccountMerchantNum()))
&& (this.getPrintStatus() == null ? other.getPrintStatus() == null : this.getPrintStatus().equals(other.getPrintStatus()))
&& (this.getPrintNum() == null ? other.getPrintNum() == null : this.getPrintNum().equals(other.getPrintNum()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
@ -593,6 +621,8 @@ public class HighOrder implements Serializable {
result = prime * result + ((getProfitSharingStatus() == null) ? 0 : getProfitSharingStatus().hashCode()); result = prime * result + ((getProfitSharingStatus() == null) ? 0 : getProfitSharingStatus().hashCode());
result = prime * result + ((getProfitSharingRatio() == null) ? 0 : getProfitSharingRatio().hashCode()); result = prime * result + ((getProfitSharingRatio() == null) ? 0 : getProfitSharingRatio().hashCode());
result = prime * result + ((getAccountMerchantNum() == null) ? 0 : getAccountMerchantNum().hashCode()); result = prime * result + ((getAccountMerchantNum() == null) ? 0 : getAccountMerchantNum().hashCode());
result = prime * result + ((getPrintStatus() == null) ? 0 : getPrintStatus().hashCode());
result = prime * result + ((getPrintNum() == null) ? 0 : getPrintNum().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
@ -638,6 +668,8 @@ public class HighOrder implements Serializable {
sb.append(", profitSharingStatus=").append(profitSharingStatus); sb.append(", profitSharingStatus=").append(profitSharingStatus);
sb.append(", profitSharingRatio=").append(profitSharingRatio); sb.append(", profitSharingRatio=").append(profitSharingRatio);
sb.append(", accountMerchantNum=").append(accountMerchantNum); sb.append(", accountMerchantNum=").append(accountMerchantNum);
sb.append(", printStatus=").append(printStatus);
sb.append(", printNum=").append(printNum);
sb.append(", ext1=").append(ext1); sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2); sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3); sb.append(", ext3=").append(ext3);

@ -2216,6 +2216,126 @@ public class HighOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrintStatusIsNull() {
addCriterion("print_status is null");
return (Criteria) this;
}
public Criteria andPrintStatusIsNotNull() {
addCriterion("print_status is not null");
return (Criteria) this;
}
public Criteria andPrintStatusEqualTo(Boolean value) {
addCriterion("print_status =", value, "printStatus");
return (Criteria) this;
}
public Criteria andPrintStatusNotEqualTo(Boolean value) {
addCriterion("print_status <>", value, "printStatus");
return (Criteria) this;
}
public Criteria andPrintStatusGreaterThan(Boolean value) {
addCriterion("print_status >", value, "printStatus");
return (Criteria) this;
}
public Criteria andPrintStatusGreaterThanOrEqualTo(Boolean value) {
addCriterion("print_status >=", value, "printStatus");
return (Criteria) this;
}
public Criteria andPrintStatusLessThan(Boolean value) {
addCriterion("print_status <", value, "printStatus");
return (Criteria) this;
}
public Criteria andPrintStatusLessThanOrEqualTo(Boolean value) {
addCriterion("print_status <=", value, "printStatus");
return (Criteria) this;
}
public Criteria andPrintStatusIn(List<Boolean> values) {
addCriterion("print_status in", values, "printStatus");
return (Criteria) this;
}
public Criteria andPrintStatusNotIn(List<Boolean> values) {
addCriterion("print_status not in", values, "printStatus");
return (Criteria) this;
}
public Criteria andPrintStatusBetween(Boolean value1, Boolean value2) {
addCriterion("print_status between", value1, value2, "printStatus");
return (Criteria) this;
}
public Criteria andPrintStatusNotBetween(Boolean value1, Boolean value2) {
addCriterion("print_status not between", value1, value2, "printStatus");
return (Criteria) this;
}
public Criteria andPrintNumIsNull() {
addCriterion("print_num is null");
return (Criteria) this;
}
public Criteria andPrintNumIsNotNull() {
addCriterion("print_num is not null");
return (Criteria) this;
}
public Criteria andPrintNumEqualTo(Integer value) {
addCriterion("print_num =", value, "printNum");
return (Criteria) this;
}
public Criteria andPrintNumNotEqualTo(Integer value) {
addCriterion("print_num <>", value, "printNum");
return (Criteria) this;
}
public Criteria andPrintNumGreaterThan(Integer value) {
addCriterion("print_num >", value, "printNum");
return (Criteria) this;
}
public Criteria andPrintNumGreaterThanOrEqualTo(Integer value) {
addCriterion("print_num >=", value, "printNum");
return (Criteria) this;
}
public Criteria andPrintNumLessThan(Integer value) {
addCriterion("print_num <", value, "printNum");
return (Criteria) this;
}
public Criteria andPrintNumLessThanOrEqualTo(Integer value) {
addCriterion("print_num <=", value, "printNum");
return (Criteria) this;
}
public Criteria andPrintNumIn(List<Integer> values) {
addCriterion("print_num in", values, "printNum");
return (Criteria) this;
}
public Criteria andPrintNumNotIn(List<Integer> values) {
addCriterion("print_num not in", values, "printNum");
return (Criteria) this;
}
public Criteria andPrintNumBetween(Integer value1, Integer value2) {
addCriterion("print_num between", value1, value2, "printNum");
return (Criteria) this;
}
public Criteria andPrintNumNotBetween(Integer value1, Integer value2) {
addCriterion("print_num not between", value1, value2, "printNum");
return (Criteria) this;
}
public Criteria andExt1IsNull() { public Criteria andExt1IsNull() {
addCriterion("ext_1 is null"); addCriterion("ext_1 is null");
return (Criteria) this; return (Criteria) this;

@ -34,6 +34,24 @@ public class GasOrderModel {
private Date refundTime; private Date refundTime;
private BigDecimal refundPrice; private BigDecimal refundPrice;
private String refundContent; private String refundContent;
private Boolean printStatus;
private Integer printNum;
public Boolean getPrintStatus() {
return printStatus;
}
public void setPrintStatus(Boolean printStatus) {
this.printStatus = printStatus;
}
public Integer getPrintNum() {
return printNum;
}
public void setPrintNum(Integer printNum) {
this.printNum = printNum;
}
public BigDecimal getRefundPrice() { public BigDecimal getRefundPrice() {
return refundPrice; return refundPrice;

Loading…
Cancel
Save