Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bb
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
abs_pom
bb
Commits
400b1a89
Commit
400b1a89
authored
Apr 22, 2020
by
zhaoyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
f2bb13df
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
219 additions
and
21 deletions
+219
-21
app/biz/service/src/main/java/com/abssqr/plat/biz/api/astPool/AstPoolServiceImpl.java
+14
-4
app/common/dal/dalgen/AbssqrCoreTables/ABS_AST_POOL.xml
+2
-1
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/AstPoolDOMapper.xml
+4
-2
app/common/facade/src/main/java/com/abssqr/plat/common/facade/result/astPool/AstPoolVO.java
+6
-5
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/AstPoolConvert.java
+2
-2
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/astPool/AstPoolRepository.java
+1
-1
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/astPool/impl/AstPoolRepositoryImpl.java
+1
-6
app/test/src/test/java/com/abssqr/plat/test/unittest/astPool/AstPoolAddUnitTest.java
+35
-0
app/test/src/test/java/com/abssqr/plat/test/unittest/astPool/AstPoolGetUnitTest.java
+30
-0
app/test/src/test/java/com/abssqr/plat/test/unittest/astPool/AstPoolPageUnitTest.java
+32
-0
app/test/src/test/resources/testdata/unittest/astPool/add/astPool_add_case0001.yaml
+29
-0
app/test/src/test/resources/testdata/unittest/astPool/get/astPool_get_case0001.yaml
+31
-0
app/test/src/test/resources/testdata/unittest/astPool/list/astPool_list_case0001.yaml
+32
-0
No files found.
app/biz/service/src/main/java/com/abssqr/plat/biz/api/astPool/AstPoolServiceImpl.java
View file @
400b1a89
...
...
@@ -2,7 +2,6 @@ package com.abssqr.plat.biz.api.astPool;
import
com.abssqr.plat.biz.support.ServiceSupport
;
import
com.abssqr.plat.common.dal.mysql.auto.paging.AstPoolPage
;
import
com.abssqr.plat.common.dal.mysql.auto.resultmap.AstPoolLoan
;
import
com.abssqr.plat.common.dal.mysql.auto.resultmap.AstPoolLoanStat
;
import
com.abssqr.plat.common.facade.base.BaseStringParam
;
import
com.abssqr.plat.common.facade.enums.AstTypeEnum
;
...
...
@@ -14,7 +13,6 @@ import com.abssqr.plat.common.facade.result.astPool.AstPoolVO;
import
com.abssqr.plat.common.facade.service.AstPoolService
;
import
com.abssqr.plat.common.facade.validation.Valid
;
import
com.abssqr.plat.common.model.convertor.AstPoolConvert
;
import
com.abssqr.plat.common.model.convertor.LoanConvert
;
import
com.abssqr.plat.common.model.domain.ast.AstPoolEntity
;
import
com.abssqr.plat.common.model.enums.IdTypeEnum
;
import
com.abssqr.plat.common.model.repo.ast.LoanRepository
;
...
...
@@ -50,9 +48,12 @@ public class AstPoolServiceImpl extends ServiceSupport implements AstPoolService
return
super
.
doOpr
(
astPoolOprParam
,()->{
AstPoolEntity
astPoolEntity
=
new
AstPoolEntity
();
astPoolEntity
.
setAstTypeEnum
(
AstTypeEnum
.
getByCode
(
astPoolOprParam
.
getAstType
()));
//如果前端传入产品编号为空则将资产类型编号作为产品编号
if
(
StringUtils
.
isEmpty
(
astPool
Entity
.
getProdNo
())){
if
(
StringUtils
.
isEmpty
(
astPool
OprParam
.
getProdNo
())){
astPoolEntity
.
setProdNo
(
astPoolOprParam
.
getAstType
());
}
else
{
astPoolEntity
.
setProdNo
(
astPoolOprParam
.
getProdNo
());
}
astPoolEntity
.
setAstPoolNo
(
SequenceUtil
.
genId
(
IdTypeEnum
.
AST_POOL_CODE
));
astPoolEntity
.
setAstPoolName
(
astPoolOprParam
.
getAstPoolName
());
...
...
@@ -73,7 +74,16 @@ public class AstPoolServiceImpl extends ServiceSupport implements AstPoolService
public
BasePage
<
AstPoolVO
>
page
(
@Valid
AstPoolPageQryParam
astPoolPageQryParam
)
{
return
super
.
doQry
(
astPoolPageQryParam
,()->{
BasePage
<
AstPoolVO
>
result
=
new
BasePage
();
AstPoolPage
page
=
astPoolRepository
.
getPage
(
astPoolPageQryParam
);
//组装Page对象
String
astPoolName
=
astPoolPageQryParam
.
getAstPoolName
();
AstPoolPage
astPoolPage
=
new
AstPoolPage
();
astPoolPage
.
setAstPoolName
(
astPoolName
);
astPoolPage
.
setLimit
(
astPoolPageQryParam
.
getPageSize
());
astPoolPage
.
setCurrPageNo
(
astPoolPageQryParam
.
getPageNum
());
//组装返回Page对象
AstPoolPage
page
=
astPoolRepository
.
getPage
(
astPoolPage
);
result
.
setDatas
(
AstPoolConvert
.
convert2VOs
(
page
.
getDatas
()));
result
.
setCurrPageNo
(
page
.
getCurrPageNo
());
result
.
setTotal
(
page
.
getTotal
());
...
...
app/common/dal/dalgen/AbssqrCoreTables/ABS_AST_POOL.xml
View file @
400b1a89
...
...
@@ -91,8 +91,9 @@
SELECT *
FROM ABS_AST_POOL
WHERE
1=1
<if
test=
"astPoolName!=null and astPoolName != ''"
>
AST_POOL_NAME = #{astPoolName,jdbcType=VARCHAR}
AND AST_POOL_NAME like CONCAT(CONCAT('%',#{astPoolName,jdbcType=VARCHAR}),'%')
</if>
</operation>
...
...
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/AstPoolDOMapper.xml
View file @
400b1a89
...
...
@@ -91,8 +91,9 @@
FROM
ABS_AST_POOL
WHERE
1=1
<if
test=
"astPoolName!=null and astPoolName != ''"
>
AST_POOL_NAME = #{astPoolName,jdbcType=VARCHAR}
AND AST_POOL_NAME like CONCAT(CONCAT('%',#{astPoolName,jdbcType=VARCHAR}),'%')
</if>
</select>
<!--分页查找资产池 pageResult mydalgen自动生成,请勿修改-->
...
...
@@ -106,8 +107,9 @@
SELECT /*MS-ABS-AST-POOL-GETPAGE*/
<include
refid=
"Base_Column_List"
/>
FROM ABS_AST_POOL
WHERE
1=1
<if
test=
"astPoolName!=null and astPoolName != ''"
>
AST_POOL_NAME = #{astPoolName,jdbcType=VARCHAR}
AND AST_POOL_NAME like CONCAT(CONCAT('%',#{astPoolName,jdbcType=VARCHAR}),'%')
</if>
) tt where ROWNUM
<
= #{endRow}
) table_alias
...
...
app/common/facade/src/main/java/com/abssqr/plat/common/facade/result/astPool/AstPoolVO.java
View file @
400b1a89
package
com
.
abssqr
.
plat
.
common
.
facade
.
result
.
astPool
;
import
com.abssqr.plat.common.facade.enums.AstTypeEnum
;
import
com.general.system.common.model.BaseEntity
;
import
com.general.system.common.model.Money
;
...
...
@@ -9,7 +10,7 @@ public class AstPoolVO extends BaseEntity implements Serializable {
//资产池名称
private
String
astPoolName
;
//准入资产名称
private
String
astTypeNam
e
;
private
AstTypeEnum
astTyp
e
;
//准入资产代码
private
String
prodNo
;
...
...
@@ -32,12 +33,12 @@ public class AstPoolVO extends BaseEntity implements Serializable {
this
.
astPoolName
=
astPoolName
;
}
public
String
getAstTypeNam
e
()
{
return
astType
Name
;
public
AstTypeEnum
getAstTyp
e
()
{
return
astType
;
}
public
void
setAstType
Name
(
String
astTypeNam
e
)
{
this
.
astType
Name
=
astTypeNam
e
;
public
void
setAstType
(
AstTypeEnum
astTyp
e
)
{
this
.
astType
=
astTyp
e
;
}
public
String
getProdNo
()
{
...
...
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/AstPoolConvert.java
View file @
400b1a89
...
...
@@ -49,7 +49,7 @@ public class AstPoolConvert {
return
null
;
}
AstPoolVO
result
=
new
AstPoolVO
();
result
.
setAstType
Name
(
AstTypeEnum
.
getByCode
(
param
.
getAstType
()).
getDesc
(
));
result
.
setAstType
(
AstTypeEnum
.
getByCode
(
param
.
getAstType
()
));
result
.
setAstPoolName
(
param
.
getAstPoolName
());
result
.
setProdNo
(
param
.
getProdNo
());
return
result
;
...
...
@@ -60,7 +60,7 @@ public class AstPoolConvert {
return
null
;
}
AstPoolVO
result
=
new
AstPoolVO
();
result
.
setAstType
Name
(
param
.
getAstTypeEnum
().
getDesc
());
result
.
setAstType
(
param
.
getAstTypeEnum
());
result
.
setProdNo
(
param
.
getProdNo
());
result
.
setAstPoolName
(
param
.
getAstPoolName
());
return
result
;
...
...
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/astPool/AstPoolRepository.java
View file @
400b1a89
...
...
@@ -26,7 +26,7 @@ public interface AstPoolRepository {
int
create
(
AstPoolEntity
astPoolEntity
);
AstPoolPage
getPage
(
AstPoolPage
QryParam
astPoolPageQryParam
);
AstPoolPage
getPage
(
AstPoolPage
astPoolPage
);
AstPoolEntity
getByAstPoolNo
(
String
astPoolNo
);
...
...
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/astPool/impl/AstPoolRepositoryImpl.java
View file @
400b1a89
...
...
@@ -32,12 +32,7 @@ public class AstPoolRepositoryImpl implements AstPoolRepository {
}
@Override
public
AstPoolPage
getPage
(
AstPoolPageQryParam
astPoolPageQryParam
)
{
String
astPoolName
=
astPoolPageQryParam
.
getAstPoolName
();
AstPoolPage
astPoolPage
=
new
AstPoolPage
();
astPoolPage
.
setAstPoolName
(
astPoolName
);
astPoolPage
.
setLimit
(
astPoolPageQryParam
.
getPageSize
());
astPoolPage
.
setCurrPageNo
(
astPoolPageQryParam
.
getPageNum
());
public
AstPoolPage
getPage
(
AstPoolPage
astPoolPage
)
{
AstPoolPage
page
=
astPoolDAO
.
getPage
(
astPoolPage
);
return
page
;
}
...
...
app/test/src/test/java/com/abssqr/plat/test/unittest/astPool/AstPoolAddUnitTest.java
0 → 100644
View file @
400b1a89
package
com
.
abssqr
.
plat
.
test
.
unittest
.
astPool
;
/**
* abssqr.com Inc.
* Copyright (c) 2017-2020 All Rights Reserved.
*/
import
com.abssqr.plat.common.facade.param.astPool.AstPoolOprParam
;
import
com.abssqr.plat.common.facade.service.AstPoolService
;
import
com.abssqr.plat.test.BaseAutoTests
;
import
com.abssqr.test.annotation.XTest
;
import
com.abssqr.test.icase.ICase
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.testng.annotations.Test
;
/**
* 资产池新增测试
*/
public
class
AstPoolAddUnitTest
extends
BaseAutoTests
{
@Autowired
private
AstPoolService
astPoolService
;
@XTest
(
relatePath
=
"unittest/astPool/add"
)
@Test
(
dataProvider
=
"YamlDataProvider"
,
description
=
"资产池新增"
)
public
void
add
(
ICase
iCase
,
AstPoolOprParam
packOprParam
)
{
try
{
astPoolService
.
add
(
packOprParam
);
}
finally
{
// 校验数据
super
.
checkDB
(
iCase
);
// super.clearDB(iCase);
}
}
}
app/test/src/test/java/com/abssqr/plat/test/unittest/astPool/AstPoolGetUnitTest.java
0 → 100644
View file @
400b1a89
package
com
.
abssqr
.
plat
.
test
.
unittest
.
astPool
;
import
com.abssqr.plat.common.facade.result.astPool.AstPoolVO
;
import
com.abssqr.plat.common.facade.service.AstPoolService
;
import
com.abssqr.plat.test.BaseAutoTests
;
import
com.abssqr.test.annotation.XTest
;
import
com.abssqr.test.icase.ICase
;
import
com.general.system.common.util.VarChecker
;
import
com.google.gson.Gson
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.testng.annotations.Test
;
public
class
AstPoolGetUnitTest
extends
BaseAutoTests
{
@Autowired
private
AstPoolService
astPoolService
;
@XTest
(
relatePath
=
"unittest/astPool/get"
)
@Test
(
dataProvider
=
"YamlDataProvider"
,
description
=
"资产池详情查询"
)
public
void
add
(
ICase
iCase
,
String
astPoolNo
,
String
checkGet
)
{
try
{
AstPoolVO
astPoolVO
=
astPoolService
.
get
(
astPoolNo
);
String
s
=
new
Gson
().
toJson
(
astPoolVO
);
VarChecker
.
checkArgument
(
s
.
equals
(
checkGet
),
"逾期结果错误"
);
}
finally
{
// 校验数据
super
.
checkDB
(
iCase
);
// super.clearDB(iCase);
}
}
}
app/test/src/test/java/com/abssqr/plat/test/unittest/astPool/AstPoolPageUnitTest.java
0 → 100644
View file @
400b1a89
package
com
.
abssqr
.
plat
.
test
.
unittest
.
astPool
;
import
com.abssqr.plat.common.facade.param.astPool.AstPoolPageQryParam
;
import
com.abssqr.plat.common.facade.result.BasePage
;
import
com.abssqr.plat.common.facade.result.astPool.AstPoolVO
;
import
com.abssqr.plat.common.facade.service.AstPoolService
;
import
com.abssqr.plat.test.BaseAutoTests
;
import
com.abssqr.test.annotation.XTest
;
import
com.abssqr.test.icase.ICase
;
import
com.general.system.common.util.VarChecker
;
import
com.google.gson.Gson
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.testng.annotations.Test
;
public
class
AstPoolPageUnitTest
extends
BaseAutoTests
{
@Autowired
private
AstPoolService
astPoolService
;
@XTest
(
relatePath
=
"unittest/astPool/list"
)
@Test
(
dataProvider
=
"YamlDataProvider"
,
description
=
"资产池列表查询"
)
public
void
add
(
ICase
iCase
,
AstPoolPageQryParam
astPoolPageQryParam
,
String
checkGet
)
{
try
{
BasePage
<
AstPoolVO
>
page
=
astPoolService
.
page
(
astPoolPageQryParam
);
String
s
=
new
Gson
().
toJson
(
page
);
VarChecker
.
checkArgument
(
s
.
equals
(
checkGet
),
"逾期结果错误"
);
}
finally
{
// 校验数据
super
.
checkDB
(
iCase
);
// super.clearDB(iCase);
}
}
}
app/test/src/test/resources/testdata/unittest/astPool/add/astPool_add_case0001.yaml
0 → 100644
View file @
400b1a89
---
!!com.abssqr.test.icase.Case
id
:
astPool_add_case0001
desc
:
资产池新增测试
context
:
clearDBContext
:
-
ABS_AST_POOL
:
AST_TYPE
:
BL
-
ABS_AST_PACK
:
AST_TYPE
:
BL
initDBContext
:
checkDBContext
:
-
ABS_AST_POOL
:
AST_POOL_NAME
:
测试资产池
AST_TYPE
:
BL
PROD_NO[C]
:
TEST_PROD_NO1
-
ABS_AST_PACK
:
AST_TYPE[C]
:
BL
STATUS
:
init
PACK_TYPE
:
default
###
---
!!com.abssqr.plat.common.facade.param.astPool.AstPoolOprParam
astPoolName
:
测试资产池
astType
:
BL
prodNo
:
TEST_PROD_NO1
\ No newline at end of file
app/test/src/test/resources/testdata/unittest/astPool/get/astPool_get_case0001.yaml
0 → 100644
View file @
400b1a89
---
!!com.abssqr.test.icase.Case
id
:
astPool_get_case0001
desc
:
资产池详情查询测试
context
:
clearDBContext
:
-
ABS_AST_POOL
:
AST_TYPE
:
BL
-
ABS_AST_PACK
:
AST_TYPE
:
BL
initDBContext
:
-
ABS_AST_POOL
:
ID
:
"
{nextval}"
AST_POOL_NAME
:
测试资产池
AST_TYPE
:
BL
AST_POOL_NO
:
ASTPOOL2020042118092600425385
PROD_NO
:
testProdNo1
checkDBContext
:
## astPoolNo
---
"
ASTPOOL2020042118092600425385"
## checkGet
---
'
{"astPoolName":"测试资产池","astType":"BL","prodNo":"testProdNo1","astAmt":{"cent":0,"currency":"CNY","currencyValue":"156"},"astCnt":0,"packedAstAmt":{"cent":0,"currency":"CNY","currencyValue":"156"},"packedAstCnt":0}'
\ No newline at end of file
app/test/src/test/resources/testdata/unittest/astPool/list/astPool_list_case0001.yaml
0 → 100644
View file @
400b1a89
---
!!com.abssqr.test.icase.Case
id
:
astPool_list_case0001
desc
:
资产池列表查询测试
context
:
clearDBContext
:
-
ABS_AST_POOL
:
-
ABS_AST_PACK
:
AST_TYPE
:
BL
initDBContext
:
-
ABS_AST_POOL
:
ID
:
"
{nextval}"
AST_POOL_NAME
:
测试资产池
AST_TYPE
:
BL
AST_POOL_NO
:
ASTPOOL2020042118092600425385
PROD_NO
:
testProdNo1
checkDBContext
:
## astPoolNo
---
!!com.abssqr.plat.common.facade.param.astPool.AstPoolPageQryParam
astPoolName
:
测试资产池
pageNum
:
1
pageSize
:
21
## checkGet
---
'
{"total":1,"limit":21,"currPageNo":1,"datas":[{"astPoolName":"测试资产池","astType":"BL","prodNo":"testProdNo1"}]}'
\ 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