Commit 18962876 authored by Data-王博's avatar Data-王博

湖北消金 - 提前还款要包含线下还款 这部分代码要测试。

parent cf3681ef
package cn.quantgroup.financial.constant;
/**
* Created by WuKong on 2017/3/8.
*/
public enum OfflineRepayStatus {
REPAY_BIZ_STATUS_OK("REPAY_BIZ_STATUS_OK");//业务系统状态变更回调确认
OfflineRepayStatus(String status) {
this.status = status;
}
private String status;
public String get(){
return status;
}
}
package cn.quantgroup.financial.dao;
import cn.quantgroup.financial.constant.OfflineRepayStatus;
import cn.quantgroup.financial.model.RepayOfflineRecord;
import java.util.Date;
import java.util.List;
/**
* Created by WuKong on 2017/3/8.
*/
public interface IRepayOfflineRecordDao {
List<RepayOfflineRecord> getByNotInLoanListAndRepayStatusAndUpdateAt(List<Long> loanList,OfflineRepayStatus offlineRepayStatus, Date gtTime, Date ltTime);
List<RepayOfflineRecord> getByReapyStatusAndLoanList(OfflineRepayStatus offlineRepayStatus,List<Long> loanList);
}
package cn.quantgroup.financial.dao.impl;
import cn.quantgroup.financial.aspect.data.DataSourceConfig;
import cn.quantgroup.financial.constant.DataBaseType;
import cn.quantgroup.financial.constant.OfflineRepayStatus;
import cn.quantgroup.financial.dao.IRepayOfflineRecordDao;
import cn.quantgroup.financial.mapper.RepayOfflineRecordMapper;
import cn.quantgroup.financial.model.RepayOfflineRecord;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* Created by WuKong on 2017/3/8.
*/
@DataSourceConfig(DataBaseType.System_DB)
@Service
public class RepayOfflineRecordDaoImpl implements IRepayOfflineRecordDao {
@Autowired
private RepayOfflineRecordMapper repayOfflineRecordMapper;
@Override
public List<RepayOfflineRecord> getByNotInLoanListAndRepayStatusAndUpdateAt(List<Long> loanList,OfflineRepayStatus offlineRepayStatus, Date gtTime, Date ltTime){
if(offlineRepayStatus==null||gtTime==null||ltTime==null){
return new ArrayList<RepayOfflineRecord>();
}
return repayOfflineRecordMapper.getByRepayStatusAndUpdateAt(loanList,offlineRepayStatus.get(),gtTime,ltTime);
}
public List<RepayOfflineRecord> getByReapyStatusAndLoanList(OfflineRepayStatus offlineRepayStatus,List<Long> loanList){
if(offlineRepayStatus==null|| CollectionUtils.isEmpty(loanList)){
return new ArrayList<RepayOfflineRecord>();
}
return repayOfflineRecordMapper.getByReapyStatusAndLoanList(offlineRepayStatus.get(),loanList);
}
}
package cn.quantgroup.financial.mapper;
import cn.quantgroup.financial.model.RepayOfflineRecord;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
public interface RepayOfflineRecordMapper {
int deleteByPrimaryKey(Long id);
int insert(RepayOfflineRecord record);
int insertSelective(RepayOfflineRecord record);
RepayOfflineRecord selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(RepayOfflineRecord record);
int updateByPrimaryKey(RepayOfflineRecord record);
List<RepayOfflineRecord> getByRepayStatusAndUpdateAt(@Param("loanList") List<Long> loanList,@Param("offlineRepayStatus") String offlineRepayStatus, @Param("gtTime") Date gtTime, @Param("ltTime") Date ltTime);
List<RepayOfflineRecord> getByReapyStatusAndLoanList(@Param("offlineRepayStatus") String offlineRepayStatus,@Param("loanList") List<Long> loanList);
}
\ No newline at end of file
package cn.quantgroup.financial.model;
import java.math.BigDecimal;
import java.util.Date;
public class RepayOfflineRecord {
private Long id;
private Byte bizType;
private Long bizUserId;
private String userName;
private String userPhone;
private String userIdNo;
private String bizLoanNo;
private Date loanTime;
private BigDecimal loanAmount;
private String debtFundingCorp;
private Integer contractTerm;
private String bizRepayPlanNo;
private Integer currTerm;
private Date deadLine;
private BigDecimal currRepayAmount;
private BigDecimal principal;
private BigDecimal interest;
private BigDecimal lhpServiceFee;
private BigDecimal fundingServiceFee;
private BigDecimal lhpOverdueInterest;
private BigDecimal fundingOverdueInterest;
private Date reckonOverdueDate;
private Byte isOverdue;
private Date lastRepayTime;
private BigDecimal discount;
private BigDecimal collectionRelief;
private String remark;
private String repayStatus;
private Integer versionLock;
private Byte enable;
private Date createdAt;
private Date updatedAt;
private BigDecimal alreadyRepayPrincipal;
private BigDecimal alreadyRepayInterest;
private BigDecimal alreadyRepayFunderServiceFee;
private BigDecimal alreadyRepayQuantgroupServiceFee;
private BigDecimal alreadyRepayFunderOverdueFee;
private BigDecimal alreadyRepayQuantgroupOverdueFee;
private BigDecimal refundAmount;
private String channle;
private String collectionUserName;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Byte getBizType() {
return bizType;
}
public void setBizType(Byte bizType) {
this.bizType = bizType;
}
public Long getBizUserId() {
return bizUserId;
}
public void setBizUserId(Long bizUserId) {
this.bizUserId = bizUserId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName == null ? null : userName.trim();
}
public String getUserPhone() {
return userPhone;
}
public void setUserPhone(String userPhone) {
this.userPhone = userPhone == null ? null : userPhone.trim();
}
public String getUserIdNo() {
return userIdNo;
}
public void setUserIdNo(String userIdNo) {
this.userIdNo = userIdNo == null ? null : userIdNo.trim();
}
public String getBizLoanNo() {
return bizLoanNo;
}
public void setBizLoanNo(String bizLoanNo) {
this.bizLoanNo = bizLoanNo == null ? null : bizLoanNo.trim();
}
public Date getLoanTime() {
return loanTime;
}
public void setLoanTime(Date loanTime) {
this.loanTime = loanTime;
}
public BigDecimal getLoanAmount() {
return loanAmount;
}
public void setLoanAmount(BigDecimal loanAmount) {
this.loanAmount = loanAmount;
}
public String getDebtFundingCorp() {
return debtFundingCorp;
}
public void setDebtFundingCorp(String debtFundingCorp) {
this.debtFundingCorp = debtFundingCorp == null ? null : debtFundingCorp.trim();
}
public Integer getContractTerm() {
return contractTerm;
}
public void setContractTerm(Integer contractTerm) {
this.contractTerm = contractTerm;
}
public String getBizRepayPlanNo() {
return bizRepayPlanNo;
}
public void setBizRepayPlanNo(String bizRepayPlanNo) {
this.bizRepayPlanNo = bizRepayPlanNo == null ? null : bizRepayPlanNo.trim();
}
public Integer getCurrTerm() {
return currTerm;
}
public void setCurrTerm(Integer currTerm) {
this.currTerm = currTerm;
}
public Date getDeadLine() {
return deadLine;
}
public void setDeadLine(Date deadLine) {
this.deadLine = deadLine;
}
public BigDecimal getCurrRepayAmount() {
return currRepayAmount;
}
public void setCurrRepayAmount(BigDecimal currRepayAmount) {
this.currRepayAmount = currRepayAmount;
}
public BigDecimal getPrincipal() {
return principal;
}
public void setPrincipal(BigDecimal principal) {
this.principal = principal;
}
public BigDecimal getInterest() {
return interest;
}
public void setInterest(BigDecimal interest) {
this.interest = interest;
}
public BigDecimal getLhpServiceFee() {
return lhpServiceFee;
}
public void setLhpServiceFee(BigDecimal lhpServiceFee) {
this.lhpServiceFee = lhpServiceFee;
}
public BigDecimal getFundingServiceFee() {
return fundingServiceFee;
}
public void setFundingServiceFee(BigDecimal fundingServiceFee) {
this.fundingServiceFee = fundingServiceFee;
}
public BigDecimal getLhpOverdueInterest() {
return lhpOverdueInterest;
}
public void setLhpOverdueInterest(BigDecimal lhpOverdueInterest) {
this.lhpOverdueInterest = lhpOverdueInterest;
}
public BigDecimal getFundingOverdueInterest() {
return fundingOverdueInterest;
}
public void setFundingOverdueInterest(BigDecimal fundingOverdueInterest) {
this.fundingOverdueInterest = fundingOverdueInterest;
}
public Date getReckonOverdueDate() {
return reckonOverdueDate;
}
public void setReckonOverdueDate(Date reckonOverdueDate) {
this.reckonOverdueDate = reckonOverdueDate;
}
public Byte getIsOverdue() {
return isOverdue;
}
public void setIsOverdue(Byte isOverdue) {
this.isOverdue = isOverdue;
}
public Date getLastRepayTime() {
return lastRepayTime;
}
public void setLastRepayTime(Date lastRepayTime) {
this.lastRepayTime = lastRepayTime;
}
public BigDecimal getDiscount() {
return discount;
}
public void setDiscount(BigDecimal discount) {
this.discount = discount;
}
public BigDecimal getCollectionRelief() {
return collectionRelief;
}
public void setCollectionRelief(BigDecimal collectionRelief) {
this.collectionRelief = collectionRelief;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public String getRepayStatus() {
return repayStatus;
}
public void setRepayStatus(String repayStatus) {
this.repayStatus = repayStatus == null ? null : repayStatus.trim();
}
public Integer getVersionLock() {
return versionLock;
}
public void setVersionLock(Integer versionLock) {
this.versionLock = versionLock;
}
public Byte getEnable() {
return enable;
}
public void setEnable(Byte enable) {
this.enable = enable;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public BigDecimal getAlreadyRepayPrincipal() {
return alreadyRepayPrincipal;
}
public void setAlreadyRepayPrincipal(BigDecimal alreadyRepayPrincipal) {
this.alreadyRepayPrincipal = alreadyRepayPrincipal;
}
public BigDecimal getAlreadyRepayInterest() {
return alreadyRepayInterest;
}
public void setAlreadyRepayInterest(BigDecimal alreadyRepayInterest) {
this.alreadyRepayInterest = alreadyRepayInterest;
}
public BigDecimal getAlreadyRepayFunderServiceFee() {
return alreadyRepayFunderServiceFee;
}
public void setAlreadyRepayFunderServiceFee(BigDecimal alreadyRepayFunderServiceFee) {
this.alreadyRepayFunderServiceFee = alreadyRepayFunderServiceFee;
}
public BigDecimal getAlreadyRepayQuantgroupServiceFee() {
return alreadyRepayQuantgroupServiceFee;
}
public void setAlreadyRepayQuantgroupServiceFee(BigDecimal alreadyRepayQuantgroupServiceFee) {
this.alreadyRepayQuantgroupServiceFee = alreadyRepayQuantgroupServiceFee;
}
public BigDecimal getAlreadyRepayFunderOverdueFee() {
return alreadyRepayFunderOverdueFee;
}
public void setAlreadyRepayFunderOverdueFee(BigDecimal alreadyRepayFunderOverdueFee) {
this.alreadyRepayFunderOverdueFee = alreadyRepayFunderOverdueFee;
}
public BigDecimal getAlreadyRepayQuantgroupOverdueFee() {
return alreadyRepayQuantgroupOverdueFee;
}
public void setAlreadyRepayQuantgroupOverdueFee(BigDecimal alreadyRepayQuantgroupOverdueFee) {
this.alreadyRepayQuantgroupOverdueFee = alreadyRepayQuantgroupOverdueFee;
}
public BigDecimal getRefundAmount() {
return refundAmount;
}
public void setRefundAmount(BigDecimal refundAmount) {
this.refundAmount = refundAmount;
}
public String getChannle() {
return channle;
}
public void setChannle(String channle) {
this.channle = channle == null ? null : channle.trim();
}
public String getCollectionUserName() {
return collectionUserName;
}
public void setCollectionUserName(String collectionUserName) {
this.collectionUserName = collectionUserName == null ? null : collectionUserName.trim();
}
}
\ No newline at end of file
......@@ -31,6 +31,7 @@ import java.util.concurrent.TimeUnit;
@Lazy(false)
@Component
public class HuBeiReturnDiscScheduler {
private static final Logger logger = LoggerFactory.getLogger(HuBeiReturnDiscScheduler.class);
......
......@@ -176,6 +176,20 @@ public class HubeiCFCUtil {
return dates;
}
public static Date[] getOfflineDateScope(){
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.MILLISECOND,0);
calendar.set(Calendar.SECOND,0);
calendar.set(Calendar.MINUTE,0);
calendar.set(Calendar.HOUR_OF_DAY,0);
calendar.set(Calendar.DATE,calendar.get(Calendar.DATE));
Date gtDate = calendar.getTime();
calendar.set(Calendar.HOUR_OF_DAY,21);
Date ltDate = calendar.getTime();
Date[] dates = new Date[]{gtDate,ltDate};
return dates;
}
/**
* 当天还款日零点
* @return
......
......@@ -14,7 +14,7 @@
</commentGenerator>
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://127.0.0.1:3306/financial_system_api" userId="root" password="root">
connectionURL="jdbc:mysql://127.0.0.1:3306/financial_system" userId="root" password="root">
</jdbcConnection>
<javaTypeResolver>
......@@ -46,7 +46,7 @@
</javaClientGenerator>
<table tableName="mailinfo" domainObjectName="MailInfo" enableUpdateByExample="false" enableCountByExample="false"
<table tableName="repay_offline_record" domainObjectName="RepayOfflineRecord" enableUpdateByExample="false" enableCountByExample="false"
enableDeleteByExample="false" enableSelectByExample="false" >
</table>
</context>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment