可以插入了, 但是自动派单bug, 只能派一个人

pull/5/head
infin_caishuxiao 8 years ago
parent a658b298e3
commit 65c7a3a3b1

@ -60,20 +60,23 @@ public class CronCollectionServiceImpl implements CronCollectionService
Map<String, Object> tmpMap = userList.get(a%cycle); Map<String, Object> tmpMap = userList.get(a%cycle);
String userId = (String) tmpMap.get("user_id"); String userId = (String) tmpMap.get("user_id");
String userRealName = (String) tmpMap.get("real_name"); String userRealName = (String) tmpMap.get("real_name");
s.setState(1);
s.setFkSystemUser(userId); s.setFkSystemUser(userId);
s.setCollectorLoginName(userRealName); s.setCollectorLoginName(userRealName);
long ll = dateSubstract(new Date(), s.getRepaymentDate()); long ll = dateSubstract(new Date(), s.getRepaymentDate());
s.setOverdueDayCount(Short.valueOf("" + ll)); s.setOverdueDayCount(Short.valueOf("" + ll));
String tmp = ""; String tmp = "";
tmp += s.getDeadline(); tmp += s.getDeadline();
if("0".equals(s.getUnit().trim())) { if ("0".equals(s.getUnit().trim()))
//天 {
// 天
tmp += " Day"; tmp += " Day";
} else if ("1".equals(s.getUnit().trim()))
} else if ("1".equals(s.getUnit().trim())) { {
// //
tmp += " Month"; tmp += " Month";
} else { } else
{
throw new InfintechException("getUnit error! unit:" + s.getUnit()); throw new InfintechException("getUnit error! unit:" + s.getUnit());
} }
s.setProjectPeriod(tmp); s.setProjectPeriod(tmp);

@ -44,7 +44,7 @@ public class TBizCollection {
private String updateBy; private String updateBy;
private Byte state; private int state;
private Date fullRepayDate; private Date fullRepayDate;
@ -182,11 +182,11 @@ public class TBizCollection {
this.updateBy = updateBy == null ? null : updateBy.trim(); this.updateBy = updateBy == null ? null : updateBy.trim();
} }
public Byte getState() { public int getState() {
return state; return state;
} }
public void setState(Byte state) { public void setState(int state) {
this.state = state; this.state = state;
} }

@ -21,7 +21,7 @@
<result column="collector_login_name" jdbcType="VARCHAR" property="collectorLoginName" /> <result column="collector_login_name" jdbcType="VARCHAR" property="collectorLoginName" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="state" jdbcType="TINYINT" property="state" /> <result column="state" jdbcType="TINYINT" property="state" javaType="int"/>
<result column="full_repay_date" jdbcType="TIMESTAMP" property="fullRepayDate" /> <result column="full_repay_date" jdbcType="TIMESTAMP" property="fullRepayDate" />
<result column="last_collection_time" jdbcType="TIMESTAMP" property="lastCollectionTime" /> <result column="last_collection_time" jdbcType="TIMESTAMP" property="lastCollectionTime" />
<result column="next_collection_time" jdbcType="TIMESTAMP" property="nextCollectionTime" /> <result column="next_collection_time" jdbcType="TIMESTAMP" property="nextCollectionTime" />
@ -69,20 +69,7 @@
</select> </select>
<insert id="insertBatch" parameterType="com.infincash.cron.collection.table.TBizCollection"> <insert id="insertBatch" parameterType="com.infincash.cron.collection.table.TBizCollection">
insert into t_biz_collection_record insert into t_biz_collection
"collectorLoginName": "HARRY",
"deadline": 1,
"firstPriceLoan": 1800000.00,
"fkSystemUser": "00101519376707262349",
"loanTime": 1511663497000,
"projectNumber": "GO20171125435400",
"repaymentDate": 1514217600000,
"unit": "1",
"userLoginName": "MF_qmjoqz",
"userPhone": "085934509604",
"userRealName": "Sandhi Trisnadi"
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
fk_t_project, fk_t_project,
fk_t_user, fk_t_user,
@ -94,102 +81,28 @@
loan_time, loan_time,
project_period, project_period,
first_price_loan, first_price_loan,
repayment_date repayment_date,
</if> overdue_day_count,
<if test="collectorLoginName != null">
collector_login_name, collector_login_name,
</if> state
<if test="updateTime != null">
update_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="state != null">
state,
</if>
<if test="fullRepayDate != null">
full_repay_date,
</if>
<if test="lastCollectionTime != null">
last_collection_time,
</if>
<if test="nextCollectionTime != null">
next_collection_time,
</if>
<if test="histryCollectionCount != null">
histry_collection_count,
</if>
</trim> </trim>
VALUES VALUES
<foreach collection ="list" item="oneItem" index= "index" separator =","> <foreach collection ="list" item="oneItem" index= "index" separator =",">
( (
<if test="fkTProject != null">
#{oneItem.fkTProject,jdbcType=VARCHAR}, #{oneItem.fkTProject,jdbcType=VARCHAR},
</if>
<if test="fkTUser != null">
#{oneItem.fkTUser,jdbcType=VARCHAR}, #{oneItem.fkTUser,jdbcType=VARCHAR},
</if>
<if test="fkSystemUser != null">
#{oneItem.fkSystemUser,jdbcType=VARCHAR}, #{oneItem.fkSystemUser,jdbcType=VARCHAR},
</if>
<if test="waitOrRecord != null">
#{oneItem.waitOrRecord,jdbcType=TINYINT},
</if>
<if test="projectNumber != null">
#{oneItem.projectNumber,jdbcType=VARCHAR}, #{oneItem.projectNumber,jdbcType=VARCHAR},
</if>
<if test="userLoginName != null">
#{oneItem.userLoginName,jdbcType=VARCHAR}, #{oneItem.userLoginName,jdbcType=VARCHAR},
</if>
<if test="userRealName != null">
#{oneItem.userRealName,jdbcType=VARCHAR}, #{oneItem.userRealName,jdbcType=VARCHAR},
</if>
<if test="userPhone != null">
#{oneItem.userPhone,jdbcType=VARCHAR}, #{oneItem.userPhone,jdbcType=VARCHAR},
</if>
<if test="loanTime != null">
#{oneItem.loanTime,jdbcType=TIMESTAMP}, #{oneItem.loanTime,jdbcType=TIMESTAMP},
</if>
<if test="projectPeriod != null">
#{oneItem.projectPeriod,jdbcType=VARCHAR}, #{oneItem.projectPeriod,jdbcType=VARCHAR},
</if>
<if test="firstPriceLoan != null">
#{oneItem.firstPriceLoan,jdbcType=DECIMAL}, #{oneItem.firstPriceLoan,jdbcType=DECIMAL},
</if>
<if test="repaymentDate != null">
#{oneItem.repaymentDate,jdbcType=TIMESTAMP}, #{oneItem.repaymentDate,jdbcType=TIMESTAMP},
</if>
<if test="overdueDayCount != null">
#{oneItem.overdueDayCount,jdbcType=SMALLINT}, #{oneItem.overdueDayCount,jdbcType=SMALLINT},
</if>
<if test="fkTBizCollectionOverdueBucketIntervalId != null">
#{oneItem.fkTBizCollectionOverdueBucketIntervalId,jdbcType=SMALLINT},
</if>
<if test="collectorLoginName != null">
#{oneItem.collectorLoginName,jdbcType=VARCHAR}, #{oneItem.collectorLoginName,jdbcType=VARCHAR},
</if> #{oneItem.state,jdbcType=TINYINT}
<if test="updateTime != null">
#{oneItem.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{oneItem.updateBy,jdbcType=VARCHAR},
</if>
<if test="state != null">
#{oneItem.state,jdbcType=TINYINT},
</if>
<if test="fullRepayDate != null">
#{oneItem.fullRepayDate,jdbcType=TIMESTAMP},
</if>
<if test="lastCollectionTime != null">
#{oneItem.lastCollectionTime,jdbcType=TIMESTAMP},
</if>
<if test="nextCollectionTime != null">
#{oneItem.nextCollectionTime,jdbcType=TIMESTAMP},
</if>
<if test="histryCollectionCount != null">
#{oneItem.histryCollectionCount,jdbcType=SMALLINT},
</if>
) )
</foreach > </foreach >
</insert> </insert>

Loading…
Cancel
Save