diff --git a/schedule/src/main/java/com/hfkj/schedule/TransferSchedule.java b/schedule/src/main/java/com/hfkj/schedule/TransferSchedule.java index 6bfbbeb..f8ecfbc 100644 --- a/schedule/src/main/java/com/hfkj/schedule/TransferSchedule.java +++ b/schedule/src/main/java/com/hfkj/schedule/TransferSchedule.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); } diff --git a/service/src/main/java/com/hfkj/dao/BsRebateTransferCycleMapper.java b/service/src/main/java/com/hfkj/dao/BsRebateTransferCycleMapper.java index f614d26..957cc25 100644 --- a/service/src/main/java/com/hfkj/dao/BsRebateTransferCycleMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsRebateTransferCycleMapper.java @@ -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},", diff --git a/service/src/main/java/com/hfkj/dao/BsRebateTransferCycleSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsRebateTransferCycleSqlProvider.java index 9875e9c..4848a5f 100644 --- a/service/src/main/java/com/hfkj/dao/BsRebateTransferCycleSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsRebateTransferCycleSqlProvider.java @@ -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) { diff --git a/service/src/main/java/com/hfkj/dao/BsTransferAccountsMapperExt.java b/service/src/main/java/com/hfkj/dao/BsTransferAccountsMapperExt.java index 5444e8d..d6bea47 100644 --- a/service/src/main/java/com/hfkj/dao/BsTransferAccountsMapperExt.java +++ b/service/src/main/java/com/hfkj/dao/BsTransferAccountsMapperExt.java @@ -11,13 +11,15 @@ import java.util.Map; */ public interface BsTransferAccountsMapperExt { - @Select(" SELECT mer_no merNo," + + @Select(" ") List> queryTradeRebate(@Param("startTime") String startTime, @Param("endTime") String endTime); } diff --git a/service/src/main/java/com/hfkj/entity/BsRebateTransferCycle.java b/service/src/main/java/com/hfkj/entity/BsRebateTransferCycle.java index 71fe102..f33cbef 100644 --- a/service/src/main/java/com/hfkj/entity/BsRebateTransferCycle.java +++ b/service/src/main/java/com/hfkj/entity/BsRebateTransferCycle.java @@ -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; } diff --git a/service/src/main/java/com/hfkj/entity/BsRebateTransferCycleExample.java b/service/src/main/java/com/hfkj/entity/BsRebateTransferCycleExample.java index e610794..dcfe518 100644 --- a/service/src/main/java/com/hfkj/entity/BsRebateTransferCycleExample.java +++ b/service/src/main/java/com/hfkj/entity/BsRebateTransferCycleExample.java @@ -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 values) { + public Criteria andBatchIdentifierIn(List values) { addCriterion("batch_identifier in", values, "batchIdentifier"); return (Criteria) this; } - public Criteria andBatchIdentifierNotIn(List values) { + public Criteria andBatchIdentifierNotIn(List 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; }