Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Data-王博
finance-api
Commits
bd2a7365
Commit
bd2a7365
authored
Feb 25, 2017
by
Data-王博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
湖北消金 - 为上线做准备 提供修改接口。
parent
7d920cda
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
1 deletion
+37
-1
SystemToolsController.java
...uantgroup/financial/controller/SystemToolsController.java
+10
-0
IPaymentDao.java
src/main/java/cn/quantgroup/financial/dao/IPaymentDao.java
+2
-0
PaymentDaoImpl.java
...java/cn/quantgroup/financial/dao/impl/PaymentDaoImpl.java
+5
-0
PaymentDetailMapper.java
...a/cn/quantgroup/financial/mapper/PaymentDetailMapper.java
+1
-0
IApiCommonService.java
...va/cn/quantgroup/financial/service/IApiCommonService.java
+1
-0
ApiCommonServiceImpl.java
...antgroup/financial/service/impl/ApiCommonServiceImpl.java
+8
-0
PaymentDetailMapper.xml
src/main/resources/mapper/PaymentDetailMapper.xml
+3
-0
ApiCommonServiceTest.java
...cn/quantgroup/financial/service/ApiCommonServiceTest.java
+7
-1
No files found.
src/main/java/cn/quantgroup/financial/controller/SystemToolsController.java
View file @
bd2a7365
...
...
@@ -3,6 +3,7 @@ package cn.quantgroup.financial.controller;
import
cn.quantgroup.financial.json.JsonResult
;
import
cn.quantgroup.financial.model.MailInfo
;
import
cn.quantgroup.financial.model.PaymentDetail
;
import
cn.quantgroup.financial.service.IApiCommonService
;
import
cn.quantgroup.financial.service.sys.IMailService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -18,6 +19,9 @@ public class SystemToolsController {
@Autowired
private
IMailService
mailService
;
@Autowired
private
IApiCommonService
apiCommonService
;
@RequestMapping
(
value
=
"/mailinfo/save"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
JsonResult
saveMailInfo
(
@RequestBody
MailInfo
mailInfo
){
Long
mailId
=
null
;
...
...
@@ -35,4 +39,10 @@ public class SystemToolsController {
}
return
JsonResult
.
SUCCESS
(
row
);
}
@RequestMapping
(
value
=
"/payment/update"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
,
RequestMethod
.
DELETE
})
public
@ResponseBody
JsonResult
updateContractNo
(
@RequestParam
(
"contractNo"
)
String
contractNo
,
@RequestParam
(
"loanHistoryId"
)
Long
loanHistoryId
){
Integer
row
=
apiCommonService
.
updateMerchantContractNo
(
contractNo
,
loanHistoryId
);
return
JsonResult
.
SUCCESS
(
row
);
}
}
src/main/java/cn/quantgroup/financial/dao/IPaymentDao.java
View file @
bd2a7365
...
...
@@ -77,4 +77,6 @@ public interface IPaymentDao {
List
<
Long
>
getIdListBeforeCompensationDate
(
Date
compensationDate
);
Integer
updateBatchCompensationStatusBeforeDate
(
Date
beforeDate
,
Byte
compensationStatus
);
Integer
updateMerchantContractNo
(
String
contractNo
,
Long
loanHistoryId
);
}
src/main/java/cn/quantgroup/financial/dao/impl/PaymentDaoImpl.java
View file @
bd2a7365
...
...
@@ -161,4 +161,9 @@ public class PaymentDaoImpl implements IPaymentDao {
Integer
row
=
repaymentPlanDetailMapper
.
updateBatchCompensationStatusBeforeDate
(
beforeDate
,
compensationStatus
);
return
row
;
}
@Override
public
Integer
updateMerchantContractNo
(
String
contractNo
,
Long
loanHistoryId
){
return
paymentDetailMapper
.
updateMerchantContractNoByLoanHistoryId
(
contractNo
,
loanHistoryId
);
}
}
src/main/java/cn/quantgroup/financial/mapper/PaymentDetailMapper.java
View file @
bd2a7365
...
...
@@ -15,6 +15,7 @@ public interface PaymentDetailMapper {
PaymentDetail
getByLoanHistoryId
(
@Param
(
"loanHistoryId"
)
Long
loanHistoryId
);
int
insertSelective
(
PaymentDetail
record
);
int
updateMerchantContractNoByLoanHistoryId
(
@Param
(
"contractNo"
)
String
contractNo
,
@Param
(
"loanHistoryId"
)
Long
loanHistoryId
);
PaymentDetail
selectByPrimaryKey
(
Long
id
);
...
...
src/main/java/cn/quantgroup/financial/service/IApiCommonService.java
View file @
bd2a7365
...
...
@@ -17,4 +17,5 @@ public interface IApiCommonService {
Integer
savePaymentDetailAndRepaymentPlan
(
PaymentDetail
paymentDetail
)
throws
FieldInsufficientException
;
PaymentDetail
queryData
(
Long
loanHistoryId
,
Long
repaymentPlanId
);
Integer
updateBatchStatus
(
Date
beforeDate
,
Byte
compensationStatus
);
Integer
updateMerchantContractNo
(
String
contractNo
,
Long
loanHistoryId
);
}
src/main/java/cn/quantgroup/financial/service/impl/ApiCommonServiceImpl.java
View file @
bd2a7365
...
...
@@ -110,4 +110,12 @@ public class ApiCommonServiceImpl implements IApiCommonService {
return
iPaymentDao
.
updateBatchCompensationStatusBeforeDate
(
beforeDate
,
compensationStatus
);
}
@Override
public
Integer
updateMerchantContractNo
(
String
contractNo
,
Long
loanHistoryId
)
{
if
(
StringUtils
.
isEmpty
(
contractNo
)||
loanHistoryId
==
null
){
return
0
;
}
return
iPaymentDao
.
updateMerchantContractNo
(
contractNo
,
loanHistoryId
);
}
}
src/main/resources/mapper/PaymentDetailMapper.xml
View file @
bd2a7365
...
...
@@ -74,6 +74,9 @@
#{loanCreateAt,jdbcType=TIMESTAMP}, #{contractTotalTerm,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<update
id=
"updateMerchantContractNoByLoanHistoryId"
parameterType=
"java.util.Map"
>
UPDATE paymentdetail SET merchantContractNo=#{contractNo} WHERE loanHistoryId=#{loanHistoryId} LIMIT 1;
</update>
<insert
id=
"insertSelective"
parameterType=
"cn.quantgroup.financial.model.PaymentDetail"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into paymentdetail
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
src/test/java/cn/quantgroup/financial/service/ApiCommonServiceTest.java
View file @
bd2a7365
...
...
@@ -29,7 +29,7 @@ import java.util.List;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
BootStarter
.
class
)
@WebAppConfiguration
@ActiveProfiles
(
"
local
"
)
@ActiveProfiles
(
"
test
"
)
public
class
ApiCommonServiceTest
{
@Autowired
...
...
@@ -122,5 +122,11 @@ public class ApiCommonServiceTest {
iApiCommonService
.
updateBatchStatus
(
new
Date
(),
CompensationStatus
.
already_status
.
get
());
}
@Test
public
void
testUpdateMerchantContractNo
(){
//HT100000201611250020530
Integer
row
=
iApiCommonService
.
updateMerchantContractNo
(
"HT100000201611250020530"
,
32618252L
);
logger
.
info
(
"update row={}"
,
row
);
}
}
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