提交代码

master
胡锐 1 year ago
parent a0cb3368e2
commit 16b6a8fb5f
  1. 4
      schedule/src/main/java/com/hfkj/schedule/TransferSchedule.java
  2. 8
      service/src/main/java/com/hfkj/dao/BsRebateTransferCycleMapper.java
  3. 8
      service/src/main/java/com/hfkj/dao/BsRebateTransferCycleSqlProvider.java
  4. 6
      service/src/main/java/com/hfkj/dao/BsTransferAccountsMapperExt.java
  5. 6
      service/src/main/java/com/hfkj/entity/BsRebateTransferCycle.java
  6. 30
      service/src/main/java/com/hfkj/entity/BsRebateTransferCycleExample.java

@ -95,7 +95,7 @@ public class TransferSchedule {
endTime.set(Calendar.SECOND, 00);
BsRebateTransferCycle transferCycle = new BsRebateTransferCycle();
transferCycle.setBatchIdentifier(DateUtil.date2String(startTime.getTime(),"yyyyMMdd") + (new Random().nextInt(8999) + 1000));
transferCycle.setBatchIdentifier(Long.parseLong(DateUtil.date2String(startTime.getTime(),"yyyyMMdd") + (new Random().nextInt(8999) + 1000)));
transferCycle.setStartTime(startTime.getTime());
transferCycle.setEndTime(endTime.getTime());
rebateTransferCycleService.editData(transferCycle);
@ -112,7 +112,7 @@ public class TransferSchedule {
transferAccounts.setMerAbbreviate(mer.getMerAbbreviate());
transferAccounts.setOrderNo("1000"+System.currentTimeMillis()+"");
transferAccounts.setAmount(new BigDecimal(MapUtils.getString(param, "totalPrice")));
transferAccounts.setRebateTransferCycleIdentifier(transferCycle.getId());
transferAccounts.setRebateTransferCycleIdentifier(transferCycle.getBatchIdentifier());
transferAccounts.setContent(DateUtil.date2String(startTime.getTime(),"yyyy-MM-dd") + "活动结算");
transferAccountsService.transfer(transferAccounts);
}

@ -43,7 +43,7 @@ public interface BsRebateTransferCycleMapper extends BsRebateTransferCycleMapper
"end_time, `status`, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values (#{batchIdentifier,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, ",
"values (#{batchIdentifier,jdbcType=BIGINT}, #{startTime,jdbcType=TIMESTAMP}, ",
"#{endTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
@ -58,7 +58,7 @@ public interface BsRebateTransferCycleMapper extends BsRebateTransferCycleMapper
@SelectProvider(type=BsRebateTransferCycleSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="batch_identifier", property="batchIdentifier", jdbcType=JdbcType.VARCHAR),
@Result(column="batch_identifier", property="batchIdentifier", jdbcType=JdbcType.BIGINT),
@Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@ -79,7 +79,7 @@ public interface BsRebateTransferCycleMapper extends BsRebateTransferCycleMapper
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="batch_identifier", property="batchIdentifier", jdbcType=JdbcType.VARCHAR),
@Result(column="batch_identifier", property="batchIdentifier", jdbcType=JdbcType.BIGINT),
@Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@ -102,7 +102,7 @@ public interface BsRebateTransferCycleMapper extends BsRebateTransferCycleMapper
@Update({
"update bs_rebate_transfer_cycle",
"set batch_identifier = #{batchIdentifier,jdbcType=VARCHAR},",
"set batch_identifier = #{batchIdentifier,jdbcType=BIGINT},",
"start_time = #{startTime,jdbcType=TIMESTAMP},",
"end_time = #{endTime,jdbcType=TIMESTAMP},",
"`status` = #{status,jdbcType=INTEGER},",

@ -29,7 +29,7 @@ public class BsRebateTransferCycleSqlProvider {
sql.INSERT_INTO("bs_rebate_transfer_cycle");
if (record.getBatchIdentifier() != null) {
sql.VALUES("batch_identifier", "#{batchIdentifier,jdbcType=VARCHAR}");
sql.VALUES("batch_identifier", "#{batchIdentifier,jdbcType=BIGINT}");
}
if (record.getStartTime() != null) {
@ -105,7 +105,7 @@ public class BsRebateTransferCycleSqlProvider {
}
if (record.getBatchIdentifier() != null) {
sql.SET("batch_identifier = #{record.batchIdentifier,jdbcType=VARCHAR}");
sql.SET("batch_identifier = #{record.batchIdentifier,jdbcType=BIGINT}");
}
if (record.getStartTime() != null) {
@ -149,7 +149,7 @@ public class BsRebateTransferCycleSqlProvider {
sql.UPDATE("bs_rebate_transfer_cycle");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("batch_identifier = #{record.batchIdentifier,jdbcType=VARCHAR}");
sql.SET("batch_identifier = #{record.batchIdentifier,jdbcType=BIGINT}");
sql.SET("start_time = #{record.startTime,jdbcType=TIMESTAMP}");
sql.SET("end_time = #{record.endTime,jdbcType=TIMESTAMP}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
@ -169,7 +169,7 @@ public class BsRebateTransferCycleSqlProvider {
sql.UPDATE("bs_rebate_transfer_cycle");
if (record.getBatchIdentifier() != null) {
sql.SET("batch_identifier = #{batchIdentifier,jdbcType=VARCHAR}");
sql.SET("batch_identifier = #{batchIdentifier,jdbcType=BIGINT}");
}
if (record.getStartTime() != null) {

@ -11,13 +11,15 @@ import java.util.Map;
*/
public interface BsTransferAccountsMapperExt {
@Select(" SELECT mer_no merNo," +
@Select(" <script>" +
" SELECT mer_no merNo," +
" sum(rebate_activity_actual_price) totalPrice " +
" FROM bs_trade_order where rebate_activity_part = 1 " +
" <![CDATA[ and pay_time >= #{startTime} ]]>" +
" <![CDATA[ and pay_time <= #{endTime} ]]>" +
" and `status` = 3" +
" GROUP BY mer_no")
" GROUP BY mer_no" +
" </script>")
List<Map<String,Object>> queryTradeRebate(@Param("startTime") String startTime, @Param("endTime") String endTime);
}

@ -21,7 +21,7 @@ public class BsRebateTransferCycle implements Serializable {
/**
* 周期编号
*/
private String batchIdentifier;
private Long batchIdentifier;
/**
* 活动开始时间
@ -64,11 +64,11 @@ public class BsRebateTransferCycle implements Serializable {
this.id = id;
}
public String getBatchIdentifier() {
public Long getBatchIdentifier() {
return batchIdentifier;
}
public void setBatchIdentifier(String batchIdentifier) {
public void setBatchIdentifier(Long batchIdentifier) {
this.batchIdentifier = batchIdentifier;
}

@ -195,62 +195,52 @@ public class BsRebateTransferCycleExample {
return (Criteria) this;
}
public Criteria andBatchIdentifierEqualTo(String value) {
public Criteria andBatchIdentifierEqualTo(Long value) {
addCriterion("batch_identifier =", value, "batchIdentifier");
return (Criteria) this;
}
public Criteria andBatchIdentifierNotEqualTo(String value) {
public Criteria andBatchIdentifierNotEqualTo(Long value) {
addCriterion("batch_identifier <>", value, "batchIdentifier");
return (Criteria) this;
}
public Criteria andBatchIdentifierGreaterThan(String value) {
public Criteria andBatchIdentifierGreaterThan(Long value) {
addCriterion("batch_identifier >", value, "batchIdentifier");
return (Criteria) this;
}
public Criteria andBatchIdentifierGreaterThanOrEqualTo(String value) {
public Criteria andBatchIdentifierGreaterThanOrEqualTo(Long value) {
addCriterion("batch_identifier >=", value, "batchIdentifier");
return (Criteria) this;
}
public Criteria andBatchIdentifierLessThan(String value) {
public Criteria andBatchIdentifierLessThan(Long value) {
addCriterion("batch_identifier <", value, "batchIdentifier");
return (Criteria) this;
}
public Criteria andBatchIdentifierLessThanOrEqualTo(String value) {
public Criteria andBatchIdentifierLessThanOrEqualTo(Long value) {
addCriterion("batch_identifier <=", value, "batchIdentifier");
return (Criteria) this;
}
public Criteria andBatchIdentifierLike(String value) {
addCriterion("batch_identifier like", value, "batchIdentifier");
return (Criteria) this;
}
public Criteria andBatchIdentifierNotLike(String value) {
addCriterion("batch_identifier not like", value, "batchIdentifier");
return (Criteria) this;
}
public Criteria andBatchIdentifierIn(List<String> values) {
public Criteria andBatchIdentifierIn(List<Long> values) {
addCriterion("batch_identifier in", values, "batchIdentifier");
return (Criteria) this;
}
public Criteria andBatchIdentifierNotIn(List<String> values) {
public Criteria andBatchIdentifierNotIn(List<Long> values) {
addCriterion("batch_identifier not in", values, "batchIdentifier");
return (Criteria) this;
}
public Criteria andBatchIdentifierBetween(String value1, String value2) {
public Criteria andBatchIdentifierBetween(Long value1, Long value2) {
addCriterion("batch_identifier between", value1, value2, "batchIdentifier");
return (Criteria) this;
}
public Criteria andBatchIdentifierNotBetween(String value1, String value2) {
public Criteria andBatchIdentifierNotBetween(Long value1, Long value2) {
addCriterion("batch_identifier not between", value1, value2, "batchIdentifier");
return (Criteria) this;
}

Loading…
Cancel
Save