Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-cost
Overview
Overview
Details
Activity
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
huluobin
bailuntec-cost
Commits
c3000dc9
Commit
c3000dc9
authored
Feb 25, 2021
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
# 更新
parent
262d8c52
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
14 deletions
+71
-14
UserCostFinansysController.java
...er/module/cost/controller/UserCostFinansysController.java
+3
-7
UserCostFinansysDao.java
...va/com/blt/other/module/cost/dao/UserCostFinansysDao.java
+7
-1
UserCostFinansysService.java
...lt/other/module/cost/service/UserCostFinansysService.java
+7
-1
UserCostFinansysServiceImpl.java
...module/cost/service/impl/UserCostFinansysServiceImpl.java
+5
-5
UserCostFinansysMapper.xml
...vice/src/main/resources/mapper/UserCostFinansysMapper.xml
+8
-0
UserCostFinansysServiceImplTest.java
...le/cost/service/impl/UserCostFinansysServiceImplTest.java
+41
-0
No files found.
cost-service/src/main/java/com/blt/other/module/cost/controller/UserCostFinansysController.java
View file @
c3000dc9
...
...
@@ -6,10 +6,7 @@ import com.blt.other.common.util.AxiosUtil;
import
com.blt.other.database.model.UserCostFinansysDomain
;
import
com.blt.other.module.cost.service.UserCostFinansysService
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -51,10 +48,9 @@ public class UserCostFinansysController {
}
@PostMapping
(
"/getAllFinansysRecord"
)
public
Map
<
String
,
Object
>
getAllFinansysRecord
(
HttpServletResponse
response
,
HttpServletRequest
request
)
{
AxiosUtil
.
setCors
(
response
,
request
);
public
Map
<
String
,
Object
>
getAllFinansysRecord
(
@RequestParam
(
required
=
false
)
String
key
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
List
<
UserCostFinansysDomain
>
list
=
userCostFinansysService
.
getAllFinancesRecord
();
List
<
UserCostFinansysDomain
>
list
=
userCostFinansysService
.
getAllFinancesRecord
(
key
);
result
.
put
(
"success"
,
true
);
result
.
put
(
"allFinansys"
,
list
);
return
result
;
...
...
cost-service/src/main/java/com/blt/other/module/cost/dao/UserCostFinansysDao.java
View file @
c3000dc9
...
...
@@ -20,7 +20,13 @@ public interface UserCostFinansysDao extends BaseMapper<UserCostFinansysDomain>
UserCostFinansysDomain
selectByDetail
(
UserCostFinansysDomain
userCostFinansysDomain
);
List
<
UserCostFinansysDomain
>
selectAll
();
/**
* 搜索历史
*
* @param key key
* @return res
*/
List
<
UserCostFinansysDomain
>
selectAll
(
String
key
);
/**
* 从财务系统同步财务账号信息时查询是否已存在
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/UserCostFinansysService.java
View file @
c3000dc9
...
...
@@ -30,7 +30,13 @@ public interface UserCostFinansysService {
UserCostFinansysDomain
getByUserCostFinancesDetail
(
UserCostFinansysDomain
userCostFinansysDomain
);
List
<
UserCostFinansysDomain
>
getAllFinancesRecord
();
/**
* 查询历史银行卡信息
*
* @param key 模糊匹配key
* @return res
*/
List
<
UserCostFinansysDomain
>
getAllFinancesRecord
(
String
key
);
String
syncUserFinance
();
...
...
cost-service/src/main/java/com/blt/other/module/cost/service/impl/UserCostFinansysServiceImpl.java
View file @
c3000dc9
...
...
@@ -7,15 +7,15 @@ import com.bailuntec.cost.api.dto.LogisticsFinansysDto;
import
com.bailuntec.cost.api.dto.SubLogisticsFinansysDto
;
import
com.blt.other.common.config.property.CostUrlProperties
;
import
com.blt.other.common.util.MyMapperUtil
;
import
com.blt.other.database.model.CostPlanDomain
;
import
com.blt.other.database.model.UserCostFinansysDomain
;
import
com.blt.other.database.model.UserDomain
;
import
com.blt.other.module.auth.dao.UserDao
;
import
com.blt.other.module.cost.dao.UserCostFinansysDao
;
import
com.blt.other.module.cost.model.CostDomain
;
import
com.blt.other.module.cost.service.UserCostFinansysService
;
import
com.blt.other.module.cost.vo.UserCostFinansysVo
;
import
com.blt.other.module.cost.vo.UserFinansysVo
;
import
com.blt.other.database.model.CostPlanDomain
;
import
com.blt.other.database.model.UserCostFinansysDomain
;
import
com.blt.other.database.model.UserDomain
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -80,8 +80,8 @@ public class UserCostFinansysServiceImpl implements UserCostFinansysService {
}
@Override
public
List
<
UserCostFinansysDomain
>
getAllFinancesRecord
()
{
List
<
UserCostFinansysDomain
>
list
=
userCostFinansysDao
.
selectAll
();
public
List
<
UserCostFinansysDomain
>
getAllFinancesRecord
(
String
key
)
{
List
<
UserCostFinansysDomain
>
list
=
userCostFinansysDao
.
selectAll
(
key
);
return
list
;
}
...
...
cost-service/src/main/resources/mapper/UserCostFinansysMapper.xml
View file @
c3000dc9
...
...
@@ -38,7 +38,15 @@
<select
id=
"selectAll"
resultType=
"com.blt.other.database.model.UserCostFinansysDomain"
>
SELECT *
FROM user_cost_finansys
<if
test=
"key!=null and key !='' "
>
where (bank_card like concat('%',#{key},'%')
or bank_name like concat('%',#{key},'%')
or bank_card_user like concat('%',#{key},'%')
or bank_company like concat('%',#{key},'%')
)
</if>
ORDER BY id DESC
limit 10
</select>
<select
id=
"selectByBankInfo"
resultType=
"com.blt.other.database.model.UserCostFinansysDomain"
>
...
...
cost-service/src/test/java/com/blt/other/module/cost/service/impl/UserCostFinansysServiceImplTest.java
0 → 100644
View file @
c3000dc9
package
com
.
blt
.
other
.
module
.
cost
.
service
.
impl
;
import
com.bailuntec.common.JsonUtilByFsJson
;
import
com.blt.other.database.model.UserCostFinansysDomain
;
import
com.blt.other.module.cost.service.UserCostFinansysService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.ActiveProfiles
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2021/2/25 1:58 下午
*/
@Transactional
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
@ActiveProfiles
(
"prod"
)
@Slf4j
public
class
UserCostFinansysServiceImplTest
{
@Resource
UserCostFinansysService
userCostFinansysService
;
@Test
public
void
getAllFinancesRecord
()
{
List
<
UserCostFinansysDomain
>
userCostFinansysDomainList
=
userCostFinansysService
.
getAllFinancesRecord
(
"test"
);
log
.
info
(
"res:{}"
,
JsonUtilByFsJson
.
beanToJson
(
userCostFinansysDomainList
));
}
}
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