Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
enterprise-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
enterprise-platform
Commits
4c816ee1
Commit
4c816ee1
authored
Jan 09, 2025
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人名片设置增加默认值
parent
6423c664
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
10 deletions
+62
-10
enterprise-manager/src/main/java/com/mortals/xhx/module/bussinesscard/service/impl/BussinesscardServiceImpl.java
.../bussinesscard/service/impl/BussinesscardServiceImpl.java
+62
-10
No files found.
enterprise-manager/src/main/java/com/mortals/xhx/module/bussinesscard/service/impl/BussinesscardServiceImpl.java
View file @
4c816ee1
package
com.mortals.xhx.module.bussinesscard.service.impl
;
package
com.mortals.xhx.module.bussinesscard.service.impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.framework.util.StringUtils
;
import
com.mortals.xhx.base.system.user.model.UserEntity
;
import
com.mortals.xhx.base.system.user.model.UserEntity
;
...
@@ -14,6 +15,7 @@ import com.mortals.xhx.module.position.model.PositionEntity;
...
@@ -14,6 +15,7 @@ import com.mortals.xhx.module.position.model.PositionEntity;
import
com.mortals.xhx.module.position.service.PositionService
;
import
com.mortals.xhx.module.position.service.PositionService
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.model.StaffEntity
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
com.mortals.xhx.module.staff.service.StaffService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
...
@@ -26,6 +28,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -26,6 +28,7 @@ import lombok.extern.slf4j.Slf4j;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -70,6 +73,21 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
...
@@ -70,6 +73,21 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
entity
.
setCompanyName
(
companyEntity
.
getCompanyName
());
entity
.
setCompanyName
(
companyEntity
.
getCompanyName
());
}
}
}
}
checkSetting
(
entity
);
if
(
entity
.
getPositionId
()!=
null
){
PositionEntity
positionEntity
=
positionService
.
get
(
entity
.
getPositionId
());
if
(
positionEntity
!=
null
){
entity
.
setPositionName
(
positionEntity
.
getPositionName
());
}
}
StaffEntity
staffEntity
=
staffService
.
getCache
(
String
.
valueOf
(
entity
.
getStaffId
()));
if
(
staffEntity
!=
null
){
entity
.
setStaffName
(
staffEntity
.
getName
());
entity
.
setStaffStatus
(
staffEntity
.
getStaffStatus
());
}
}
private
void
checkSetting
(
BussinesscardEntity
entity
){
if
(
StringUtils
.
isEmpty
(
entity
.
getSetting
())){
if
(
StringUtils
.
isEmpty
(
entity
.
getSetting
())){
JSONObject
setting
=
new
JSONObject
();
JSONObject
setting
=
new
JSONObject
();
setting
.
put
(
"photoPath"
,
true
);
setting
.
put
(
"photoPath"
,
true
);
...
@@ -81,18 +99,41 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
...
@@ -81,18 +99,41 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
setting
.
put
(
"companyIntro"
,
true
);
setting
.
put
(
"companyIntro"
,
true
);
setting
.
put
(
"companyProduct"
,
true
);
setting
.
put
(
"companyProduct"
,
true
);
setting
.
put
(
"txtColor"
,
"#FFFFFF"
);
setting
.
put
(
"txtColor"
,
"#FFFFFF"
);
setting
.
put
(
"companyNews"
,
true
);
entity
.
setSetting
(
setting
.
toJSONString
());
entity
.
setSetting
(
setting
.
toJSONString
());
}
}
else
{
if
(
entity
.
getPositionId
()!=
null
){
JSONObject
setting
=
JSONObject
.
parseObject
(
entity
.
getSetting
());
PositionEntity
positionEntity
=
positionService
.
get
(
entity
.
getPositionId
());
if
(!
setting
.
containsKey
(
"photoPath"
)){
if
(
positionEntity
!=
null
){
setting
.
put
(
"photoPath"
,
true
);
entity
.
setPositionName
(
positionEntity
.
getPositionName
());
}
}
}
if
(!
setting
.
containsKey
(
"companyName"
)){
StaffEntity
staffEntity
=
staffService
.
getCache
(
String
.
valueOf
(
entity
.
getStaffId
()));
setting
.
put
(
"companyName"
,
true
);
if
(
staffEntity
!=
null
){
}
entity
.
setStaffName
(
staffEntity
.
getName
());
if
(!
setting
.
containsKey
(
"positionName"
)){
entity
.
setStaffStatus
(
staffEntity
.
getStaffStatus
());
setting
.
put
(
"positionName"
,
true
);
}
if
(!
setting
.
containsKey
(
"phoneNumber"
)){
setting
.
put
(
"phoneNumber"
,
true
);
}
if
(!
setting
.
containsKey
(
"email"
)){
setting
.
put
(
"email"
,
true
);
}
if
(!
setting
.
containsKey
(
"companyAdress"
)){
setting
.
put
(
"companyAdress"
,
true
);
}
if
(!
setting
.
containsKey
(
"companyIntro"
)){
setting
.
put
(
"companyIntro"
,
true
);
}
if
(!
setting
.
containsKey
(
"companyProduct"
)){
setting
.
put
(
"companyProduct"
,
true
);
}
if
(!
setting
.
containsKey
(
"txtColor"
)){
setting
.
put
(
"txtColor"
,
"#FFFFFF"
);
}
if
(!
setting
.
containsKey
(
"companyNews"
)){
setting
.
put
(
"companyNews"
,
true
);
}
entity
.
setSetting
(
setting
.
toJSONString
());
}
}
}
}
...
@@ -116,6 +157,7 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
...
@@ -116,6 +157,7 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
}
else
{
}
else
{
entity
.
setFavoriteStatus
(
0
);
entity
.
setFavoriteStatus
(
0
);
}
}
checkSetting
(
entity
);
}
}
return
entity
;
return
entity
;
}
}
...
@@ -146,4 +188,14 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
...
@@ -146,4 +188,14 @@ public class BussinesscardServiceImpl extends AbstractCRUDServiceImpl<Bussinessc
}
}
}
}
}
}
@Override
protected
void
findAfter
(
BussinesscardEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
BussinesscardEntity
>
list
)
throws
AppException
{
super
.
findAfter
(
params
,
pageInfo
,
context
,
list
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
for
(
BussinesscardEntity
item:
list
){
checkSetting
(
item
);
}
}
}
}
}
\ 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