diff --git a/hai-bweb/src/main/resources/dev/application.yml b/hai-bweb/src/main/resources/dev/application.yml index f799126d..32384420 100644 --- a/hai-bweb/src/main/resources/dev/application.yml +++ b/hai-bweb/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://122.9.135.148:3306/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource diff --git a/hai-cweb/src/main/resources/dev/application.yml b/hai-cweb/src/main/resources/dev/application.yml index e2b5f630..2145d8a7 100644 --- a/hai-cweb/src/main/resources/dev/application.yml +++ b/hai-cweb/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://122.9.135.148:3306/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource 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 a771d138..3d0510c3 100644 --- a/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighOrderMapper.java @@ -7,7 +7,6 @@ import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.DeleteProvider; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.InsertProvider; -import org.apache.ibatis.annotations.Options; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; @@ -39,9 +38,9 @@ public interface HighOrderMapper extends HighOrderMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into high_order (order_no, mem_discount_id, ", - "mem_discount_name, mem_id, ", - "mem_name, mem_phone, ", + "insert into high_order (id, order_no, ", + "mem_discount_id, mem_discount_name, ", + "mem_id, mem_name, mem_phone, ", "mem_card_id, mem_card_type, ", "mem_card_no, pay_model, ", "pay_type, pay_gold, ", @@ -53,10 +52,11 @@ public interface HighOrderMapper extends HighOrderMapperExt { "finish_time, remarks, ", "refund_time, refund_price, ", "refund_content, refusal_refund_content, ", - "ext_1, ext_2, ext_3)", - "values (#{orderNo,jdbcType=VARCHAR}, #{memDiscountId,jdbcType=BIGINT}, ", - "#{memDiscountName,jdbcType=VARCHAR}, #{memId,jdbcType=BIGINT}, ", - "#{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ", + "Identification_code, ext_1, ", + "ext_2, ext_3)", + "values (#{id,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ", + "#{memDiscountId,jdbcType=BIGINT}, #{memDiscountName,jdbcType=VARCHAR}, ", + "#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ", "#{memCardId,jdbcType=BIGINT}, #{memCardType,jdbcType=INTEGER}, ", "#{memCardNo,jdbcType=VARCHAR}, #{payModel,jdbcType=INTEGER}, ", "#{payType,jdbcType=INTEGER}, #{payGold,jdbcType=INTEGER}, ", @@ -68,13 +68,12 @@ public interface HighOrderMapper extends HighOrderMapperExt { "#{finishTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, ", "#{refundTime,jdbcType=TIMESTAMP}, #{refundPrice,jdbcType=DECIMAL}, ", "#{refundContent,jdbcType=VARCHAR}, #{refusalRefundContent,jdbcType=VARCHAR}, ", - "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + "#{identificationCode,jdbcType=BIGINT}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) - @Options(useGeneratedKeys=true,keyProperty="id") int insert(HighOrder record); @InsertProvider(type=HighOrderSqlProvider.class, method="insertSelective") - @Options(useGeneratedKeys=true,keyProperty="id") int insertSelective(HighOrder record); @SelectProvider(type=HighOrderSqlProvider.class, method="selectByExample") @@ -108,6 +107,7 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="refund_content", property="refundContent", jdbcType=JdbcType.VARCHAR), @Result(column="refusal_refund_content", property="refusalRefundContent", jdbcType=JdbcType.VARCHAR), + @Result(column="Identification_code", property="identificationCode", jdbcType=JdbcType.BIGINT), @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) @@ -120,7 +120,7 @@ public interface HighOrderMapper extends HighOrderMapperExt { "mem_card_id, mem_card_type, mem_card_no, pay_model, pay_type, pay_gold, pay_price, ", "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, ext_1, ext_2, ext_3", + "refund_content, refusal_refund_content, Identification_code, ext_1, ext_2, ext_3", "from high_order", "where id = #{id,jdbcType=BIGINT}" }) @@ -154,6 +154,7 @@ public interface HighOrderMapper extends HighOrderMapperExt { @Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL), @Result(column="refund_content", property="refundContent", jdbcType=JdbcType.VARCHAR), @Result(column="refusal_refund_content", property="refusalRefundContent", jdbcType=JdbcType.VARCHAR), + @Result(column="Identification_code", property="identificationCode", jdbcType=JdbcType.BIGINT), @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) @@ -199,6 +200,7 @@ public interface HighOrderMapper extends HighOrderMapperExt { "refund_price = #{refundPrice,jdbcType=DECIMAL},", "refund_content = #{refundContent,jdbcType=VARCHAR},", "refusal_refund_content = #{refusalRefundContent,jdbcType=VARCHAR},", + "Identification_code = #{identificationCode,jdbcType=BIGINT},", "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/HighOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java index 8a9fd1a2..bcaa7021 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.getId() != null) { + sql.VALUES("id", "#{id,jdbcType=BIGINT}"); + } + if (record.getOrderNo() != null) { sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); } @@ -140,6 +144,10 @@ public class HighOrderSqlProvider { sql.VALUES("refusal_refund_content", "#{refusalRefundContent,jdbcType=VARCHAR}"); } + if (record.getIdentificationCode() != null) { + sql.VALUES("Identification_code", "#{identificationCode,jdbcType=BIGINT}"); + } + if (record.getExt1() != null) { sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); } @@ -190,6 +198,7 @@ public class HighOrderSqlProvider { sql.SELECT("refund_price"); sql.SELECT("refund_content"); sql.SELECT("refusal_refund_content"); + sql.SELECT("Identification_code"); sql.SELECT("ext_1"); sql.SELECT("ext_2"); sql.SELECT("ext_3"); @@ -326,6 +335,10 @@ public class HighOrderSqlProvider { sql.SET("refusal_refund_content = #{record.refusalRefundContent,jdbcType=VARCHAR}"); } + if (record.getIdentificationCode() != null) { + sql.SET("Identification_code = #{record.identificationCode,jdbcType=BIGINT}"); + } + if (record.getExt1() != null) { sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); } @@ -375,6 +388,7 @@ public class HighOrderSqlProvider { sql.SET("refund_price = #{record.refundPrice,jdbcType=DECIMAL}"); sql.SET("refund_content = #{record.refundContent,jdbcType=VARCHAR}"); sql.SET("refusal_refund_content = #{record.refusalRefundContent,jdbcType=VARCHAR}"); + sql.SET("Identification_code = #{record.identificationCode,jdbcType=BIGINT}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); @@ -500,6 +514,10 @@ public class HighOrderSqlProvider { sql.SET("refusal_refund_content = #{refusalRefundContent,jdbcType=VARCHAR}"); } + if (record.getIdentificationCode() != null) { + sql.SET("Identification_code = #{identificationCode,jdbcType=BIGINT}"); + } + 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 a1f33fba..e9a2c0bb 100644 --- a/hai-service/src/main/java/com/hai/entity/HighOrder.java +++ b/hai-service/src/main/java/com/hai/entity/HighOrder.java @@ -160,6 +160,11 @@ public class HighOrder implements Serializable { */ private String refusalRefundContent; + /** + * 渠道商标识码 + */ + private Long identificationCode; + private String ext1; private String ext2; @@ -424,6 +429,14 @@ public class HighOrder implements Serializable { this.refusalRefundContent = refusalRefundContent; } + public Long getIdentificationCode() { + return identificationCode; + } + + public void setIdentificationCode(Long identificationCode) { + this.identificationCode = identificationCode; + } + public String getExt1() { return ext1; } @@ -489,6 +502,7 @@ public class HighOrder implements Serializable { && (this.getRefundPrice() == null ? other.getRefundPrice() == null : this.getRefundPrice().equals(other.getRefundPrice())) && (this.getRefundContent() == null ? other.getRefundContent() == null : this.getRefundContent().equals(other.getRefundContent())) && (this.getRefusalRefundContent() == null ? other.getRefusalRefundContent() == null : this.getRefusalRefundContent().equals(other.getRefusalRefundContent())) + && (this.getIdentificationCode() == null ? other.getIdentificationCode() == null : this.getIdentificationCode().equals(other.getIdentificationCode())) && (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())); @@ -527,6 +541,7 @@ public class HighOrder implements Serializable { result = prime * result + ((getRefundPrice() == null) ? 0 : getRefundPrice().hashCode()); result = prime * result + ((getRefundContent() == null) ? 0 : getRefundContent().hashCode()); result = prime * result + ((getRefusalRefundContent() == null) ? 0 : getRefusalRefundContent().hashCode()); + result = prime * result + ((getIdentificationCode() == null) ? 0 : getIdentificationCode().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()); @@ -568,6 +583,7 @@ public class HighOrder implements Serializable { sb.append(", refundPrice=").append(refundPrice); sb.append(", refundContent=").append(refundContent); sb.append(", refusalRefundContent=").append(refusalRefundContent); + sb.append(", identificationCode=").append(identificationCode); 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 e62f805c..ffb207fb 100644 --- a/hai-service/src/main/java/com/hai/entity/HighOrderExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighOrderExample.java @@ -1966,6 +1966,66 @@ public class HighOrderExample { return (Criteria) this; } + public Criteria andIdentificationCodeIsNull() { + addCriterion("Identification_code is null"); + return (Criteria) this; + } + + public Criteria andIdentificationCodeIsNotNull() { + addCriterion("Identification_code is not null"); + return (Criteria) this; + } + + public Criteria andIdentificationCodeEqualTo(Long value) { + addCriterion("Identification_code =", value, "identificationCode"); + return (Criteria) this; + } + + public Criteria andIdentificationCodeNotEqualTo(Long value) { + addCriterion("Identification_code <>", value, "identificationCode"); + return (Criteria) this; + } + + public Criteria andIdentificationCodeGreaterThan(Long value) { + addCriterion("Identification_code >", value, "identificationCode"); + return (Criteria) this; + } + + public Criteria andIdentificationCodeGreaterThanOrEqualTo(Long value) { + addCriterion("Identification_code >=", value, "identificationCode"); + return (Criteria) this; + } + + public Criteria andIdentificationCodeLessThan(Long value) { + addCriterion("Identification_code <", value, "identificationCode"); + return (Criteria) this; + } + + public Criteria andIdentificationCodeLessThanOrEqualTo(Long value) { + addCriterion("Identification_code <=", value, "identificationCode"); + return (Criteria) this; + } + + public Criteria andIdentificationCodeIn(List values) { + addCriterion("Identification_code in", values, "identificationCode"); + return (Criteria) this; + } + + public Criteria andIdentificationCodeNotIn(List values) { + addCriterion("Identification_code not in", values, "identificationCode"); + return (Criteria) this; + } + + public Criteria andIdentificationCodeBetween(Long value1, Long value2) { + addCriterion("Identification_code between", value1, value2, "identificationCode"); + return (Criteria) this; + } + + public Criteria andIdentificationCodeNotBetween(Long value1, Long value2) { + addCriterion("Identification_code not between", value1, value2, "identificationCode"); + return (Criteria) this; + } + public Criteria andExt1IsNull() { addCriterion("ext_1 is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/service/impl/HighActivityAwardServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighActivityAwardServiceImpl.java index b8e56711..3d51f2fd 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighActivityAwardServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighActivityAwardServiceImpl.java @@ -53,7 +53,7 @@ public class HighActivityAwardServiceImpl implements HighActivityAwardService { } @Override - @Transactional(rollbackFor=Exception.class,propagation= Propagation.REQUIRES_NEW) + @Transactional(rollbackFor=Exception.class,propagation= Propagation.REQUIRES_NEW,timeout = 300) public void editHighActivateAward(HighActivityAward highActivityAward, List highActivityPrizes) throws Exception { // 增加奖励 @@ -111,7 +111,6 @@ public class HighActivityAwardServiceImpl implements HighActivityAwardService { for (HighDiscountAgentCode agentCode: codeList.subList(startNum, endNum)) { agentCode.setStatus(5); - actualPrize = new HighActivityAwardActualPrize(); actualPrize.setActivityAwardPrizeId(list.getId()); actualPrize.setActivityAwardSerialNumId(serialNum.getId()); @@ -150,8 +149,14 @@ public class HighActivityAwardServiceImpl implements HighActivityAwardService { prizeExample.createCriteria().andActivityAwardPrizeIdEqualTo(p.getId()); List actualPrizeList = highActivityAwardActualPrizeM.selectByExample(prizeExample); - + HighDiscountAgentCode code; for (HighActivityAwardActualPrize actualPrize: actualPrizeList ) { + code = highDiscountAgentCodeService.getCodeById(actualPrize.getActualPrizeId()); + + code.setStatus(1); + + highDiscountAgentCodeService.updateCode(code); + highActivityAwardActualPrizeM.deleteByPrimaryKey(actualPrize.getId()); }