dev-discount
袁野 3 years ago
parent f3df6bf81b
commit b6135a0a01
  1. 2
      hai-bweb/src/main/resources/dev/application.yml
  2. 2
      hai-cweb/src/main/resources/dev/application.yml
  3. 26
      hai-service/src/main/java/com/hai/dao/HighOrderMapper.java
  4. 18
      hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java
  5. 16
      hai-service/src/main/java/com/hai/entity/HighOrder.java
  6. 60
      hai-service/src/main/java/com/hai/entity/HighOrderExample.java
  7. 11
      hai-service/src/main/java/com/hai/service/impl/HighActivityAwardServiceImpl.java

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置 #datasource数据源设置
spring: spring:
datasource: 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 username: root
password: HF123456. password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置 #datasource数据源设置
spring: spring:
datasource: 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 username: root
password: HF123456. password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource

@ -7,7 +7,6 @@ import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider; import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider; import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results; import org.apache.ibatis.annotations.Results;
@ -39,9 +38,9 @@ public interface HighOrderMapper extends HighOrderMapperExt {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
@Insert({ @Insert({
"insert into high_order (order_no, mem_discount_id, ", "insert into high_order (id, order_no, ",
"mem_discount_name, mem_id, ", "mem_discount_id, mem_discount_name, ",
"mem_name, mem_phone, ", "mem_id, mem_name, mem_phone, ",
"mem_card_id, mem_card_type, ", "mem_card_id, mem_card_type, ",
"mem_card_no, pay_model, ", "mem_card_no, pay_model, ",
"pay_type, pay_gold, ", "pay_type, pay_gold, ",
@ -53,10 +52,11 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"finish_time, remarks, ", "finish_time, remarks, ",
"refund_time, refund_price, ", "refund_time, refund_price, ",
"refund_content, refusal_refund_content, ", "refund_content, refusal_refund_content, ",
"ext_1, ext_2, ext_3)", "Identification_code, ext_1, ",
"values (#{orderNo,jdbcType=VARCHAR}, #{memDiscountId,jdbcType=BIGINT}, ", "ext_2, ext_3)",
"#{memDiscountName,jdbcType=VARCHAR}, #{memId,jdbcType=BIGINT}, ", "values (#{id,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
"#{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ", "#{memDiscountId,jdbcType=BIGINT}, #{memDiscountName,jdbcType=VARCHAR}, ",
"#{memId,jdbcType=BIGINT}, #{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ",
"#{memCardId,jdbcType=BIGINT}, #{memCardType,jdbcType=INTEGER}, ", "#{memCardId,jdbcType=BIGINT}, #{memCardType,jdbcType=INTEGER}, ",
"#{memCardNo,jdbcType=VARCHAR}, #{payModel,jdbcType=INTEGER}, ", "#{memCardNo,jdbcType=VARCHAR}, #{payModel,jdbcType=INTEGER}, ",
"#{payType,jdbcType=INTEGER}, #{payGold,jdbcType=INTEGER}, ", "#{payType,jdbcType=INTEGER}, #{payGold,jdbcType=INTEGER}, ",
@ -68,13 +68,12 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"#{finishTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, ", "#{finishTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, ",
"#{refundTime,jdbcType=TIMESTAMP}, #{refundPrice,jdbcType=DECIMAL}, ", "#{refundTime,jdbcType=TIMESTAMP}, #{refundPrice,jdbcType=DECIMAL}, ",
"#{refundContent,jdbcType=VARCHAR}, #{refusalRefundContent,jdbcType=VARCHAR}, ", "#{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); int insert(HighOrder record);
@InsertProvider(type=HighOrderSqlProvider.class, method="insertSelective") @InsertProvider(type=HighOrderSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighOrder record); int insertSelective(HighOrder record);
@SelectProvider(type=HighOrderSqlProvider.class, method="selectByExample") @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_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_content", property="refundContent", jdbcType=JdbcType.VARCHAR), @Result(column="refund_content", property="refundContent", jdbcType=JdbcType.VARCHAR),
@Result(column="refusal_refund_content", property="refusalRefundContent", 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_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)
@ -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, ", "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_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, ext_1, ext_2, ext_3", "refund_content, refusal_refund_content, Identification_code, ext_1, ext_2, ext_3",
"from high_order", "from high_order",
"where id = #{id,jdbcType=BIGINT}" "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_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_content", property="refundContent", jdbcType=JdbcType.VARCHAR), @Result(column="refund_content", property="refundContent", jdbcType=JdbcType.VARCHAR),
@Result(column="refusal_refund_content", property="refusalRefundContent", 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_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)
@ -199,6 +200,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"refund_price = #{refundPrice,jdbcType=DECIMAL},", "refund_price = #{refundPrice,jdbcType=DECIMAL},",
"refund_content = #{refundContent,jdbcType=VARCHAR},", "refund_content = #{refundContent,jdbcType=VARCHAR},",
"refusal_refund_content = #{refusalRefundContent,jdbcType=VARCHAR},", "refusal_refund_content = #{refusalRefundContent,jdbcType=VARCHAR},",
"Identification_code = #{identificationCode,jdbcType=BIGINT},",
"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}",

@ -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.getId() != null) {
sql.VALUES("id", "#{id,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) { if (record.getOrderNo() != null) {
sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}");
} }
@ -140,6 +144,10 @@ public class HighOrderSqlProvider {
sql.VALUES("refusal_refund_content", "#{refusalRefundContent,jdbcType=VARCHAR}"); sql.VALUES("refusal_refund_content", "#{refusalRefundContent,jdbcType=VARCHAR}");
} }
if (record.getIdentificationCode() != null) {
sql.VALUES("Identification_code", "#{identificationCode,jdbcType=BIGINT}");
}
if (record.getExt1() != null) { if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
} }
@ -190,6 +198,7 @@ public class HighOrderSqlProvider {
sql.SELECT("refund_price"); sql.SELECT("refund_price");
sql.SELECT("refund_content"); sql.SELECT("refund_content");
sql.SELECT("refusal_refund_content"); sql.SELECT("refusal_refund_content");
sql.SELECT("Identification_code");
sql.SELECT("ext_1"); sql.SELECT("ext_1");
sql.SELECT("ext_2"); sql.SELECT("ext_2");
sql.SELECT("ext_3"); sql.SELECT("ext_3");
@ -326,6 +335,10 @@ public class HighOrderSqlProvider {
sql.SET("refusal_refund_content = #{record.refusalRefundContent,jdbcType=VARCHAR}"); 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) { if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); 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_price = #{record.refundPrice,jdbcType=DECIMAL}");
sql.SET("refund_content = #{record.refundContent,jdbcType=VARCHAR}"); sql.SET("refund_content = #{record.refundContent,jdbcType=VARCHAR}");
sql.SET("refusal_refund_content = #{record.refusalRefundContent,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_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}");
@ -500,6 +514,10 @@ public class HighOrderSqlProvider {
sql.SET("refusal_refund_content = #{refusalRefundContent,jdbcType=VARCHAR}"); sql.SET("refusal_refund_content = #{refusalRefundContent,jdbcType=VARCHAR}");
} }
if (record.getIdentificationCode() != null) {
sql.SET("Identification_code = #{identificationCode,jdbcType=BIGINT}");
}
if (record.getExt1() != null) { if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
} }

@ -160,6 +160,11 @@ public class HighOrder implements Serializable {
*/ */
private String refusalRefundContent; private String refusalRefundContent;
/**
* 渠道商标识码
*/
private Long identificationCode;
private String ext1; private String ext1;
private String ext2; private String ext2;
@ -424,6 +429,14 @@ public class HighOrder implements Serializable {
this.refusalRefundContent = refusalRefundContent; this.refusalRefundContent = refusalRefundContent;
} }
public Long getIdentificationCode() {
return identificationCode;
}
public void setIdentificationCode(Long identificationCode) {
this.identificationCode = identificationCode;
}
public String getExt1() { public String getExt1() {
return ext1; return ext1;
} }
@ -489,6 +502,7 @@ public class HighOrder implements Serializable {
&& (this.getRefundPrice() == null ? other.getRefundPrice() == null : this.getRefundPrice().equals(other.getRefundPrice())) && (this.getRefundPrice() == null ? other.getRefundPrice() == null : this.getRefundPrice().equals(other.getRefundPrice()))
&& (this.getRefundContent() == null ? other.getRefundContent() == null : this.getRefundContent().equals(other.getRefundContent())) && (this.getRefundContent() == null ? other.getRefundContent() == null : this.getRefundContent().equals(other.getRefundContent()))
&& (this.getRefusalRefundContent() == null ? other.getRefusalRefundContent() == null : this.getRefusalRefundContent().equals(other.getRefusalRefundContent())) && (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.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()));
@ -527,6 +541,7 @@ public class HighOrder implements Serializable {
result = prime * result + ((getRefundPrice() == null) ? 0 : getRefundPrice().hashCode()); result = prime * result + ((getRefundPrice() == null) ? 0 : getRefundPrice().hashCode());
result = prime * result + ((getRefundContent() == null) ? 0 : getRefundContent().hashCode()); result = prime * result + ((getRefundContent() == null) ? 0 : getRefundContent().hashCode());
result = prime * result + ((getRefusalRefundContent() == null) ? 0 : getRefusalRefundContent().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 + ((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());
@ -568,6 +583,7 @@ public class HighOrder implements Serializable {
sb.append(", refundPrice=").append(refundPrice); sb.append(", refundPrice=").append(refundPrice);
sb.append(", refundContent=").append(refundContent); sb.append(", refundContent=").append(refundContent);
sb.append(", refusalRefundContent=").append(refusalRefundContent); sb.append(", refusalRefundContent=").append(refusalRefundContent);
sb.append(", identificationCode=").append(identificationCode);
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);

@ -1966,6 +1966,66 @@ public class HighOrderExample {
return (Criteria) this; 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<Long> values) {
addCriterion("Identification_code in", values, "identificationCode");
return (Criteria) this;
}
public Criteria andIdentificationCodeNotIn(List<Long> 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() { public Criteria andExt1IsNull() {
addCriterion("ext_1 is null"); addCriterion("ext_1 is null");
return (Criteria) this; return (Criteria) this;

@ -53,7 +53,7 @@ public class HighActivityAwardServiceImpl implements HighActivityAwardService {
} }
@Override @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<HighActivityPrize> highActivityPrizes) throws Exception { public void editHighActivateAward(HighActivityAward highActivityAward, List<HighActivityPrize> highActivityPrizes) throws Exception {
// 增加奖励 // 增加奖励
@ -111,7 +111,6 @@ public class HighActivityAwardServiceImpl implements HighActivityAwardService {
for (HighDiscountAgentCode agentCode: codeList.subList(startNum, endNum)) { for (HighDiscountAgentCode agentCode: codeList.subList(startNum, endNum)) {
agentCode.setStatus(5); agentCode.setStatus(5);
actualPrize = new HighActivityAwardActualPrize(); actualPrize = new HighActivityAwardActualPrize();
actualPrize.setActivityAwardPrizeId(list.getId()); actualPrize.setActivityAwardPrizeId(list.getId());
actualPrize.setActivityAwardSerialNumId(serialNum.getId()); actualPrize.setActivityAwardSerialNumId(serialNum.getId());
@ -150,8 +149,14 @@ public class HighActivityAwardServiceImpl implements HighActivityAwardService {
prizeExample.createCriteria().andActivityAwardPrizeIdEqualTo(p.getId()); prizeExample.createCriteria().andActivityAwardPrizeIdEqualTo(p.getId());
List<HighActivityAwardActualPrize> actualPrizeList = highActivityAwardActualPrizeM.selectByExample(prizeExample); List<HighActivityAwardActualPrize> actualPrizeList = highActivityAwardActualPrizeM.selectByExample(prizeExample);
HighDiscountAgentCode code;
for (HighActivityAwardActualPrize actualPrize: actualPrizeList ) { for (HighActivityAwardActualPrize actualPrize: actualPrizeList ) {
code = highDiscountAgentCodeService.getCodeById(actualPrize.getActualPrizeId());
code.setStatus(1);
highDiscountAgentCodeService.updateCode(code);
highActivityAwardActualPrizeM.deleteByPrimaryKey(actualPrize.getId()); highActivityAwardActualPrizeM.deleteByPrimaryKey(actualPrize.getId());
} }

Loading…
Cancel
Save