Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
isc-core
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
isc-v3.1-tmp
isc-core
Commits
6ca280b9
Commit
6ca280b9
authored
Nov 01, 2024
by
hulei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
汇款多实体改造
parent
84c47ebd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
8 deletions
+47
-8
EtyMapper.java
...e/src/main/java/com/brilliance/isc/mda/dao/EtyMapper.java
+3
-0
PtyMapper.java
...e/src/main/java/com/brilliance/isc/mda/dao/PtyMapper.java
+4
-2
etymapper.xml
isc-common-core/src/main/resources/mapper/etymapper.xml
+6
-0
feemapper.xml
isc-common-core/src/main/resources/mapper/feemapper.xml
+2
-0
ptymapper.xml
isc-common-core/src/main/resources/mapper/ptymapper.xml
+11
-0
PtyCacheServiceImpl.java
.../brilliance/isc/common/cache/pty/PtyCacheServiceImpl.java
+21
-6
No files found.
isc-common-core/src/main/java/com/brilliance/isc/mda/dao/EtyMapper.java
View file @
6ca280b9
...
...
@@ -30,4 +30,6 @@ public interface EtyMapper {
Ety
getEtyByExtkey
(
String
extkey
);
List
<
Ety
>
selectAll
();
}
\ No newline at end of file
isc-common-core/src/main/java/com/brilliance/isc/mda/dao/PtyMapper.java
View file @
6ca280b9
package
com
.
brilliance
.
isc
.
mda
.
dao
;
import
com.brilliance.isc.bo.Bch
;
import
com.brilliance.isc.bo.Pty
;
import
com.brilliance.isc.vo.manager.PtyManageVo
;
import
com.brilliance.isc.vo.manager.PtyTVo
;
...
...
@@ -333,5 +332,7 @@ public interface PtyMapper {
int
updatePtySigflg
(
@Param
(
"sigflg"
)
String
sigflg
,
@Param
(
"inr"
)
String
inr
);
List
<
Pty
>
selectInfoByExtkeyOrNamOrNam1
(
@Param
(
"extkey"
)
String
extkey
,
@Param
(
"nam1"
)
String
nam1
,
@Param
(
"nam"
)
String
nam
);
List
<
Pty
>
selectInfoByExtkeyOrNamOrNam1
(
@Param
(
"extkey"
)
String
extkey
,
@Param
(
"nam1"
)
String
nam1
,
@Param
(
"nam"
)
String
nam
);
Pty
queryOwnPty
(
@Param
(
"extkey"
)
String
extkey
,
@Param
(
"etgextkey"
)
String
etgextkey
);
}
\ No newline at end of file
isc-common-core/src/main/resources/mapper/etymapper.xml
View file @
6ca280b9
...
...
@@ -194,6 +194,12 @@
where trim(extkey) = trim(#{extkey,jdbcType=VARCHAR})
</select>
<select
id=
"selectAll"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM ety WHERE ety.ETG in (select etg.extkey from etg)
</select>
</mapper>
isc-common-core/src/main/resources/mapper/feemapper.xml
View file @
6ca280b9
...
...
@@ -38,11 +38,13 @@
where inr = #{inr,jdbcType=VARCHAR}
</select>
<!-- TODO 多实体改造 -->
<select
id=
"selectByCod"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from fee
where cod = #{cod,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
>
...
...
isc-common-core/src/main/resources/mapper/ptymapper.xml
View file @
6ca280b9
...
...
@@ -1158,6 +1158,17 @@
and nam like concat('%',#{nam},'%')
</if>
</select>
<select
id=
"queryOwnPty"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from pty
where extkey = #{extkey}
and etgextkey = #{etgextkey}
and ptytyp = 'BA'
</select>
</mapper>
isc-common-service/src/main/java/com/brilliance/isc/common/cache/pty/PtyCacheServiceImpl.java
View file @
6ca280b9
package
com
.
brilliance
.
isc
.
common
.
cache
.
pty
;
import
cn.hutool.core.collection.CollUtil
;
import
com.brilliance.isc.bo.Ety
;
import
com.brilliance.isc.bo.Pty
;
import
com.brilliance.isc.common.context.SettleContext
;
import
com.brilliance.isc.mda.dao.EtyMapper
;
import
com.brilliance.isc.mda.dao.PtyMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -10,6 +14,8 @@ import org.springframework.data.redis.core.RedisTemplate;
import
org.springframework.stereotype.Service
;
import
javax.annotation.PostConstruct
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.concurrent.TimeUnit
;
@Service
...
...
@@ -23,7 +29,7 @@ public class PtyCacheServiceImpl implements PtyCacheService {
private
static
final
TimeUnit
EXPIRETYPE
=
TimeUnit
.
SECONDS
;
private
static
Pty
ownPty
=
null
;
//
private static Pty ownPty = null;
@Autowired
@Qualifier
(
"jacksonRedisTemplate"
)
...
...
@@ -32,17 +38,26 @@ public class PtyCacheServiceImpl implements PtyCacheService {
@Autowired
private
PtyMapper
ptyMapper
;
@Autowired
private
EtyMapper
etyMapper
;
private
List
<
Ety
>
etyList
;
@PostConstruct
public
void
initOwnPty
()
{
ownPty
=
ptyMapper
.
queryDetailByExtkey
(
"EVERCNBJXXX"
);
//验证环境 bic第8位都改成了0
if
(
ownPty
==
null
)
{
ownPty
=
ptyMapper
.
queryDetailByExtkey
(
"EVERCNB0XXX"
);
etyList
=
etyMapper
.
selectAll
();
if
(
CollUtil
.
isEmpty
(
etyList
)){
throw
new
RuntimeException
(
"ETY,ETG实体信息表中应至少有一条实体信息配置!"
);
}
}
public
Pty
getOwnPty
()
{
return
ownPty
;
String
etgextkey
=
SettleContext
.
getUserEtg
().
getExtkey
();
Optional
<
Ety
>
op
=
etyList
.
stream
().
filter
(
e
->
etgextkey
.
equalsIgnoreCase
(
e
.
getEtg
())).
findFirst
();
if
(
op
.
isPresent
()){
Ety
ety
=
op
.
get
();
return
ptyMapper
.
queryOwnPty
(
ety
.
getOwnbic
(),
ety
.
getEtg
());
}
throw
new
RuntimeException
(
"请检查PTY表是否正确配置了ETG["
+
etgextkey
+
"]对应信息!"
);
}
@Override
...
...
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