Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
remit
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
gechengyang
remit
Commits
47d88e40
Commit
47d88e40
authored
Dec 21, 2018
by
gechengyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交最新代码
parent
70df2811
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
108 additions
and
75 deletions
+108
-75
CpdController.java
...n/java/com/brilliance/remit/controller/CpdController.java
+3
-2
AdrService.java
src/main/java/com/brilliance/remit/service/AdrService.java
+2
-2
BchService.java
src/main/java/com/brilliance/remit/service/BchService.java
+2
-2
CbbService.java
src/main/java/com/brilliance/remit/service/CbbService.java
+2
-2
CbeService.java
src/main/java/com/brilliance/remit/service/CbeService.java
+2
-2
CpdService.java
src/main/java/com/brilliance/remit/service/CpdService.java
+2
-2
CptService.java
src/main/java/com/brilliance/remit/service/CptService.java
+2
-2
FepService.java
src/main/java/com/brilliance/remit/service/FepService.java
+2
-2
GleService.java
src/main/java/com/brilliance/remit/service/GleService.java
+2
-2
PtaService.java
src/main/java/com/brilliance/remit/service/PtaService.java
+3
-3
PtsService.java
src/main/java/com/brilliance/remit/service/PtsService.java
+2
-2
PtyService.java
src/main/java/com/brilliance/remit/service/PtyService.java
+4
-3
TrnService.java
src/main/java/com/brilliance/remit/service/TrnService.java
+2
-2
AdrServiceImp.java
.../java/com/brilliance/remit/service/imp/AdrServiceImp.java
+3
-3
BchServiceImp.java
.../java/com/brilliance/remit/service/imp/BchServiceImp.java
+3
-3
CbbServiceImp.java
.../java/com/brilliance/remit/service/imp/CbbServiceImp.java
+3
-3
CbeServiceImp.java
.../java/com/brilliance/remit/service/imp/CbeServiceImp.java
+3
-3
CntServiceImpl.java
...java/com/brilliance/remit/service/imp/CntServiceImpl.java
+15
-0
CpdServiceImp.java
.../java/com/brilliance/remit/service/imp/CpdServiceImp.java
+3
-3
CptServiceImp.java
.../java/com/brilliance/remit/service/imp/CptServiceImp.java
+3
-3
FepServiceImp.java
.../java/com/brilliance/remit/service/imp/FepServiceImp.java
+3
-3
GleServiceImp.java
.../java/com/brilliance/remit/service/imp/GleServiceImp.java
+3
-3
PtaServiceImp.java
.../java/com/brilliance/remit/service/imp/PtaServiceImp.java
+4
-4
PtsServiceImp.java
.../java/com/brilliance/remit/service/imp/PtsServiceImp.java
+3
-3
PtyServiceImp.java
.../java/com/brilliance/remit/service/imp/PtyServiceImp.java
+4
-4
TrnServiceImp.java
.../java/com/brilliance/remit/service/imp/TrnServiceImp.java
+3
-3
service.vm
src/main/resources/service.vm
+1
-1
serviceImp.vm
src/main/resources/serviceImp.vm
+2
-2
Genarate.java
src/test/java/com/brilliance/generate/Genarate.java
+11
-6
HttpTest.java
src/test/java/com/brilliance/http/test/HttpTest.java
+11
-0
No files found.
src/main/java/com/brilliance/remit/controller/CpdController.java
View file @
47d88e40
...
...
@@ -192,11 +192,11 @@ public class CpdController {
for
(
Pts
pts
:
ptsList
)
{
String
ptsinr
=
cntService
.
counter
(
"PTS"
);
pts
.
setInr
(
ptsinr
);
if
(
pts
.
getRol
().
equals
(
"PYE"
)
&&
tempAdrInrIsNull
)
{
if
(
pts
.
getRol
()
!=
null
&&
pts
.
getRol
()
.
equals
(
"PYE"
)
&&
tempAdrInrIsNull
)
{
pts
.
setPtainr
(
pyePtaInr
);
pts
.
setPtyinr
(
pyePtyInr
);
}
trnService
.
save
(
trn
);
ptsService
.
save
(
pts
);
}
// 最大CBE CBB
...
...
@@ -250,6 +250,7 @@ public class CpdController {
}
catch
(
Exception
e
)
{
log
.
error
(
"save cpd error:"
,
e
);
transactionManager
.
rollback
(
status
);
return
ResultUtil
.
result
(
ErrorCodes
.
ERROR
,
"save error"
,
null
);
}
return
ResultUtil
.
result
(
ErrorCodes
.
SUCCESS
,
"sucess"
,
null
);
...
...
src/main/java/com/brilliance/remit/service/AdrService.java
View file @
47d88e40
...
...
@@ -2,10 +2,10 @@ package com.brilliance.remit.service;
import
com.brilliance.remit.db.model.Adr
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
public
interface
AdrService
{
public
boolean
save
(
Adr
adr
);
public
boolean
save
(
Adr
adr
)
throws
Exception
;
}
src/main/java/com/brilliance/remit/service/BchService.java
View file @
47d88e40
...
...
@@ -2,10 +2,10 @@ package com.brilliance.remit.service;
import
com.brilliance.remit.db.model.Bch
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:09
created at time 2018-12-
21 16:59:58
**/
public
interface
BchService
{
public
boolean
save
(
Bch
bch
);
public
boolean
save
(
Bch
bch
)
throws
Exception
;
}
src/main/java/com/brilliance/remit/service/CbbService.java
View file @
47d88e40
...
...
@@ -2,10 +2,10 @@ package com.brilliance.remit.service;
import
com.brilliance.remit.db.model.Cbb
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
public
interface
CbbService
{
public
boolean
save
(
Cbb
cbb
);
public
boolean
save
(
Cbb
cbb
)
throws
Exception
;
}
src/main/java/com/brilliance/remit/service/CbeService.java
View file @
47d88e40
...
...
@@ -2,10 +2,10 @@ package com.brilliance.remit.service;
import
com.brilliance.remit.db.model.Cbe
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
public
interface
CbeService
{
public
boolean
save
(
Cbe
cbe
);
public
boolean
save
(
Cbe
cbe
)
throws
Exception
;
}
src/main/java/com/brilliance/remit/service/CpdService.java
View file @
47d88e40
...
...
@@ -2,10 +2,10 @@ package com.brilliance.remit.service;
import
com.brilliance.remit.db.model.Cpd
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
public
interface
CpdService
{
public
boolean
save
(
Cpd
cpd
);
public
boolean
save
(
Cpd
cpd
)
throws
Exception
;
}
src/main/java/com/brilliance/remit/service/CptService.java
View file @
47d88e40
...
...
@@ -2,10 +2,10 @@ package com.brilliance.remit.service;
import
com.brilliance.remit.db.model.Cpt
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
public
interface
CptService
{
public
boolean
save
(
Cpt
cpt
);
public
boolean
save
(
Cpt
cpt
)
throws
Exception
;
}
src/main/java/com/brilliance/remit/service/FepService.java
View file @
47d88e40
...
...
@@ -2,10 +2,10 @@ package com.brilliance.remit.service;
import
com.brilliance.remit.db.model.Fep
;
/**
This java was generated by Auto Generator.
created at time 2018-12-21
09:25:17
created at time 2018-12-21
16:59:58
**/
public
interface
FepService
{
public
boolean
save
(
Fep
fep
);
public
boolean
save
(
Fep
fep
)
throws
Exception
;
}
src/main/java/com/brilliance/remit/service/GleService.java
View file @
47d88e40
...
...
@@ -2,10 +2,10 @@ package com.brilliance.remit.service;
import
com.brilliance.remit.db.model.Gle
;
/**
This java was generated by Auto Generator.
created at time 2018-12-21
09:33:08
created at time 2018-12-21
16:59:57
**/
public
interface
GleService
{
public
boolean
save
(
Gle
gle
);
public
boolean
save
(
Gle
gle
)
throws
Exception
;
}
src/main/java/com/brilliance/remit/service/PtaService.java
View file @
47d88e40
...
...
@@ -4,12 +4,12 @@ import com.brilliance.remit.db.model.Cpdgrp;
import
com.brilliance.remit.db.model.Pta
;
/**
* This java was generated by Auto Generator. created at time 2018-12-
18
*
22:06:10
* This java was generated by Auto Generator. created at time 2018-12-
21
*
16:59:58
**/
public
interface
PtaService
{
public
boolean
save
(
Pta
pta
);
public
boolean
save
(
Pta
pta
)
throws
Exception
;
public
Cpdgrp
custormerInfo
(
String
extkey
);
...
...
src/main/java/com/brilliance/remit/service/PtsService.java
View file @
47d88e40
...
...
@@ -2,10 +2,10 @@ package com.brilliance.remit.service;
import
com.brilliance.remit.db.model.Pts
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
public
interface
PtsService
{
public
boolean
save
(
Pts
pts
);
public
boolean
save
(
Pts
pts
)
throws
Exception
;
}
src/main/java/com/brilliance/remit/service/PtyService.java
View file @
47d88e40
...
...
@@ -5,12 +5,13 @@ import java.util.List;
import
com.brilliance.remit.db.model.Pty
;
/**
* This java was generated by Auto Generator. created at time 2018-12-
18
*
22:06:10
* This java was generated by Auto Generator. created at time 2018-12-
21
*
16:59:58
**/
public
interface
PtyService
{
public
boolean
save
(
Pty
pty
);
public
boolean
save
(
Pty
pty
)
throws
Exception
;
public
List
<
Pty
>
ptyInfos
(
String
extkey
,
String
ptytyp
);
}
src/main/java/com/brilliance/remit/service/TrnService.java
View file @
47d88e40
...
...
@@ -2,10 +2,10 @@ package com.brilliance.remit.service;
import
com.brilliance.remit.db.model.Trn
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
public
interface
TrnService
{
public
boolean
save
(
Trn
trn
);
public
boolean
save
(
Trn
trn
)
throws
Exception
;
}
src/main/java/com/brilliance/remit/service/imp/AdrServiceImp.java
View file @
47d88e40
...
...
@@ -14,7 +14,7 @@ import com.brilliance.remit.db.dao.AdrMapper;
import
com.brilliance.remit.db.model.Adr
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
@Service
(
"adrService"
)
...
...
@@ -27,7 +27,7 @@ public class AdrServiceImp implements AdrService {
private
static
Log
log
=
LogFactory
.
getLog
(
AdrServiceImp
.
class
);
@Override
public
boolean
save
(
Adr
adr
)
{
public
boolean
save
(
Adr
adr
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -38,7 +38,7 @@ public class AdrServiceImp implements AdrService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/java/com/brilliance/remit/service/imp/BchServiceImp.java
View file @
47d88e40
...
...
@@ -14,7 +14,7 @@ import com.brilliance.remit.db.dao.BchMapper;
import
com.brilliance.remit.db.model.Bch
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
@Service
(
"bchService"
)
...
...
@@ -27,7 +27,7 @@ public class BchServiceImp implements BchService {
private
static
Log
log
=
LogFactory
.
getLog
(
BchServiceImp
.
class
);
@Override
public
boolean
save
(
Bch
bch
)
{
public
boolean
save
(
Bch
bch
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -38,7 +38,7 @@ public class BchServiceImp implements BchService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/java/com/brilliance/remit/service/imp/CbbServiceImp.java
View file @
47d88e40
...
...
@@ -14,7 +14,7 @@ import com.brilliance.remit.db.dao.CbbMapper;
import
com.brilliance.remit.db.model.Cbb
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
@Service
(
"cbbService"
)
...
...
@@ -27,7 +27,7 @@ public class CbbServiceImp implements CbbService {
private
static
Log
log
=
LogFactory
.
getLog
(
CbbServiceImp
.
class
);
@Override
public
boolean
save
(
Cbb
cbb
)
{
public
boolean
save
(
Cbb
cbb
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -38,7 +38,7 @@ public class CbbServiceImp implements CbbService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/java/com/brilliance/remit/service/imp/CbeServiceImp.java
View file @
47d88e40
...
...
@@ -14,7 +14,7 @@ import com.brilliance.remit.db.dao.CbeMapper;
import
com.brilliance.remit.db.model.Cbe
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
@Service
(
"cbeService"
)
...
...
@@ -27,7 +27,7 @@ public class CbeServiceImp implements CbeService {
private
static
Log
log
=
LogFactory
.
getLog
(
CbeServiceImp
.
class
);
@Override
public
boolean
save
(
Cbe
cbe
)
{
public
boolean
save
(
Cbe
cbe
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -38,7 +38,7 @@ public class CbeServiceImp implements CbeService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/java/com/brilliance/remit/service/imp/CntServiceImpl.java
View file @
47d88e40
...
...
@@ -2,9 +2,14 @@ package com.brilliance.remit.service.imp;
import
java.math.BigDecimal
;
import
javax.annotation.Resource
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.jdbc.datasource.DataSourceTransactionManager
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.TransactionStatus
;
import
com.brilliance.remit.common.util.DbUtil
;
import
com.brilliance.remit.db.dao.CouMapper
;
import
com.brilliance.remit.db.model.Cou
;
import
com.brilliance.remit.service.CntService
;
...
...
@@ -14,9 +19,14 @@ public class CntServiceImpl implements CntService {
@Autowired
private
CouMapper
couMapper
;
@Resource
(
name
=
"txManager"
)
private
DataSourceTransactionManager
transactionManager
;
@Override
public
synchronized
String
counter
(
String
nam
)
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
Cou
cnt
=
couMapper
.
selectByPrimaryKey
(
nam
);
if
(
cnt
==
null
)
{
cnt
=
new
Cou
();
...
...
@@ -28,7 +38,12 @@ public class CntServiceImpl implements CntService {
cnt
.
setCouval
(
new
BigDecimal
(
cnt
.
getCouval
().
intValue
()
+
1
));
couMapper
.
updateByPrimaryKey
(
cnt
);
}
transactionManager
.
commit
(
status
);
return
String
.
format
(
"%08d"
,
cnt
.
getCouval
().
intValue
());
}
catch
(
Exception
e
)
{
transactionManager
.
rollback
(
status
);
}
return
""
;
}
}
src/main/java/com/brilliance/remit/service/imp/CpdServiceImp.java
View file @
47d88e40
...
...
@@ -14,7 +14,7 @@ import com.brilliance.remit.db.dao.CpdMapper;
import
com.brilliance.remit.db.model.Cpd
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
@Service
(
"cpdService"
)
...
...
@@ -27,7 +27,7 @@ public class CpdServiceImp implements CpdService {
private
static
Log
log
=
LogFactory
.
getLog
(
CpdServiceImp
.
class
);
@Override
public
boolean
save
(
Cpd
cpd
)
{
public
boolean
save
(
Cpd
cpd
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -38,7 +38,7 @@ public class CpdServiceImp implements CpdService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/java/com/brilliance/remit/service/imp/CptServiceImp.java
View file @
47d88e40
...
...
@@ -14,7 +14,7 @@ import com.brilliance.remit.db.dao.CptMapper;
import
com.brilliance.remit.db.model.Cpt
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
@Service
(
"cptService"
)
...
...
@@ -27,7 +27,7 @@ public class CptServiceImp implements CptService {
private
static
Log
log
=
LogFactory
.
getLog
(
CptServiceImp
.
class
);
@Override
public
boolean
save
(
Cpt
cpt
)
{
public
boolean
save
(
Cpt
cpt
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -38,7 +38,7 @@ public class CptServiceImp implements CptService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/java/com/brilliance/remit/service/imp/FepServiceImp.java
View file @
47d88e40
...
...
@@ -14,7 +14,7 @@ import com.brilliance.remit.db.dao.FepMapper;
import
com.brilliance.remit.db.model.Fep
;
/**
This java was generated by Auto Generator.
created at time 2018-12-21
09:25:1
8
created at time 2018-12-21
16:59:5
8
**/
@Service
(
"fepService"
)
...
...
@@ -27,7 +27,7 @@ public class FepServiceImp implements FepService {
private
static
Log
log
=
LogFactory
.
getLog
(
FepServiceImp
.
class
);
@Override
public
boolean
save
(
Fep
fep
)
{
public
boolean
save
(
Fep
fep
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -38,7 +38,7 @@ public class FepServiceImp implements FepService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/java/com/brilliance/remit/service/imp/GleServiceImp.java
View file @
47d88e40
...
...
@@ -14,7 +14,7 @@ import com.brilliance.remit.db.dao.GleMapper;
import
com.brilliance.remit.db.model.Gle
;
/**
This java was generated by Auto Generator.
created at time 2018-12-21
09:33:0
8
created at time 2018-12-21
16:59:5
8
**/
@Service
(
"gleService"
)
...
...
@@ -27,7 +27,7 @@ public class GleServiceImp implements GleService {
private
static
Log
log
=
LogFactory
.
getLog
(
GleServiceImp
.
class
);
@Override
public
boolean
save
(
Gle
gle
)
{
public
boolean
save
(
Gle
gle
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -38,7 +38,7 @@ public class GleServiceImp implements GleService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/java/com/brilliance/remit/service/imp/PtaServiceImp.java
View file @
47d88e40
...
...
@@ -20,8 +20,8 @@ import com.brilliance.remit.db.model.Pty;
import
com.brilliance.remit.service.PtaService
;
/**
* This java was generated by Auto Generator. created at time 2018-12-
18
*
22:06:10
* This java was generated by Auto Generator. created at time 2018-12-
21
*
16:59:58
**/
@Service
(
"ptaService"
)
...
...
@@ -38,7 +38,7 @@ public class PtaServiceImp implements PtaService {
private
static
Log
log
=
LogFactory
.
getLog
(
PtaServiceImp
.
class
);
@Override
public
boolean
save
(
Pta
pta
)
{
public
boolean
save
(
Pta
pta
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -49,7 +49,7 @@ public class PtaServiceImp implements PtaService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/java/com/brilliance/remit/service/imp/PtsServiceImp.java
View file @
47d88e40
...
...
@@ -14,7 +14,7 @@ import com.brilliance.remit.db.dao.PtsMapper;
import
com.brilliance.remit.db.model.Pts
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
@Service
(
"ptsService"
)
...
...
@@ -27,7 +27,7 @@ public class PtsServiceImp implements PtsService {
private
static
Log
log
=
LogFactory
.
getLog
(
PtsServiceImp
.
class
);
@Override
public
boolean
save
(
Pts
pts
)
{
public
boolean
save
(
Pts
pts
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -38,7 +38,7 @@ public class PtsServiceImp implements PtsService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/java/com/brilliance/remit/service/imp/PtyServiceImp.java
View file @
47d88e40
...
...
@@ -17,8 +17,8 @@ import com.brilliance.remit.db.model.Pty;
import
com.brilliance.remit.service.PtyService
;
/**
* This java was generated by Auto Generator. created at time 2018-12-
18
*
22:06:10
* This java was generated by Auto Generator. created at time 2018-12-
21
*
16:59:58
**/
@Service
(
"ptyService"
)
...
...
@@ -31,7 +31,7 @@ public class PtyServiceImp implements PtyService {
private
static
Log
log
=
LogFactory
.
getLog
(
PtyServiceImp
.
class
);
@Override
public
boolean
save
(
Pty
pty
)
{
public
boolean
save
(
Pty
pty
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -42,7 +42,7 @@ public class PtyServiceImp implements PtyService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/java/com/brilliance/remit/service/imp/TrnServiceImp.java
View file @
47d88e40
...
...
@@ -14,7 +14,7 @@ import com.brilliance.remit.db.dao.TrnMapper;
import
com.brilliance.remit.db.model.Trn
;
/**
This java was generated by Auto Generator.
created at time 2018-12-
18 22:06:10
created at time 2018-12-
21 16:59:58
**/
@Service
(
"trnService"
)
...
...
@@ -27,7 +27,7 @@ public class TrnServiceImp implements TrnService {
private
static
Log
log
=
LogFactory
.
getLog
(
TrnServiceImp
.
class
);
@Override
public
boolean
save
(
Trn
trn
)
{
public
boolean
save
(
Trn
trn
)
throws
Exception
{
// 事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -38,7 +38,7 @@ public class TrnServiceImp implements TrnService {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/main/resources/service.vm
View file @
47d88e40
...
...
@@ -6,6 +6,6 @@ import com.brilliance.remit.db.model.${entity.name};
**/
public
interface
${
entity
.
name
}
Service
{
public
boolean
save
(${
entity
.
name
}
${
entity
.
lowerName
});
public
boolean
save
(${
entity
.
name
}
${
entity
.
lowerName
})
throws
Exception
;
}
src/main/resources/serviceImp.vm
View file @
47d88e40
...
...
@@ -27,7 +27,7 @@ public class ${entity.name}ServiceImp implements ${entity.name}Service {
private
static
Log
log
=
LogFactory
.
getLog
(${
entity
.
name
}
ServiceImp
.
class
);
@
Override
public
boolean
save
(${
entity
.
name
}
${
entity
.
lowerName
})
{
public
boolean
save
(${
entity
.
name
}
${
entity
.
lowerName
})
throws
Exception
{
//
事务操作
TransactionStatus
status
=
transactionManager
.
getTransaction
(
DbUtil
.
getDbDefinition
());
try
{
...
...
@@ -38,7 +38,7 @@ public class ${entity.name}ServiceImp implements ${entity.name}Service {
}
catch
(
Exception
e
)
{
log
.
error
(
"error"
,
e
);
transactionManager
.
rollback
(
status
);
return
false
;
throw
new
Exception
(
"error"
,
e
)
;
}
}
...
...
src/test/java/com/brilliance/generate/Genarate.java
View file @
47d88e40
...
...
@@ -21,12 +21,17 @@ public class Genarate {
String
rootPath
=
"G:/work/cbpp/remit"
;
List
<
String
>
list
=
new
ArrayList
<
String
>();
list
.
add
(
"gle"
);
/*
* list.add("bch"); list.add("cpd"); list.add("cpt"); list.add("trn");
* list.add("pts"); list.add("cbb"); list.add("cbe"); list.add("pty");
* list.add("pta"); list.add("adr");
*/
list
.
add
(
"fep"
);
list
.
add
(
"bch"
);
list
.
add
(
"cpd"
);
list
.
add
(
"cpt"
);
list
.
add
(
"trn"
);
list
.
add
(
"pts"
);
list
.
add
(
"cbb"
);
list
.
add
(
"cbe"
);
list
.
add
(
"pty"
);
list
.
add
(
"pta"
);
list
.
add
(
"adr"
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
String
name
=
list
.
get
(
i
);
...
...
src/test/java/com/brilliance/http/test/HttpTest.java
View file @
47d88e40
...
...
@@ -17,6 +17,8 @@ import com.brilliance.remit.db.model.Cbe;
import
com.brilliance.remit.db.model.Cpd
;
import
com.brilliance.remit.db.model.Cpdgrp
;
import
com.brilliance.remit.db.model.Cpt
;
import
com.brilliance.remit.db.model.Fep
;
import
com.brilliance.remit.db.model.Gle
;
import
com.brilliance.remit.db.model.Pta
;
import
com.brilliance.remit.db.model.Pts
;
import
com.brilliance.remit.db.model.Pty
;
...
...
@@ -161,6 +163,15 @@ public class HttpTest {
cpdgrp
.
setNomcbe
(
new
Cbe
());
cpdgrp
.
setNomcbb
(
new
Cbb
());
List
<
Fep
>
fepList
=
new
ArrayList
<
Fep
>();
fepList
.
add
(
new
Fep
());
cpdgrp
.
setFepList
(
fepList
);
List
<
Gle
>
gleList
=
new
ArrayList
<
Gle
>();
gleList
.
add
(
new
Gle
());
cpdgrp
.
setGleList
(
gleList
);
String
str
=
new
Gson
().
toJson
(
cpdgrp
);
Cpdgrp
cpdgrp2
=
new
Gson
().
fromJson
(
str
,
Cpdgrp
.
class
);
System
.
out
.
println
(
"save info="
+
str
);
...
...
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