可以插入了, 但是自动派单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);
String userId = (String) tmpMap.get("user_id");
String userRealName = (String) tmpMap.get("real_name");
s.setState(1);
s.setFkSystemUser(userId);
s.setCollectorLoginName(userRealName);
long ll = dateSubstract(new Date(), s.getRepaymentDate());
s.setOverdueDayCount(Short.valueOf("" + ll));
String tmp = "";
tmp += s.getDeadline();
if("0".equals(s.getUnit().trim())) {
//天
if ("0".equals(s.getUnit().trim()))
{
// 天
tmp += " Day";
} else if ("1".equals(s.getUnit().trim())) {
//
} else if ("1".equals(s.getUnit().trim()))
{
//
tmp += " Month";
} else {
} else
{
throw new InfintechException("getUnit error! unit:" + s.getUnit());
}
s.setProjectPeriod(tmp);

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

@ -21,7 +21,7 @@
<result column="collector_login_name" jdbcType="VARCHAR" property="collectorLoginName" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<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="last_collection_time" jdbcType="TIMESTAMP" property="lastCollectionTime" />
<result column="next_collection_time" jdbcType="TIMESTAMP" property="nextCollectionTime" />
@ -69,20 +69,7 @@
</select>
<insert id="insertBatch" parameterType="com.infincash.cron.collection.table.TBizCollection">
insert into t_biz_collection_record
"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"
insert into t_biz_collection
<trim prefix="(" suffix=")" suffixOverrides=",">
fk_t_project,
fk_t_user,
@ -94,102 +81,28 @@
loan_time,
project_period,
first_price_loan,
repayment_date
</if>
<if test="collectorLoginName != null">
repayment_date,
overdue_day_count,
collector_login_name,
</if>
<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>
state
</trim>
VALUES
<foreach collection ="list" item="oneItem" index= "index" separator =",">
(
<if test="fkTProject != null">
#{oneItem.fkTProject,jdbcType=VARCHAR},
</if>
<if test="fkTUser != null">
#{oneItem.fkTUser,jdbcType=VARCHAR},
</if>
<if test="fkSystemUser != null">
#{oneItem.fkSystemUser,jdbcType=VARCHAR},
</if>
<if test="waitOrRecord != null">
#{oneItem.waitOrRecord,jdbcType=TINYINT},
</if>
<if test="projectNumber != null">
#{oneItem.projectNumber,jdbcType=VARCHAR},
</if>
<if test="userLoginName != null">
#{oneItem.userLoginName,jdbcType=VARCHAR},
</if>
<if test="userRealName != null">
#{oneItem.userRealName,jdbcType=VARCHAR},
</if>
<if test="userPhone != null">
#{oneItem.userPhone,jdbcType=VARCHAR},
</if>
<if test="loanTime != null">
#{oneItem.loanTime,jdbcType=TIMESTAMP},
</if>
<if test="projectPeriod != null">
#{oneItem.projectPeriod,jdbcType=VARCHAR},
</if>
<if test="firstPriceLoan != null">
#{oneItem.firstPriceLoan,jdbcType=DECIMAL},
</if>
<if test="repaymentDate != null">
#{oneItem.repaymentDate,jdbcType=TIMESTAMP},
</if>
<if test="overdueDayCount != null">
#{oneItem.overdueDayCount,jdbcType=SMALLINT},
</if>
<if test="fkTBizCollectionOverdueBucketIntervalId != null">
#{oneItem.fkTBizCollectionOverdueBucketIntervalId,jdbcType=SMALLINT},
</if>
<if test="collectorLoginName != null">
#{oneItem.collectorLoginName,jdbcType=VARCHAR},
</if>
<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>
#{oneItem.state,jdbcType=TINYINT}
)
</foreach >
</insert>

Loading…
Cancel
Save