Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
windows
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanhai
windows
Commits
c90453d7
Commit
c90453d7
authored
Mar 11, 2025
by
LSL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推送天思
parent
d9f217f0
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1969 additions
and
0 deletions
+1969
-0
SyncBuildComponent.java
...n/java/com/jqtx/windows/component/SyncBuildComponent.java
+12
-0
Contant.java
src/main/java/com/jqtx/windows/component/config/Contant.java
+41
-0
FeignUrlConfig.java
...ava/com/jqtx/windows/component/config/FeignUrlConfig.java
+22
-0
SyncBuildComponentImpl.java
...m/jqtx/windows/component/impl/SyncBuildComponentImpl.java
+119
-0
SyncRetryJob.java
src/main/java/com/jqtx/windows/job/SyncRetryJob.java
+77
-0
WindowsRetry.java
...java/com/jqtx/windows/repository/entity/WindowsRetry.java
+96
-0
WindowsRetryExample.java
...m/jqtx/windows/repository/entity/WindowsRetryExample.java
+791
-0
WindowsRetryMapper.java
...om/jqtx/windows/repository/mapper/WindowsRetryMapper.java
+30
-0
SyncDataService.java
src/main/java/com/jqtx/windows/service/SyncDataService.java
+21
-0
SyncDataServiceImpl.java
...va/com/jqtx/windows/service/impl/SyncDataServiceImpl.java
+35
-0
DateUtils.java
src/main/java/com/jqtx/windows/utils/DateUtils.java
+17
-0
HttpClientPools.java
...ain/java/com/jqtx/windows/utils/http/HttpClientPools.java
+242
-0
HttpUtil.java
src/main/java/com/jqtx/windows/utils/http/HttpUtil.java
+191
-0
WindowsRetryMapper.xml
src/main/resources/mybatis/mapper/WindowsRetryMapper.xml
+275
-0
No files found.
src/main/java/com/jqtx/windows/component/SyncBuildComponent.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
component
;
import
com.jqtx.windows.component.tsmodel.AddCaseRequest
;
public
interface
SyncBuildComponent
{
/**
* 分装提醒推送
* @param planNo
* @return
*/
AddCaseRequest
buildAddCaseRequest
(
String
planNo
);
}
src/main/java/com/jqtx/windows/component/config/Contant.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
component
.
config
;
/**
* @program: asgard
* @description:
* @author: zq
* @create: 2019-12-17 20:23
**/
public
class
Contant
{
/**
* 提醒推送url
*/
public
static
final
String
REMIND_URL
=
"/qtong/public/case/add"
;
/**
* 结果推送url
*/
public
static
final
String
RESULT_URL
=
"/qtong/public/repaymentIntention/sync"
;
/**
* 逾期还款
*/
public
static
final
String
OVER_BACKING_URL
=
"/qtong/public/repayRecord/add"
;
/**
* 新增提前结清数据
*/
public
static
final
String
BACKING_URL
=
"/qtong/public/synAdvanceSettle/add"
;
/**
* 逾期金额增加
*/
public
static
final
String
OVER_AMT_ADD
=
"/qtong/public/caseOverdue/sync"
;
public
static
final
String
FEED_URL
=
"/qtong/public/uploadCase/addAttachments"
;
public
static
final
String
REFUND
=
"/qtong/public/repayRecord/add"
;
public
static
final
String
REPAYLOG
=
"/qtong/public/repayLog/add"
;
public
static
final
String
GETFOLLOWCLIENT
=
"/qtong/public/case/queryCollectionCompanyByLoanNo"
;
public
static
final
String
QUERYCLIENT
=
"/qtong/public/case/queryClient"
;
public
static
final
String
RISK
=
"/qtong/public/uploadCase/uploadRisk"
;
}
src/main/java/com/jqtx/windows/component/config/FeignUrlConfig.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
component
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.Configuration
;
/**
* @Description:
* @Author: liyongen
* @Date: 2019/7/16 20:45
*/
@Data
@Configuration
@ConfigurationProperties
(
prefix
=
"tiansicase"
)
public
class
FeignUrlConfig
{
/** 天思 **/
private
String
url
;
private
String
secretKey
;
}
src/main/java/com/jqtx/windows/component/impl/SyncBuildComponentImpl.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
component
.
impl
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.jqtx.infrastructure.util.LoanMobileAESUtil
;
import
com.jqtx.infrastructure.util.SecurityUtils
;
import
com.jqtx.windows.component.LoanPlanComponent
;
import
com.jqtx.windows.component.SyncBuildComponent
;
import
com.jqtx.windows.component.model.CreditModel
;
import
com.jqtx.windows.component.model.LoanModel
;
import
com.jqtx.windows.component.model.LoanPlanModel
;
import
com.jqtx.windows.component.tsmodel.AddCaseRequest
;
import
com.jqtx.windows.component.tsmodel.ContactRequest
;
import
com.jqtx.windows.component.tsmodel.SimpleAttachRequest
;
import
com.jqtx.windows.component.tsmodel.UrgentContactRequest
;
import
com.jqtx.windows.utils.DateUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
public
class
SyncBuildComponentImpl
implements
SyncBuildComponent
{
@Value
(
"${tiansi.bizChannel}"
)
private
Long
bizChannel
;
@Autowired
private
LoanPlanComponent
loanPlanComponent
;
@Autowired
private
LoanComponentImpl
loanComponent
;
@Autowired
private
CreditComponentImpl
creditComponent
;
@Override
public
AddCaseRequest
buildAddCaseRequest
(
String
planNo
)
{
//
LoanPlanModel
planRemindModel
=
loanPlanComponent
.
getPlanNoByPlanNo
(
planNo
);
if
(
planRemindModel
==
null
)
{
return
null
;
}
//借款信息
LoanModel
loanModel
=
loanComponent
.
getByLoanNo
(
planRemindModel
.
getLoanNo
());
//查询用户信息
CreditModel
creditModel
=
creditComponent
.
getByOrderNo
(
loanModel
.
getOrderNo
());
String
bizType
=
"ZN"
;
AddCaseRequest
request
=
new
AddCaseRequest
();
request
.
setBizChannel
(
bizChannel
);
/** 客户基础信息 */
request
.
setClientName
(
SecurityUtils
.
decryptAES
(
creditModel
.
getClientName
()));
request
.
setClientIdCard
(
SecurityUtils
.
decryptAES
(
creditModel
.
getCertNo
()));
request
.
setClientMobile
(
LoanMobileAESUtil
.
decrypt
(
creditModel
.
getClientCell
()));
/** 案件基础信息 */
request
.
setLoanBankCard
(
""
);
/** 还款卡号 */
request
.
setLoanName
(
"小花钱包-浙农项目"
);
//获取配置
request
.
setProductTypeName
(
"小花钱包-浙农项目"
);
/** 产品类型名称*/
request
.
setProductTypeCode
(
"XIAO_ZN"
);
/** 产品类型 */
request
.
setLoanNo
(
loanModel
.
getLoanNo
());
/** 借款编号 */
request
.
setLoanCaseNo
(
planNo
);
/** 委托方案件编号 */
request
.
setLoanDate
(
DateUtils
.
toDate
(
loanModel
.
getRaiseDate
()));
/** 放款日期 */
request
.
setLoanBackDate
(
DateUtils
.
toDate
(
planRemindModel
.
getPlanDate
()));
/** 还款日期 */
request
.
setLoanTotalPeriod
(
Integer
.
parseInt
(
loanModel
.
getLoanTerm
()));
/** 总期数 */
request
.
setLoanLeftPeriod
(
Integer
.
parseInt
(
loanModel
.
getLoanTerm
())
-
planRemindModel
.
getPlanIndex
());
/** 剩余期数 */
request
.
setLoanCurrentPeriod
(
planRemindModel
.
getPlanIndex
());
/** 当前期数 */
request
.
setLoanCurrentPeriodDays
(
30
);
/** 当期天数 */
request
.
setLoanDelegateTimes
(
1
);
/** 委外手数 */
BigDecimal
amt
=
planRemindModel
.
getPlanAmt
().
add
(
planRemindModel
.
getPlanFa
()).
subtract
(
planRemindModel
.
getBackedBen
()).
subtract
(
planRemindModel
.
getBackedFu
()).
subtract
(
planRemindModel
.
getBackedXi
()).
subtract
(
planRemindModel
.
getBackedFa
())
.
subtract
(
planRemindModel
.
getBackedBurden
()).
subtract
(
planRemindModel
.
getBackedSpeaccount
());
request
.
setLoanDelegateAmt
(
amt
);
/** 委案金额 */
request
.
setLoanTotalAmt
(
loanModel
.
getRaiseAmt
());
/** 本次借款总金额 */
/** 合计金额 */
BigDecimal
backedAmt
=
loanPlanComponent
.
countBackedAmtByLoanNo
(
loanModel
.
getLoanNo
());
request
.
setTotalShouldRepay
(
loanModel
.
getLoanAmt
());
/** 全部应还金额*/
request
.
setTotalBackedRepay
(
backedAmt
);
/** 全部已还金额*/
request
.
setTotalUnBackedRepay
(
loanModel
.
getLoanAmt
().
subtract
(
backedAmt
));
/** 全部未还金额*/
// request.setCapitalTotalShouldRepay(loan.getLoanAmt());/** 全部应还本金*/
// request.setCapitalTotalBackedRepay(loanCollect.getPeriodAmt());/** 全部已还本金*/
request
.
setCapitalPeriodShouldRepay
(
planRemindModel
.
getPlanBen
());
/** 当期应还本金*/
request
.
setCapitalPeriodBackedRepay
(
planRemindModel
.
getBackedBen
());
/** 当期已还本金*/
// request.setInterestTotalShouldRepay(loan.getRateAmt());/** 全部应还利息*/
// request.setInterestTotalBackedRepay(BigDecimal.ZERO);/** 全部已还利息*/
request
.
setInterestPeriodShouldRepay
(
planRemindModel
.
getPlanXi
());
/** 当期应还利息*/
request
.
setInterestPeriodBackedRepay
(
planRemindModel
.
getBackedXi
());
/** 当期已还利息*/
// request.setFeeTotalShouldRepay(loan.getServiceAmt());/** 全部应还服务费*/
// request.setFeeTotalBackedRepay(BigDecimal.ZERO);/** 全部已还服务费*/
BigDecimal
FuAmt
=
planRemindModel
.
getPlanFu
().
add
(
planRemindModel
.
getPlanBurden
()).
add
(
planRemindModel
.
getPlanSpeaccount
());
request
.
setFeePeriodShouldRepay
(
FuAmt
);
/** 当期应还服务费*/
BigDecimal
backFu
=
planRemindModel
.
getBackedFu
().
add
(
planRemindModel
.
getBackedBurden
()).
add
(
planRemindModel
.
getBackedSpeaccount
());
request
.
setFeePeriodBackedRepay
(
backFu
);
/** 当期已还服务费*/
// request.setPunishTotalShouldRepay(BigDecimal.ZERO);/** 全部应还罚息*/
// request.setPunishTotalBackedRepay(BigDecimal.ZERO);/** 全部已还罚息*/
request
.
setPunishPeriodShouldRepay
(
planRemindModel
.
getPlanFa
());
/** 当期应还罚息*/
request
.
setPunishPeriodBackedRepay
(
planRemindModel
.
getBackedFa
());
/** 当期已还罚息*/
/** 通讯录 */
List
<
ContactRequest
>
contactRequests
=
new
ArrayList
<>();
ContactRequest
contactRequest
=
new
ContactRequest
();
contactRequest
.
setContactMobile
(
LoanMobileAESUtil
.
decrypt
(
creditModel
.
getClientCell
()));
contactRequest
.
setContactName
(
SecurityUtils
.
decryptAES
(
creditModel
.
getClientName
()));
contactRequest
.
setRelation
(
"无"
);
contactRequests
.
add
(
contactRequest
);
request
.
setContactRequests
(
contactRequests
);
/** 附件处理*/
List
<
SimpleAttachRequest
>
attachRequests
=
new
ArrayList
<>();
request
.
setAttachments
(
attachRequests
);
request
.
setMemo
(
"小花钱包-浙农项目"
);
request
.
setFundChannel
(
"小花钱包-浙农项目"
);
return
request
;
}
}
src/main/java/com/jqtx/windows/job/SyncRetryJob.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
job
;
import
com.alibaba.fastjson2.JSON
;
import
com.jqtx.windows.component.LoanPlanComponent
;
import
com.jqtx.windows.component.SyncBuildComponent
;
import
com.jqtx.windows.component.config.Contant
;
import
com.jqtx.windows.component.config.FeignUrlConfig
;
import
com.jqtx.windows.component.model.LoanPlanModel
;
import
com.jqtx.windows.component.tsmodel.AddCaseRequest
;
import
com.jqtx.windows.service.SyncDataService
;
import
com.jqtx.windows.web.response.JsonResult
;
import
com.xxl.job.core.context.XxlJobHelper
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.text.MessageFormat
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.List
;
/**
* @Description: 重新推送案件(重试机制推送)
* @Date: 2019/12/04 10:55
*/
@Component
@Slf4j
public
class
SyncRetryJob
{
@Autowired
private
FeignUrlConfig
feignUrlConfig
;
@Autowired
private
SyncDataService
syncDataService
;
@Autowired
private
LoanPlanComponent
loanPlanComponent
;
@Autowired
private
SyncBuildComponent
syncBuildComponent
;
@XxlJob
(
value
=
"syncRetryJobHandler"
)
private
void
process
()
{
String
param
=
XxlJobHelper
.
getJobParam
();
try
{
LocalDateTime
executeStartTime
=
LocalDateTime
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
log
.
info
(
"任务开始时间-[{}]"
,
executeStartTime
.
format
(
formatter
));
log
.
info
(
"需要重新推送案件处理开始..."
);
Long
li1
=
System
.
currentTimeMillis
();
List
<
LoanPlanModel
>
list
=
loanPlanComponent
.
getByLoan
(
param
);
for
(
LoanPlanModel
planModel
:
list
)
{
sendTs
(
syncBuildComponent
.
buildAddCaseRequest
(
planModel
.
getPlanNo
()));
}
Long
li2
=
System
.
currentTimeMillis
();
log
.
info
(
"任务结束时间-[{}],执行-[{}]"
,
executeStartTime
.
format
(
formatter
),
li2
-
li1
);
}
catch
(
Exception
e
)
{
log
.
error
(
MessageFormat
.
format
(
"需要重新推送案件处理异常:{0}"
,
e
.
getMessage
()),
e
);
}
log
.
info
(
"需要重新推送案件处理结束..."
);
}
public
Boolean
sendTs
(
AddCaseRequest
addCaseRequest
)
{
String
url
=
feignUrlConfig
.
getUrl
()
+
Contant
.
REMIND_URL
;
String
body
=
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
(
addCaseRequest
);
log
.
info
(
"同步提醒案件到天思请求:{}"
,
body
);
JsonResult
<
String
>
synResult
=
syncDataService
.
synResult
(
url
,
body
);
log
.
info
(
"同步提醒案件天思返回:{}"
,
synResult
);
if
(
synResult
.
isSuccess
())
{
return
true
;
}
return
false
;
}
}
src/main/java/com/jqtx/windows/repository/entity/WindowsRetry.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
repository
.
entity
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
public
class
WindowsRetry
{
private
Integer
id
;
private
String
bizType
;
private
String
bizCode
;
private
String
bizState
;
private
LocalDate
pushDate
;
private
LocalDateTime
gmtCreated
;
private
LocalDateTime
gmtModified
;
private
String
memo
;
private
String
repayType
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getBizType
()
{
return
bizType
;
}
public
void
setBizType
(
String
bizType
)
{
this
.
bizType
=
bizType
==
null
?
null
:
bizType
.
trim
();
}
public
String
getBizCode
()
{
return
bizCode
;
}
public
void
setBizCode
(
String
bizCode
)
{
this
.
bizCode
=
bizCode
==
null
?
null
:
bizCode
.
trim
();
}
public
String
getBizState
()
{
return
bizState
;
}
public
void
setBizState
(
String
bizState
)
{
this
.
bizState
=
bizState
==
null
?
null
:
bizState
.
trim
();
}
public
LocalDate
getPushDate
()
{
return
pushDate
;
}
public
void
setPushDate
(
LocalDate
pushDate
)
{
this
.
pushDate
=
pushDate
;
}
public
LocalDateTime
getGmtCreated
()
{
return
gmtCreated
;
}
public
void
setGmtCreated
(
LocalDateTime
gmtCreated
)
{
this
.
gmtCreated
=
gmtCreated
;
}
public
LocalDateTime
getGmtModified
()
{
return
gmtModified
;
}
public
void
setGmtModified
(
LocalDateTime
gmtModified
)
{
this
.
gmtModified
=
gmtModified
;
}
public
String
getMemo
()
{
return
memo
;
}
public
void
setMemo
(
String
memo
)
{
this
.
memo
=
memo
==
null
?
null
:
memo
.
trim
();
}
public
String
getRepayType
()
{
return
repayType
;
}
public
void
setRepayType
(
String
repayType
)
{
this
.
repayType
=
repayType
==
null
?
null
:
repayType
.
trim
();
}
}
\ No newline at end of file
src/main/java/com/jqtx/windows/repository/entity/WindowsRetryExample.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
repository
.
entity
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
WindowsRetryExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
WindowsRetryExample
()
{
oredCriteria
=
new
ArrayList
<>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Integer
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeIsNull
()
{
addCriterion
(
"biz_type is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeIsNotNull
()
{
addCriterion
(
"biz_type is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeEqualTo
(
String
value
)
{
addCriterion
(
"biz_type ="
,
value
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeNotEqualTo
(
String
value
)
{
addCriterion
(
"biz_type <>"
,
value
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeGreaterThan
(
String
value
)
{
addCriterion
(
"biz_type >"
,
value
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"biz_type >="
,
value
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeLessThan
(
String
value
)
{
addCriterion
(
"biz_type <"
,
value
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"biz_type <="
,
value
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeLike
(
String
value
)
{
addCriterion
(
"biz_type like"
,
value
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeNotLike
(
String
value
)
{
addCriterion
(
"biz_type not like"
,
value
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeIn
(
List
<
String
>
values
)
{
addCriterion
(
"biz_type in"
,
values
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"biz_type not in"
,
values
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"biz_type between"
,
value1
,
value2
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizTypeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"biz_type not between"
,
value1
,
value2
,
"bizType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeIsNull
()
{
addCriterion
(
"biz_code is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeIsNotNull
()
{
addCriterion
(
"biz_code is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeEqualTo
(
String
value
)
{
addCriterion
(
"biz_code ="
,
value
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeNotEqualTo
(
String
value
)
{
addCriterion
(
"biz_code <>"
,
value
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeGreaterThan
(
String
value
)
{
addCriterion
(
"biz_code >"
,
value
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"biz_code >="
,
value
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeLessThan
(
String
value
)
{
addCriterion
(
"biz_code <"
,
value
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"biz_code <="
,
value
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeLike
(
String
value
)
{
addCriterion
(
"biz_code like"
,
value
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeNotLike
(
String
value
)
{
addCriterion
(
"biz_code not like"
,
value
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeIn
(
List
<
String
>
values
)
{
addCriterion
(
"biz_code in"
,
values
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"biz_code not in"
,
values
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"biz_code between"
,
value1
,
value2
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizCodeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"biz_code not between"
,
value1
,
value2
,
"bizCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateIsNull
()
{
addCriterion
(
"biz_state is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateIsNotNull
()
{
addCriterion
(
"biz_state is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateEqualTo
(
String
value
)
{
addCriterion
(
"biz_state ="
,
value
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateNotEqualTo
(
String
value
)
{
addCriterion
(
"biz_state <>"
,
value
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateGreaterThan
(
String
value
)
{
addCriterion
(
"biz_state >"
,
value
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"biz_state >="
,
value
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateLessThan
(
String
value
)
{
addCriterion
(
"biz_state <"
,
value
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"biz_state <="
,
value
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateLike
(
String
value
)
{
addCriterion
(
"biz_state like"
,
value
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateNotLike
(
String
value
)
{
addCriterion
(
"biz_state not like"
,
value
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateIn
(
List
<
String
>
values
)
{
addCriterion
(
"biz_state in"
,
values
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"biz_state not in"
,
values
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"biz_state between"
,
value1
,
value2
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBizStateNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"biz_state not between"
,
value1
,
value2
,
"bizState"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateIsNull
()
{
addCriterion
(
"push_date is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateIsNotNull
()
{
addCriterion
(
"push_date is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateEqualTo
(
LocalDate
value
)
{
addCriterion
(
"push_date ="
,
value
,
"pushDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateNotEqualTo
(
LocalDate
value
)
{
addCriterion
(
"push_date <>"
,
value
,
"pushDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateGreaterThan
(
LocalDate
value
)
{
addCriterion
(
"push_date >"
,
value
,
"pushDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateGreaterThanOrEqualTo
(
LocalDate
value
)
{
addCriterion
(
"push_date >="
,
value
,
"pushDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateLessThan
(
LocalDate
value
)
{
addCriterion
(
"push_date <"
,
value
,
"pushDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateLessThanOrEqualTo
(
LocalDate
value
)
{
addCriterion
(
"push_date <="
,
value
,
"pushDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateIn
(
List
<
LocalDate
>
values
)
{
addCriterion
(
"push_date in"
,
values
,
"pushDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateNotIn
(
List
<
LocalDate
>
values
)
{
addCriterion
(
"push_date not in"
,
values
,
"pushDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateBetween
(
LocalDate
value1
,
LocalDate
value2
)
{
addCriterion
(
"push_date between"
,
value1
,
value2
,
"pushDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPushDateNotBetween
(
LocalDate
value1
,
LocalDate
value2
)
{
addCriterion
(
"push_date not between"
,
value1
,
value2
,
"pushDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedIsNull
()
{
addCriterion
(
"gmt_created is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedIsNotNull
()
{
addCriterion
(
"gmt_created is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedEqualTo
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_created ="
,
value
,
"gmtCreated"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedNotEqualTo
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_created <>"
,
value
,
"gmtCreated"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedGreaterThan
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_created >"
,
value
,
"gmtCreated"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedGreaterThanOrEqualTo
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_created >="
,
value
,
"gmtCreated"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedLessThan
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_created <"
,
value
,
"gmtCreated"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedLessThanOrEqualTo
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_created <="
,
value
,
"gmtCreated"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedIn
(
List
<
LocalDateTime
>
values
)
{
addCriterion
(
"gmt_created in"
,
values
,
"gmtCreated"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedNotIn
(
List
<
LocalDateTime
>
values
)
{
addCriterion
(
"gmt_created not in"
,
values
,
"gmtCreated"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedBetween
(
LocalDateTime
value1
,
LocalDateTime
value2
)
{
addCriterion
(
"gmt_created between"
,
value1
,
value2
,
"gmtCreated"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtCreatedNotBetween
(
LocalDateTime
value1
,
LocalDateTime
value2
)
{
addCriterion
(
"gmt_created not between"
,
value1
,
value2
,
"gmtCreated"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedIsNull
()
{
addCriterion
(
"gmt_modified is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedIsNotNull
()
{
addCriterion
(
"gmt_modified is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedEqualTo
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_modified ="
,
value
,
"gmtModified"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedNotEqualTo
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_modified <>"
,
value
,
"gmtModified"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedGreaterThan
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_modified >"
,
value
,
"gmtModified"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedGreaterThanOrEqualTo
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_modified >="
,
value
,
"gmtModified"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedLessThan
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_modified <"
,
value
,
"gmtModified"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedLessThanOrEqualTo
(
LocalDateTime
value
)
{
addCriterion
(
"gmt_modified <="
,
value
,
"gmtModified"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedIn
(
List
<
LocalDateTime
>
values
)
{
addCriterion
(
"gmt_modified in"
,
values
,
"gmtModified"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedNotIn
(
List
<
LocalDateTime
>
values
)
{
addCriterion
(
"gmt_modified not in"
,
values
,
"gmtModified"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedBetween
(
LocalDateTime
value1
,
LocalDateTime
value2
)
{
addCriterion
(
"gmt_modified between"
,
value1
,
value2
,
"gmtModified"
);
return
(
Criteria
)
this
;
}
public
Criteria
andGmtModifiedNotBetween
(
LocalDateTime
value1
,
LocalDateTime
value2
)
{
addCriterion
(
"gmt_modified not between"
,
value1
,
value2
,
"gmtModified"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoIsNull
()
{
addCriterion
(
"memo is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoIsNotNull
()
{
addCriterion
(
"memo is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoEqualTo
(
String
value
)
{
addCriterion
(
"memo ="
,
value
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoNotEqualTo
(
String
value
)
{
addCriterion
(
"memo <>"
,
value
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoGreaterThan
(
String
value
)
{
addCriterion
(
"memo >"
,
value
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"memo >="
,
value
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoLessThan
(
String
value
)
{
addCriterion
(
"memo <"
,
value
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"memo <="
,
value
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoLike
(
String
value
)
{
addCriterion
(
"memo like"
,
value
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoNotLike
(
String
value
)
{
addCriterion
(
"memo not like"
,
value
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoIn
(
List
<
String
>
values
)
{
addCriterion
(
"memo in"
,
values
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"memo not in"
,
values
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"memo between"
,
value1
,
value2
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMemoNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"memo not between"
,
value1
,
value2
,
"memo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeIsNull
()
{
addCriterion
(
"repay_type is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeIsNotNull
()
{
addCriterion
(
"repay_type is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeEqualTo
(
String
value
)
{
addCriterion
(
"repay_type ="
,
value
,
"repayType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeNotEqualTo
(
String
value
)
{
addCriterion
(
"repay_type <>"
,
value
,
"repayType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeGreaterThan
(
String
value
)
{
addCriterion
(
"repay_type >"
,
value
,
"repayType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"repay_type >="
,
value
,
"repayType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeLessThan
(
String
value
)
{
addCriterion
(
"repay_type <"
,
value
,
"repayType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"repay_type <="
,
value
,
"repayType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeLike
(
String
value
)
{
addCriterion
(
"repay_type like"
,
value
,
"repayType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeNotLike
(
String
value
)
{
addCriterion
(
"repay_type not like"
,
value
,
"repayType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeIn
(
List
<
String
>
values
)
{
addCriterion
(
"repay_type in"
,
values
,
"repayType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"repay_type not in"
,
values
,
"repayType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"repay_type between"
,
value1
,
value2
,
"repayType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRepayTypeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"repay_type not between"
,
value1
,
value2
,
"repayType"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
src/main/java/com/jqtx/windows/repository/mapper/WindowsRetryMapper.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
repository
.
mapper
;
import
com.jqtx.windows.repository.entity.WindowsRetry
;
import
com.jqtx.windows.repository.entity.WindowsRetryExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
WindowsRetryMapper
{
long
countByExample
(
WindowsRetryExample
example
);
int
deleteByExample
(
WindowsRetryExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
WindowsRetry
row
);
int
insertSelective
(
WindowsRetry
row
);
List
<
WindowsRetry
>
selectByExample
(
WindowsRetryExample
example
);
WindowsRetry
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"row"
)
WindowsRetry
row
,
@Param
(
"example"
)
WindowsRetryExample
example
);
int
updateByExample
(
@Param
(
"row"
)
WindowsRetry
row
,
@Param
(
"example"
)
WindowsRetryExample
example
);
int
updateByPrimaryKeySelective
(
WindowsRetry
row
);
int
updateByPrimaryKey
(
WindowsRetry
row
);
}
\ No newline at end of file
src/main/java/com/jqtx/windows/service/SyncDataService.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
service
;
import
com.jqtx.windows.web.response.JsonResult
;
import
java.util.concurrent.Future
;
/**
* @Description:
* @Author: liyongen
* @Date: 2019/6/27 12:00
*/
public
interface
SyncDataService
{
/**
* 同步结果
* @param url
* @param body
* @return
*/
JsonResult
synResult
(
String
url
,
String
body
);
}
src/main/java/com/jqtx/windows/service/impl/SyncDataServiceImpl.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
service
.
impl
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.jqtx.windows.component.config.FeignUrlConfig
;
import
com.jqtx.windows.service.SyncDataService
;
import
com.jqtx.windows.utils.http.HttpUtil
;
import
com.jqtx.windows.web.response.JsonResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @Description:
* @Author: wuwei
* @Date: 2019/12/04 12:02
*/
@Service
public
class
SyncDataServiceImpl
implements
SyncDataService
{
@Autowired
private
FeignUrlConfig
feignUrlConfig
;
@Override
public
JsonResult
synResult
(
String
url
,
String
body
)
{
Map
<
String
,
String
>
headers
=
new
HashMap
<>();
headers
.
put
(
"secretKey"
,
feignUrlConfig
.
getSecretKey
());
String
resp
=
HttpUtil
.
doPost
(
url
,
headers
,
body
);
return
JSONObject
.
parseObject
(
resp
,
JsonResult
.
class
);
}
}
src/main/java/com/jqtx/windows/utils/DateUtils.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
utils
;
import
java.sql.Timestamp
;
import
java.time.*
;
import
java.util.Date
;
public
class
DateUtils
{
public
static
Date
toDate
(
LocalDateTime
localDateTime
)
{
Instant
instant
=
localDateTime
.
atZone
(
ZoneId
.
systemDefault
()).
toInstant
();
return
Date
.
from
(
instant
);
}
public
static
Date
toDate
(
LocalDate
localDate
)
{
Timestamp
timestamp
=
Timestamp
.
valueOf
(
localDate
.
atTime
(
LocalTime
.
MIDNIGHT
));
return
new
Date
(
timestamp
.
getTime
());
}
}
src/main/java/com/jqtx/windows/utils/http/HttpClientPools.java
0 → 100644
View file @
c90453d7
/**
* kevinGD.com Inc. Copyright (c) 2015-2016-2016 All Rights Reserved.
*/
package
com
.
jqtx
.
windows
.
utils
.
http
;
import
org.apache.commons.lang3.concurrent.BasicThreadFactory
;
import
org.apache.http.HttpEntityEnclosingRequest
;
import
org.apache.http.HttpRequest
;
import
org.apache.http.NameValuePair
;
import
org.apache.http.client.HttpRequestRetryHandler
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.client.protocol.HttpClientContext
;
import
org.apache.http.config.Registry
;
import
org.apache.http.config.RegistryBuilder
;
import
org.apache.http.conn.ConnectTimeoutException
;
import
org.apache.http.conn.socket.ConnectionSocketFactory
;
import
org.apache.http.conn.socket.LayeredConnectionSocketFactory
;
import
org.apache.http.conn.socket.PlainConnectionSocketFactory
;
import
org.apache.http.conn.ssl.SSLConnectionSocketFactory
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.impl.conn.PoolingHttpClientConnectionManager
;
import
org.apache.http.message.BasicNameValuePair
;
import
org.apache.http.protocol.HttpContext
;
import
org.apache.http.util.EntityUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
javax.net.ssl.SSLException
;
import
javax.net.ssl.SSLHandshakeException
;
import
java.io.IOException
;
import
java.io.InterruptedIOException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URI
;
import
java.net.UnknownHostException
;
import
java.util.*
;
import
java.util.concurrent.ScheduledExecutorService
;
import
java.util.concurrent.ScheduledThreadPoolExecutor
;
import
java.util.concurrent.TimeUnit
;
/**
* 为对外发http请求连接可复用作处理
* 采用PoolingHttpClientConnectionManager来管理client对象
*
* 详情参见{@link http://www.yeetrack.com/?p=782}
*
* @author jiadong.yejd
* @version $Id: HttpClientPools.java, v 0.1 2016年10月27日 下午5:17:31 jiadong.yejd Exp $
*/
public
class
HttpClientPools
{
/**logger*/
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
HttpClientPools
.
class
);
private
static
PoolingHttpClientConnectionManager
cm
=
null
;
/**
* ConnectTimeout服务器请求超时
* ConnectionRequestTimeout 建立请求超时
* SocketTimeout 服务器响应超时
*
*/
protected
static
RequestConfig
requestConfig
=
RequestConfig
.
custom
()
.
setConnectTimeout
(
5000
)
.
setConnectionRequestTimeout
(
3000
)
.
setSocketTimeout
(
8000
)
.
build
();
static
{
ConnectionSocketFactory
plainsf
=
PlainConnectionSocketFactory
.
getSocketFactory
();
LayeredConnectionSocketFactory
sslsf
=
SSLConnectionSocketFactory
.
getSocketFactory
();
Registry
<
ConnectionSocketFactory
>
registry
=
RegistryBuilder
.<
ConnectionSocketFactory
>
create
().
register
(
"http"
,
plainsf
).
register
(
"https"
,
sslsf
).
build
();
cm
=
new
PoolingHttpClientConnectionManager
(
registry
);
// 将最大连接数增加到200
cm
.
setMaxTotal
(
200
);
// 将每个路由基础的连接增加到200
cm
.
setDefaultMaxPerRoute
(
200
);
//连接池管理
IdleConnMonitorTask
idleConnMonitorTask
=
new
IdleConnMonitorTask
();
//org.apache.commons.lang3.concurrent.BasicThreadFactory
ScheduledExecutorService
executorService
=
new
ScheduledThreadPoolExecutor
(
1
,
new
BasicThreadFactory
.
Builder
().
namingPattern
(
"example-schedule-pool-%d"
).
daemon
(
true
).
build
());
executorService
.
scheduleAtFixedRate
(
idleConnMonitorTask
,
30
,
60
,
TimeUnit
.
SECONDS
);
//Timer timer = new Timer(true);
////1分钟执行一次
//timer.schedule(idleConnMonitorTask, 30 * 1000, 60 * 1000);
}
/**
* 它管理着连接池,可以同时为很多线程提供http连接请求
* 如果连接池有有可用的持久连接,连接管理器就会使用其中的一个,而不是再创建一个新的连接。
* PoolingClientConnectionManager会根据它的配置来分配请求连接,如果连接池中的所有连接都被占用了,那么后续的请求就会被阻塞,直到有连接被释放回连接池中
* @return
*/
public
static
CloseableHttpClient
getHttpClient
()
{
//请求重试处理
HttpRequestRetryHandler
httpRequestRetryHandler
=
new
RetryHandler
();
CloseableHttpClient
httpClient
=
HttpClients
.
custom
().
setConnectionManager
(
cm
)
.
setRetryHandler
(
httpRequestRetryHandler
).
build
();
return
httpClient
;
}
/**
* 构建Get请求方法
*
* @param url 请求地址
* @param paramMap 参数
* @param charSet 编码
* @return
* @throws Exception
*/
public
static
HttpGet
buildGet
(
String
url
,
Map
<
String
,
String
>
paramMap
,
String
charSet
)
throws
Exception
{
HttpGet
httpGet
=
new
HttpGet
(
url
);
httpGet
.
setConfig
(
requestConfig
);
List
<
NameValuePair
>
params
=
new
ArrayList
<
NameValuePair
>();
Set
<
String
>
keySet
=
paramMap
.
keySet
();
for
(
Iterator
<
String
>
it
=
keySet
.
iterator
();
it
.
hasNext
();
)
{
String
next
=
it
.
next
();
params
.
add
(
new
BasicNameValuePair
(
next
,
paramMap
.
get
(
next
)));
}
String
str
=
EntityUtils
.
toString
(
new
UrlEncodedFormEntity
(
params
,
charSet
));
httpGet
.
setURI
(
new
URI
(
url
+
"?"
+
str
));
return
httpGet
;
}
/**
* 构建Post请求方法
*
* @param url 请求地址
* @param paramMap 参数
* @param charSet 编码
* @return
* @throws UnsupportedEncodingException
*/
public
static
HttpPost
buildPost
(
String
url
,
Map
<
String
,
String
>
paramMap
,
String
charSet
)
throws
UnsupportedEncodingException
{
HttpPost
httpPost
=
new
HttpPost
(
url
);
httpPost
.
setConfig
(
requestConfig
);
httpPost
.
addHeader
(
"Content-Type"
,
"application/x-www-form-urlencoded;"
);
httpPost
.
addHeader
(
"charset="
,
charSet
);
List
<
NameValuePair
>
valuePairs
=
new
ArrayList
<
NameValuePair
>();
for
(
String
key
:
paramMap
.
keySet
())
{
valuePairs
.
add
(
new
BasicNameValuePair
(
key
,
(
String
)
paramMap
.
get
(
key
)));
}
httpPost
.
setEntity
(
new
UrlEncodedFormEntity
(
valuePairs
,
charSet
));
return
httpPost
;
}
/**
* 对失败的处理
*
* @author jiadong.yejd
* @version $Id: HttpClientPools.java, v 0.1 2016年10月27日 下午5:53:25 jiadong.yejd Exp $
*/
static
class
RetryHandler
implements
HttpRequestRetryHandler
{
@Override
public
boolean
retryRequest
(
IOException
exception
,
int
executionCount
,
HttpContext
context
)
{
if
(
executionCount
>=
3
)
{
// 如果已经重试了3次,就放弃
return
false
;
}
if
(
exception
instanceof
SSLHandshakeException
)
{
// 不要重试SSL握手异常
return
false
;
}
if
(
exception
instanceof
InterruptedIOException
)
{
// 超时
return
false
;
}
if
(
exception
instanceof
UnknownHostException
)
{
// 目标服务器不可达
return
false
;
}
if
(
exception
instanceof
ConnectTimeoutException
)
{
// 连接被拒绝
return
false
;
}
if
(
exception
instanceof
SSLException
)
{
// ssl握手异常
return
false
;
}
HttpClientContext
clientContext
=
HttpClientContext
.
adapt
(
context
);
HttpRequest
request
=
clientContext
.
getRequest
();
// 如果请求是幂等的,就再次尝试
if
(!(
request
instanceof
HttpEntityEnclosingRequest
))
{
return
true
;
}
return
false
;
}
}
/**
*
* @author liudehong
* @version $Id: HttpClientPools.java, v 0.1 2017年7月31日 下午4:48:48 liudehong Exp $
*/
private
static
class
IdleConnMonitorTask
extends
TimerTask
{
public
IdleConnMonitorTask
()
{
System
.
err
.
println
(
"IdleConnMonitorTask..."
);
}
@Override
public
void
run
()
{
try
{
// 关闭过期的连接
//cm.closeExpiredConnections();
//关闭3分钟内不活动的连接
cm
.
closeIdleConnections
(
3
,
TimeUnit
.
MINUTES
);
logger
.
warn
(
"http pool连接池回收成功,连接池的当前状态:"
+
cm
.
getTotalStats
());
}
catch
(
Throwable
ex
)
{
logger
.
error
(
"http连接池管理异常"
,
ex
);
}
}
}
}
src/main/java/com/jqtx/windows/utils/http/HttpUtil.java
0 → 100644
View file @
c90453d7
package
com
.
jqtx
.
windows
.
utils
.
http
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.NameValuePair
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.client.utils.HttpClientUtils
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.message.BasicNameValuePair
;
import
org.apache.http.util.EntityUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.util.CollectionUtils
;
import
java.io.IOException
;
import
java.net.URI
;
import
java.nio.charset.Charset
;
import
java.util.*
;
/**
* http工具类
*
* @author shaohai.zhao
* @version : HttpUtil.java, v 0.1 2018-08-08 19:30 shaohai.zhao Exp $
*/
public
class
HttpUtil
extends
HttpClientPools
{
/**
* logger
*/
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
HttpUtil
.
class
);
/**
* 发送 POST 请求(HTTP),K-V形式
*
* @param apiUrl API接口URL
* @param params 参数map
*/
public
static
String
doPost
(
String
apiUrl
,
Map
<
String
,
String
>
headers
,
Map
<
String
,
String
>
params
)
{
CloseableHttpClient
httpClient
=
HttpClients
.
createDefault
();
String
httpStr
=
null
;
HttpPost
httpPost
=
new
HttpPost
(
apiUrl
);
if
(!
CollectionUtils
.
isEmpty
(
headers
))
{
for
(
String
key
:
headers
.
keySet
())
{
httpPost
.
setHeader
(
key
,
headers
.
get
(
key
));
}
}
CloseableHttpResponse
response
=
null
;
try
{
httpPost
.
setConfig
(
requestConfig
);
List
<
NameValuePair
>
pairList
=
new
ArrayList
<
NameValuePair
>(
params
.
size
());
for
(
Map
.
Entry
<
String
,
String
>
entry
:
params
.
entrySet
())
{
NameValuePair
pair
=
new
BasicNameValuePair
(
entry
.
getKey
(),
entry
.
getValue
());
pairList
.
add
(
pair
);
}
httpPost
.
setEntity
(
new
UrlEncodedFormEntity
(
pairList
,
Charset
.
forName
(
"UTF-8"
)));
response
=
httpClient
.
execute
(
httpPost
);
HttpEntity
entity
=
response
.
getEntity
();
httpStr
=
EntityUtils
.
toString
(
entity
,
"UTF-8"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"http请求失败,失败信息"
+
e
.
getMessage
());
}
finally
{
if
(
response
!=
null
)
{
try
{
EntityUtils
.
consume
(
response
.
getEntity
());
}
catch
(
IOException
e
)
{
logger
.
error
(
"http请求失败,失败信息"
+
e
.
getMessage
());
}
}
}
return
httpStr
;
}
/**
* 发送 POST 请求(HTTP),JSON形式
*
* @param json json对象
*/
public
static
String
doPost
(
String
apiUrl
,
Map
<
String
,
String
>
headers
,
String
json
)
{
CloseableHttpClient
httpClient
=
HttpClients
.
createDefault
();
String
httpStr
=
null
;
HttpPost
httpPost
=
new
HttpPost
(
apiUrl
);
CloseableHttpResponse
response
=
null
;
if
(!
CollectionUtils
.
isEmpty
(
headers
))
{
for
(
String
key
:
headers
.
keySet
())
{
httpPost
.
setHeader
(
key
,
headers
.
get
(
key
));
}
}
try
{
httpPost
.
setConfig
(
requestConfig
);
StringEntity
stringEntity
=
new
StringEntity
(
json
,
"UTF-8"
);
//解决中文乱码问题
stringEntity
.
setContentEncoding
(
"UTF-8"
);
stringEntity
.
setContentType
(
"application/json"
);
httpPost
.
setEntity
(
stringEntity
);
response
=
httpClient
.
execute
(
httpPost
);
HttpEntity
entity
=
response
.
getEntity
();
httpStr
=
EntityUtils
.
toString
(
entity
,
"UTF-8"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"http请求失败,失败信息"
+
e
.
getMessage
());
}
finally
{
if
(
response
!=
null
)
{
try
{
EntityUtils
.
consume
(
response
.
getEntity
());
}
catch
(
IOException
e
)
{
logger
.
error
(
"http请求失败,失败信息"
+
e
.
getMessage
());
}
}
}
return
httpStr
;
}
/**
* 发送 SSL POST 请求(HTTPS),K-V形式
*
* @param apiUrl API接口URL
* @param params 参数map
*/
public
static
String
doPostSSL
(
String
apiUrl
,
Map
<
String
,
String
>
params
)
{
CloseableHttpClient
httpClient
=
getHttpClient
();
HttpPost
httpPost
=
new
HttpPost
(
apiUrl
);
CloseableHttpResponse
response
=
null
;
String
httpStr
=
null
;
try
{
httpPost
.
setConfig
(
requestConfig
);
List
<
NameValuePair
>
pairList
=
new
ArrayList
<
NameValuePair
>(
params
.
size
());
for
(
Map
.
Entry
<
String
,
String
>
entry
:
params
.
entrySet
())
{
NameValuePair
pair
=
new
BasicNameValuePair
(
entry
.
getKey
(),
entry
.
getValue
());
pairList
.
add
(
pair
);
}
httpPost
.
setEntity
(
new
UrlEncodedFormEntity
(
pairList
,
Charset
.
forName
(
"utf-8"
)));
response
=
httpClient
.
execute
(
httpPost
);
HttpEntity
entity
=
response
.
getEntity
();
httpStr
=
EntityUtils
.
toString
(
entity
,
"utf-8"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"请求通联服务异常,失败信息"
+
e
.
getMessage
());
}
finally
{
HttpClientUtils
.
closeQuietly
(
response
);
}
return
httpStr
;
}
/**
* 路由提交方法
*/
public
static
String
doPostAll
(
String
apiUrl
,
Map
<
String
,
String
>
params
)
{
if
(
apiUrl
==
null
)
{
return
null
;
}
if
(
apiUrl
.
indexOf
(
"https:"
)
!=
-
1
)
{
return
doPostSSL
(
apiUrl
,
params
);
}
return
doPost
(
apiUrl
,
null
,
params
);
}
public
static
String
doGet
(
String
url
,
Map
<
String
,
String
>
paramMap
)
{
CloseableHttpClient
httpClient
=
getHttpClient
();
HttpGet
httpGet
=
new
HttpGet
(
url
);
CloseableHttpResponse
response
=
null
;
String
httpStr
=
null
;
try
{
httpGet
.
setConfig
(
requestConfig
);
List
<
NameValuePair
>
params
=
new
ArrayList
<
NameValuePair
>();
if
(!
CollectionUtils
.
isEmpty
(
paramMap
))
{
Set
<
String
>
keySet
=
paramMap
.
keySet
();
for
(
Iterator
<
String
>
it
=
keySet
.
iterator
();
it
.
hasNext
();
)
{
String
next
=
it
.
next
();
params
.
add
(
new
BasicNameValuePair
(
next
,
paramMap
.
get
(
next
)));
}
}
String
str
=
EntityUtils
.
toString
(
new
UrlEncodedFormEntity
(
params
,
"utf-8"
));
httpGet
.
setURI
(
new
URI
(
url
+
"?"
+
str
));
response
=
httpClient
.
execute
(
httpGet
);
HttpEntity
entity
=
response
.
getEntity
();
httpStr
=
EntityUtils
.
toString
(
entity
,
"utf-8"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"请求服务异常,失败信息"
+
e
.
getMessage
());
}
finally
{
HttpClientUtils
.
closeQuietly
(
response
);
}
return
httpStr
;
}
}
src/main/resources/mybatis/mapper/WindowsRetryMapper.xml
0 → 100644
View file @
c90453d7
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jqtx.windows.repository.mapper.WindowsRetryMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jqtx.windows.repository.entity.WindowsRetry"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"biz_type"
jdbcType=
"VARCHAR"
property=
"bizType"
/>
<result
column=
"biz_code"
jdbcType=
"VARCHAR"
property=
"bizCode"
/>
<result
column=
"biz_state"
jdbcType=
"VARCHAR"
property=
"bizState"
/>
<result
column=
"push_date"
jdbcType=
"DATE"
property=
"pushDate"
/>
<result
column=
"gmt_created"
jdbcType=
"TIMESTAMP"
property=
"gmtCreated"
/>
<result
column=
"gmt_modified"
jdbcType=
"TIMESTAMP"
property=
"gmtModified"
/>
<result
column=
"memo"
jdbcType=
"VARCHAR"
property=
"memo"
/>
<result
column=
"repay_type"
jdbcType=
"VARCHAR"
property=
"repayType"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, biz_type, biz_code, biz_state, push_date, gmt_created, gmt_modified, memo, repay_type
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jqtx.windows.repository.entity.WindowsRetryExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from windows_retry
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from windows_retry
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from windows_retry
where id = #{id,jdbcType=INTEGER}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jqtx.windows.repository.entity.WindowsRetryExample"
>
delete from windows_retry
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jqtx.windows.repository.entity.WindowsRetry"
>
insert into windows_retry (id, biz_type, biz_code,
biz_state, push_date, gmt_created,
gmt_modified, memo, repay_type
)
values (#{id,jdbcType=INTEGER}, #{bizType,jdbcType=VARCHAR}, #{bizCode,jdbcType=VARCHAR},
#{bizState,jdbcType=VARCHAR}, #{pushDate,jdbcType=DATE}, #{gmtCreated,jdbcType=TIMESTAMP},
#{gmtModified,jdbcType=TIMESTAMP}, #{memo,jdbcType=VARCHAR}, #{repayType,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jqtx.windows.repository.entity.WindowsRetry"
>
insert into windows_retry
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"bizType != null"
>
biz_type,
</if>
<if
test=
"bizCode != null"
>
biz_code,
</if>
<if
test=
"bizState != null"
>
biz_state,
</if>
<if
test=
"pushDate != null"
>
push_date,
</if>
<if
test=
"gmtCreated != null"
>
gmt_created,
</if>
<if
test=
"gmtModified != null"
>
gmt_modified,
</if>
<if
test=
"memo != null"
>
memo,
</if>
<if
test=
"repayType != null"
>
repay_type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"bizType != null"
>
#{bizType,jdbcType=VARCHAR},
</if>
<if
test=
"bizCode != null"
>
#{bizCode,jdbcType=VARCHAR},
</if>
<if
test=
"bizState != null"
>
#{bizState,jdbcType=VARCHAR},
</if>
<if
test=
"pushDate != null"
>
#{pushDate,jdbcType=DATE},
</if>
<if
test=
"gmtCreated != null"
>
#{gmtCreated,jdbcType=TIMESTAMP},
</if>
<if
test=
"gmtModified != null"
>
#{gmtModified,jdbcType=TIMESTAMP},
</if>
<if
test=
"memo != null"
>
#{memo,jdbcType=VARCHAR},
</if>
<if
test=
"repayType != null"
>
#{repayType,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jqtx.windows.repository.entity.WindowsRetryExample"
resultType=
"java.lang.Long"
>
select count(*) from windows_retry
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update windows_retry
<set>
<if
test=
"row.id != null"
>
id = #{row.id,jdbcType=INTEGER},
</if>
<if
test=
"row.bizType != null"
>
biz_type = #{row.bizType,jdbcType=VARCHAR},
</if>
<if
test=
"row.bizCode != null"
>
biz_code = #{row.bizCode,jdbcType=VARCHAR},
</if>
<if
test=
"row.bizState != null"
>
biz_state = #{row.bizState,jdbcType=VARCHAR},
</if>
<if
test=
"row.pushDate != null"
>
push_date = #{row.pushDate,jdbcType=DATE},
</if>
<if
test=
"row.gmtCreated != null"
>
gmt_created = #{row.gmtCreated,jdbcType=TIMESTAMP},
</if>
<if
test=
"row.gmtModified != null"
>
gmt_modified = #{row.gmtModified,jdbcType=TIMESTAMP},
</if>
<if
test=
"row.memo != null"
>
memo = #{row.memo,jdbcType=VARCHAR},
</if>
<if
test=
"row.repayType != null"
>
repay_type = #{row.repayType,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"example != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update windows_retry
set id = #{row.id,jdbcType=INTEGER},
biz_type = #{row.bizType,jdbcType=VARCHAR},
biz_code = #{row.bizCode,jdbcType=VARCHAR},
biz_state = #{row.bizState,jdbcType=VARCHAR},
push_date = #{row.pushDate,jdbcType=DATE},
gmt_created = #{row.gmtCreated,jdbcType=TIMESTAMP},
gmt_modified = #{row.gmtModified,jdbcType=TIMESTAMP},
memo = #{row.memo,jdbcType=VARCHAR},
repay_type = #{row.repayType,jdbcType=VARCHAR}
<if
test=
"example != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jqtx.windows.repository.entity.WindowsRetry"
>
update windows_retry
<set>
<if
test=
"bizType != null"
>
biz_type = #{bizType,jdbcType=VARCHAR},
</if>
<if
test=
"bizCode != null"
>
biz_code = #{bizCode,jdbcType=VARCHAR},
</if>
<if
test=
"bizState != null"
>
biz_state = #{bizState,jdbcType=VARCHAR},
</if>
<if
test=
"pushDate != null"
>
push_date = #{pushDate,jdbcType=DATE},
</if>
<if
test=
"gmtCreated != null"
>
gmt_created = #{gmtCreated,jdbcType=TIMESTAMP},
</if>
<if
test=
"gmtModified != null"
>
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
</if>
<if
test=
"memo != null"
>
memo = #{memo,jdbcType=VARCHAR},
</if>
<if
test=
"repayType != null"
>
repay_type = #{repayType,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jqtx.windows.repository.entity.WindowsRetry"
>
update windows_retry
set biz_type = #{bizType,jdbcType=VARCHAR},
biz_code = #{bizCode,jdbcType=VARCHAR},
biz_state = #{bizState,jdbcType=VARCHAR},
push_date = #{pushDate,jdbcType=DATE},
gmt_created = #{gmtCreated,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
memo = #{memo,jdbcType=VARCHAR},
repay_type = #{repayType,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment