Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
tcm-system
Project
Project
Details
Activity
Releases
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
TCM
tcm-system
Commits
200f0d99
Commit
200f0d99
authored
Jul 24, 2019
by
zjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user/role/tright 7.24
parent
93aa1606
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
14 deletions
+45
-14
CompanyServiceImpl.java
...ngding/web/authority/service/impl/CompanyServiceImpl.java
+35
-14
SaveCompanyReqVo.java
...com/pangding/web/authority/vo/reqvo/SaveCompanyReqVo.java
+10
-0
No files found.
src/main/java/com/pangding/web/authority/service/impl/CompanyServiceImpl.java
View file @
200f0d99
...
...
@@ -178,20 +178,23 @@ public class CompanyServiceImpl implements CompanyService {
/*返回结果对象*/
SaveCompanyResVo
resVo
=
new
SaveCompanyResVo
();
/*检查用户名*/
userServiceImpl
.
isValid
(
reqVo
.
getAccount
());
UserVo
userReqVo
=
new
UserVo
();
userReqVo
.
setAccount
(
reqVo
.
getAccount
());
if
(
null
!=
reqVo
.
getUserId
()
&&
!
reqVo
.
getUserId
().
isEmpty
())
{
userReqVo
.
setId
(
reqVo
.
getUserId
());
if
(
null
!=
reqVo
.
getAccount
()){
userServiceImpl
.
isValid
(
reqVo
.
getAccount
());
UserVo
userReqVo
=
new
UserVo
();
userReqVo
.
setAccount
(
reqVo
.
getAccount
());
if
(
null
!=
reqVo
.
getUserId
()
&&
!
reqVo
.
getUserId
().
isEmpty
())
{
userReqVo
.
setId
(
reqVo
.
getUserId
());
}
userServiceImpl
.
checkAccount
(
userReqVo
);
}
userServiceImpl
.
checkAccount
(
userReqVo
);
/*公司主表*/
CompanyVo
companyVo
=
new
CompanyVo
();
companyVo
.
setId
(
StringHelper
.
getNewID
());
companyVo
.
setId
(
reqVo
.
getCompanyId
()
!=
null
?
reqVo
.
getCompanyId
():
StringHelper
.
getNewID
());
ObjectHelper
.
writeWithFrom
(
companyVo
,
reqVo
);
companyVo
.
setAddress
(
reqVo
.
getCompanyAddress
());
companyVo
.
setProductOrInterface
(
CompanyConstant
.
PRODUCT
);
companyVo
.
setStatus
(
0
);
companyVo
.
setStatus
(
reqVo
.
getStatus
()
!=
null
?
reqVo
.
getStatus
():
0
);
companyVo
.
setExamineStatus
(
0
);
/*注册服务请求对象*/
...
...
@@ -204,6 +207,7 @@ public class CompanyServiceImpl implements CompanyService {
if
(
reqVo
.
getCompanyType
()
==
1
)
{
CompanyBankCardVo
companyBankCardVo
=
new
CompanyBankCardVo
();
ObjectHelper
.
writeWithFrom
(
companyBankCardVo
,
reqVo
);
companyBankCardVo
.
setId
(
reqVo
.
getCompanyBankCardId
()!=
null
?
reqVo
.
getCompanyBankCardId
():
StringHelper
.
getNewID
());
companyBankCardVo
.
setName
(
reqVo
.
getContactName
());
companyBankCardVo
.
setPhone
(
reqVo
.
getContactPhone
());
companyBankCardVo
.
setIsDefault
(
CompanyBankCardConstant
.
IS_DEFAULT
);
...
...
@@ -228,7 +232,12 @@ public class CompanyServiceImpl implements CompanyService {
companyVo1
.
setCompanyAttribute
(
companyReqVo
.
getCompanyAttribution
());
/*保存公司主表*/
companyDao
.
create
(
companyVo1
);
if
(
reqVo
.
getCompanyId
()!=
null
){
companyDao
.
update
(
companyVo1
);
}
else
{
companyDao
.
create
(
companyVo1
);
}
resVo
.
setCompanyId
(
companyVo1
.
getId
());
resVo
.
setStatus
(
companyVo1
.
getStatus
());
...
...
@@ -240,7 +249,11 @@ public class CompanyServiceImpl implements CompanyService {
ObjectHelper
.
writeWithFrom
(
companyBankCardVo
,
companyBankReqVo
);
companyBankCardVo
.
setIsDefault
(
CompanyBankCardConstant
.
IS_DEFAULT
);
companyBankCardDao
.
create
(
companyBankCardVo
);
if
(
null
!=
reqVo
.
getCompanyBankCardId
()){
companyBankCardDao
.
update
(
companyBankCardVo
);
}
else
{
companyBankCardDao
.
create
(
companyBankCardVo
);
}
resVo
.
setCompanyBankCardId
(
companyBankCardVo
.
getId
());
}
...
...
@@ -253,13 +266,17 @@ public class CompanyServiceImpl implements CompanyService {
.
replace
(
":"
,
""
)
.
replace
(
" "
,
""
);
extendVo
.
setQrCode
(
qrCode
);
companyExtendDaoImpl
.
create
(
extendVo
);
if
(
null
!=
reqVo
.
getCompanyExtendId
()){
companyExtendDaoImpl
.
update
(
extendVo
);
}
else
{
companyExtendDaoImpl
.
create
(
extendVo
);
}
resVo
.
setCompanyExtendId
(
extendVo
.
getId
());
/*保存商户表*/
MerchantCreateReqVo
merchantCreateReqVo
=
new
MerchantCreateReqVo
();
merchantCreateReqVo
.
setId
(
StringHelper
.
getNewID
());
merchantCreateReqVo
.
setId
(
reqVo
.
getMerchantId
()!=
null
?
reqVo
.
getMerchantId
():
StringHelper
.
getNewID
());
merchantCreateReqVo
.
setType
(
reqVo
.
getCompanyAttribute
());
merchantCreateReqVo
.
setName
(
reqVo
.
getMerchantName
());
merchantCreateReqVo
.
setAddress
(
reqVo
.
getMerchantAddress
());
...
...
@@ -277,7 +294,7 @@ public class CompanyServiceImpl implements CompanyService {
/*保存用户*/
UserVo
userVo
=
new
UserVo
();
userVo
.
setId
(
StringHelper
.
getNewID
());
userVo
.
setId
(
reqVo
.
getUserId
()!=
null
?
reqVo
.
getUserId
():
StringHelper
.
getNewID
());
userVo
.
setAccount
(
reqVo
.
getAccount
());
userVo
.
setPassword
(
StringHelper
.
md5
(
"123456"
));
userVo
.
setRemark
(
"123456"
);
...
...
@@ -289,7 +306,11 @@ public class CompanyServiceImpl implements CompanyService {
userVo
.
setIsFirst
(
1
);
/*检查手机是否存在*/
userServiceImpl
.
checkPhone
(
userVo
);
userDaoImpl
.
create
(
userVo
);
if
(
null
!=
reqVo
.
getUserId
()){
userDaoImpl
.
update
(
userVo
);
}
else
{
userDaoImpl
.
create
(
userVo
);
}
resVo
.
setUserId
(
userVo
.
getId
());
...
...
src/main/java/com/pangding/web/authority/vo/reqvo/SaveCompanyReqVo.java
View file @
200f0d99
...
...
@@ -107,6 +107,16 @@ public class SaveCompanyReqVo {
private
String
verifyCode
;
private
Integer
status
;
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
String
getVerifyCode
()
{
return
verifyCode
;
}
...
...
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