Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
67ff3e6f
Commit
67ff3e6f
authored
Dec 12, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
活动弹窗修改
parent
37c5a2db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
ActivityPopupBiz.java
...java/com/xxfc/platform/activity/biz/ActivityPopupBiz.java
+6
-9
No files found.
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityPopupBiz.java
View file @
67ff3e6f
...
...
@@ -6,7 +6,6 @@ import com.github.wxiaoqi.security.common.exception.BaseException;
import
com.xxfc.platform.activity.entity.ActivityPopup
;
import
com.xxfc.platform.activity.entity.ActivityPopupUser
;
import
com.xxfc.platform.activity.mapper.ActivityPopupMapper
;
import
com.xxfc.platform.activity.mapper.ActivityPopupUserMapper
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -15,9 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
javax.swing.plaf.synth.SynthEditorPaneUI
;
import
java.math.BigInteger
;
import
java.time.Instant
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -49,7 +46,7 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper, ActivityPopup
public
List
<
ActivityPopup
>
getActivityPopup
(
AppUserDTO
userInfo
)
{
if
(
userInfo
!=
null
)
{
List
<
ActivityPopup
>
activityPopups
=
getActivityPopupByTypes
(
loginTypes
);
if
(
activityPopups
==
null
||
activityPopups
.
size
()
==
0
)
{
if
(
activityPopups
==
null
||
activityPopups
.
isEmpty
()
)
{
return
activityPopups
;
}
/* List<Integer> collect = activityPopups.parallelStream().map(ActivityPopup::getId).collect(Collectors.toList());
...
...
@@ -90,17 +87,17 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper, ActivityPopup
/**
* 根据不同的用户,可查询寻的类型.得到对应的弹窗
*
* @param Types
* @param
popup
Types
* @return
*/
private
List
<
ActivityPopup
>
getActivityPopupByTypes
(
String
Types
)
{
private
List
<
ActivityPopup
>
getActivityPopupByTypes
(
String
popup
Types
)
{
long
timeMillis
=
System
.
currentTimeMillis
();
//获取有期限的弹窗timeType=1
Example
exa
=
new
Example
(
ActivityPopup
.
class
);
Example
.
Criteria
criteria
=
exa
.
createCriteria
();
exa
.
orderBy
(
"sort"
).
asc
();
criteria
.
andEqualTo
(
"timeType"
,
1
);
criteria
.
andIn
(
"type"
,
Arrays
.
asList
(
Types
.
split
(
","
)));
criteria
.
andIn
(
"type"
,
Arrays
.
asList
(
popup
Types
.
split
(
","
)));
criteria
.
andEqualTo
(
"status"
,
1
);
criteria
.
andEqualTo
(
"isDel"
,
0
);
criteria
.
andLessThanOrEqualTo
(
"startTime"
,
BigInteger
.
valueOf
(
timeMillis
));
...
...
@@ -113,7 +110,7 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper, ActivityPopup
.
where
(
WeekendSqls
.<
ActivityPopup
>
custom
()
.
andEqualTo
(
ActivityPopup:
:
getTimeType
,
0
)
.
andIn
(
ActivityPopup:
:
getType
,
Arrays
.
asList
(
Types
.
split
(
","
)))
.
andIn
(
ActivityPopup:
:
getType
,
Arrays
.
asList
(
popup
Types
.
split
(
","
)))
.
andEqualTo
(
ActivityPopup:
:
getStatus
,
1
)
.
andEqualTo
(
ActivityPopup:
:
getIsDel
,
0
)
).
orderByAsc
(
"sort"
).
build
();
...
...
@@ -138,7 +135,7 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper, ActivityPopup
.
andEqualTo
(
ActivityPopupUser:
:
getUserId
,
userInfo
.
getUserid
())
).
build
();
List
<
ActivityPopupUser
>
activityPopupUsers
=
activityPopupUserBiz
.
selectByExample
(
exa
);
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
size
()
==
0
)
{
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
isEmpty
()
)
{
ActivityPopupUser
activityPopupUser
=
new
ActivityPopupUser
();
activityPopupUser
.
setPopupId
(
id
);
activityPopupUser
.
setUserId
(
userInfo
.
getUserid
());
...
...
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