diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java b/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java index d0f92c61..61dfd7b7 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java @@ -72,6 +72,31 @@ public class HighOrderController { 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) @ResponseBody @ApiOperation(value = "根据id查询订单详情") diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java index 2210cdb1..6809c109 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -431,6 +431,8 @@ public class HighOrderController { highOrder.setMemPhone(userInfoModel.getHighUser().getPhone()); highOrder.setCreateTime(new Date()); highOrder.setOrderStatus(1); + highOrder.setPrintStatus(false); + highOrder.setPrintNum(0); highOrderService.insertOrder(highOrder); 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 3cdc4d3e..4632e811 100644 --- a/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java @@ -55,6 +55,7 @@ public interface HighOrderMapper extends HighOrderMapperExt { "refund_content, refusal_refund_content, ", "Identification_code, profit_sharing_status, ", "profit_sharing_ratio, account_merchant_num, ", + "print_status, print_num, ", "ext_1, ext_2, ext_3)", "values (#{orderNo,jdbcType=VARCHAR}, #{memDiscountId,jdbcType=BIGINT}, ", "#{memDiscountName,jdbcType=VARCHAR}, #{memId,jdbcType=BIGINT}, ", @@ -72,6 +73,7 @@ public interface HighOrderMapper extends HighOrderMapperExt { "#{refundContent,jdbcType=VARCHAR}, #{refusalRefundContent,jdbcType=VARCHAR}, ", "#{identificationCode,jdbcType=BIGINT}, #{profitSharingStatus,jdbcType=BIT}, ", "#{profitSharingRatio,jdbcType=DECIMAL}, #{accountMerchantNum,jdbcType=VARCHAR}, ", + "#{printStatus,jdbcType=BIT}, #{printNum,jdbcType=INTEGER}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @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_ratio", property="profitSharingRatio", jdbcType=JdbcType.DECIMAL), @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_2", property="ext2", 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_time, cancel_time, cancel_remarks, finish_time, remarks, refund_time, refund_price, ", "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", "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_ratio", property="profitSharingRatio", jdbcType=JdbcType.DECIMAL), @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_2", property="ext2", 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_ratio = #{profitSharingRatio,jdbcType=DECIMAL},", "account_merchant_num = #{accountMerchantNum,jdbcType=VARCHAR},", + "print_status = #{printStatus,jdbcType=BIT},", + "print_num = #{printNum,jdbcType=INTEGER},", "ext_1 = #{ext1,jdbcType=VARCHAR},", "ext_2 = #{ext2,jdbcType=VARCHAR},", "ext_3 = #{ext3,jdbcType=VARCHAR}", diff --git a/hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java index c1c1c31b..a86c1a62 100644 --- a/hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java @@ -1115,7 +1115,9 @@ public interface HighOrderMapperExt { " b.pay_time payTime," + " b.refund_time refundTime," + " 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 " + " where a.order_id = b.id " + " and goods_type = 3 " + 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 9e5a74ab..55ed3ed1 100644 --- a/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java @@ -156,6 +156,14 @@ public class HighOrderSqlProvider { 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) { sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); } @@ -210,6 +218,8 @@ public class HighOrderSqlProvider { sql.SELECT("profit_sharing_status"); sql.SELECT("profit_sharing_ratio"); sql.SELECT("account_merchant_num"); + sql.SELECT("print_status"); + sql.SELECT("print_num"); sql.SELECT("ext_1"); sql.SELECT("ext_2"); sql.SELECT("ext_3"); @@ -362,6 +372,14 @@ public class HighOrderSqlProvider { 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) { 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_ratio = #{record.profitSharingRatio,jdbcType=DECIMAL}"); 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_2 = #{record.ext2,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}"); } + 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) { sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); } 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 3dd4b8d0..736a7b4f 100644 --- a/hai-service/src/main/java/com/hai/entity/HighOrder.java +++ b/hai-service/src/main/java/com/hai/entity/HighOrder.java @@ -180,6 +180,16 @@ public class HighOrder implements Serializable { */ private String accountMerchantNum; + /** + * 打印状态 + */ + private Boolean printStatus; + + /** + * 打印次数 + */ + private Integer printNum; + private String ext1; private String ext2; @@ -482,6 +492,22 @@ public class HighOrder implements Serializable { 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() { return ext1; } @@ -551,6 +577,8 @@ public class HighOrder implements Serializable { && (this.getProfitSharingStatus() == null ? other.getProfitSharingStatus() == null : this.getProfitSharingStatus().equals(other.getProfitSharingStatus())) && (this.getProfitSharingRatio() == null ? other.getProfitSharingRatio() == null : this.getProfitSharingRatio().equals(other.getProfitSharingRatio())) && (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.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) && (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 + ((getProfitSharingRatio() == null) ? 0 : getProfitSharingRatio().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 + ((getExt2() == null) ? 0 : getExt2().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(", profitSharingRatio=").append(profitSharingRatio); sb.append(", accountMerchantNum=").append(accountMerchantNum); + sb.append(", printStatus=").append(printStatus); + sb.append(", printNum=").append(printNum); sb.append(", ext1=").append(ext1); sb.append(", ext2=").append(ext2); sb.append(", ext3=").append(ext3); 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 a7de7e76..57377ec1 100644 --- a/hai-service/src/main/java/com/hai/entity/HighOrderExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighOrderExample.java @@ -2216,6 +2216,126 @@ public class HighOrderExample { 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 values) { + addCriterion("print_status in", values, "printStatus"); + return (Criteria) this; + } + + public Criteria andPrintStatusNotIn(List 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 values) { + addCriterion("print_num in", values, "printNum"); + return (Criteria) this; + } + + public Criteria andPrintNumNotIn(List 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() { addCriterion("ext_1 is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/model/GasOrderModel.java b/hai-service/src/main/java/com/hai/model/GasOrderModel.java index 7f6a5247..eff9bc3d 100644 --- a/hai-service/src/main/java/com/hai/model/GasOrderModel.java +++ b/hai-service/src/main/java/com/hai/model/GasOrderModel.java @@ -34,6 +34,24 @@ public class GasOrderModel { private Date refundTime; private BigDecimal refundPrice; 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() { return refundPrice;