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
8c1bc421
Commit
8c1bc421
authored
Jul 26, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
精彩活动
parent
5bd53946
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
131 additions
and
47 deletions
+131
-47
BaseUserMemberController.java
...wxiaoqi/security/admin/rest/BaseUserMemberController.java
+5
-4
ActivityPopup.java
...java/com/xxfc/platform/activity/entity/ActivityPopup.java
+2
-1
HomeActivities.java
...ava/com/xxfc/platform/activity/entity/HomeActivities.java
+12
-4
ActivityPopupBiz.java
...java/com/xxfc/platform/activity/biz/ActivityPopupBiz.java
+59
-28
HomeActivitiesBiz.java
...ava/com/xxfc/platform/activity/biz/HomeActivitiesBiz.java
+29
-2
ActivityPopupManageController.java
...platform/activity/rest/ActivityPopupManageController.java
+19
-3
HomeActivitiesController.java
...xxfc/platform/activity/rest/HomeActivitiesController.java
+2
-2
AppVersionBiz.java
...rc/main/java/com/xxfc/platform/app/biz/AppVersionBiz.java
+1
-1
VehicleActiveController.java
...m/xxfc/platform/vehicle/rest/VehicleActiveController.java
+1
-1
VehicleCataController.java
...com/xxfc/platform/vehicle/rest/VehicleCataController.java
+1
-1
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/BaseUserMemberController.java
View file @
8c1bc421
...
@@ -2,6 +2,7 @@ package com.github.wxiaoqi.security.admin.rest;
...
@@ -2,6 +2,7 @@ package com.github.wxiaoqi.security.admin.rest;
import
com.github.wxiaoqi.security.admin.biz.BaseUserMemberBiz
;
import
com.github.wxiaoqi.security.admin.biz.BaseUserMemberBiz
;
import
com.github.wxiaoqi.security.admin.dto.BaseUserMemberVO
;
import
com.github.wxiaoqi.security.admin.dto.BaseUserMemberVO
;
import
com.github.wxiaoqi.security.admin.dto.UserMemberDTO
;
import
com.github.wxiaoqi.security.admin.entity.AppUserManage
;
import
com.github.wxiaoqi.security.admin.entity.AppUserManage
;
import
com.github.wxiaoqi.security.admin.entity.BaseUserMember
;
import
com.github.wxiaoqi.security.admin.entity.BaseUserMember
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
...
@@ -33,13 +34,13 @@ public class BaseUserMemberController extends BaseController<BaseUserMemberBiz,
...
@@ -33,13 +34,13 @@ public class BaseUserMemberController extends BaseController<BaseUserMemberBiz,
/**
/**
* 设置用户会员
* 设置用户会员
* @param
baseUserMemberV
O
* @param
userMemberDT
O
* @return
* @return
*/
*/
@PutMapping
(
"/setUserMember"
)
@PutMapping
(
"/setUserMember"
)
public
ObjectRestResponse
UpdateUserMember
(
@RequestBody
BaseUserMemberVO
baseUserMemberV
O
)
public
ObjectRestResponse
UpdateUserMember
(
@RequestBody
UserMemberDTO
userMemberDT
O
)
throws
InvocationTargetException
,
IllegalAccess
Exception
{
throws
Exception
{
baseBiz
.
UpdateUserMember
(
baseUserMemberV
O
);
baseBiz
.
updUserMemberByUserId
(
userMemberDT
O
);
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/ActivityPopup.java
View file @
8c1bc421
...
@@ -58,6 +58,7 @@ public class ActivityPopup {
...
@@ -58,6 +58,7 @@ public class ActivityPopup {
@Column
(
name
=
"is_del"
)
@Column
(
name
=
"is_del"
)
private
Integer
isDel
;
private
Integer
isDel
;
@Column
(
name
=
"time_type"
)
private
Integer
timeType
;
}
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/HomeActivities.java
View file @
8c1bc421
package
com
.
xxfc
.
platform
.
activity
.
entity
;
package
com
.
xxfc
.
platform
.
activity
.
entity
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigInteger
;
import
java.util.Date
;
import
java.util.Date
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -29,14 +30,14 @@ public class HomeActivities implements Serializable {
...
@@ -29,14 +30,14 @@ public class HomeActivities implements Serializable {
*/
*/
@Column
(
name
=
"crt_time"
)
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Long
crtTime
;
private
BigInteger
crtTime
;
/**
/**
* 更新时间
* 更新时间
*/
*/
@Column
(
name
=
"upd_time"
)
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Long
updTime
;
private
BigInteger
updTime
;
/**
/**
* 活动名称
* 活动名称
...
@@ -50,14 +51,14 @@ public class HomeActivities implements Serializable {
...
@@ -50,14 +51,14 @@ public class HomeActivities implements Serializable {
*/
*/
@Column
(
name
=
"start_time"
)
@Column
(
name
=
"start_time"
)
@ApiModelProperty
(
value
=
"活动开始时间"
)
@ApiModelProperty
(
value
=
"活动开始时间"
)
private
Long
startTime
;
private
BigInteger
startTime
;
/**
/**
* 精彩活动结束时间
* 精彩活动结束时间
*/
*/
@Column
(
name
=
"end_time"
)
@Column
(
name
=
"end_time"
)
@ApiModelProperty
(
value
=
"活动结束时间"
)
@ApiModelProperty
(
value
=
"活动结束时间"
)
private
Long
endTime
;
private
BigInteger
endTime
;
/**
/**
...
@@ -99,4 +100,11 @@ public class HomeActivities implements Serializable {
...
@@ -99,4 +100,11 @@ public class HomeActivities implements Serializable {
@ApiModelProperty
(
value
=
"是否删除"
)
@ApiModelProperty
(
value
=
"是否删除"
)
private
Integer
isDel
;
private
Integer
isDel
;
/**
* 有效期限:0-永久 ,1-有期限
*/
@Column
(
name
=
"time_type"
)
private
Integer
timeType
;
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityPopupBiz.java
View file @
8c1bc421
...
@@ -14,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -14,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
javax.swing.plaf.synth.SynthEditorPaneUI
;
import
java.math.BigInteger
;
import
java.math.BigInteger
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
@@ -23,10 +24,11 @@ import java.util.stream.Collectors;
...
@@ -23,10 +24,11 @@ import java.util.stream.Collectors;
/**
/**
* 活动弹窗biz
* 活动弹窗biz
*
* @author Administrator
* @author Administrator
*/
*/
@Service
@Service
public
class
ActivityPopupBiz
extends
BaseBiz
<
ActivityPopupMapper
,
ActivityPopup
>
{
public
class
ActivityPopupBiz
extends
BaseBiz
<
ActivityPopupMapper
,
ActivityPopup
>
{
@Value
(
"${activity.popup.loginTypes}"
)
@Value
(
"${activity.popup.loginTypes}"
)
private
String
loginTypes
;
private
String
loginTypes
;
...
@@ -38,36 +40,35 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
...
@@ -38,36 +40,35 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
/**
/**
* 获取活动弹窗,根据是否登录
* 获取活动弹窗,根据是否登录
*
* @param userInfo
* @param userInfo
* @return
* @return
*/
*/
public
List
<
ActivityPopup
>
getActivityPopup
(
AppUserDTO
userInfo
)
{
public
List
<
ActivityPopup
>
getActivityPopup
(
AppUserDTO
userInfo
)
{
if
(
userInfo
!=
null
){
if
(
userInfo
!=
null
)
{
List
<
ActivityPopup
>
activityPopups
=
getActivityPopupByTypes
(
loginTypes
);
List
<
ActivityPopup
>
activityPopups
=
getActivityPopupByTypes
(
loginTypes
);
if
(
activityPopups
==
null
||
activityPopups
.
size
()==
0
)
{
if
(
activityPopups
==
null
||
activityPopups
.
size
()
==
0
)
{
return
activityPopups
;
return
activityPopups
;
}
}
List
<
Integer
>
collect
=
activityPopups
.
parallelStream
().
map
(
ActivityPopup:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
collect
=
activityPopups
.
parallelStream
().
map
(
ActivityPopup:
:
getId
).
collect
(
Collectors
.
toList
());
Example
exaple
=
Example
.
builder
(
ActivityPopupUser
.
class
)
Example
exaple
=
Example
.
builder
(
ActivityPopupUser
.
class
)
.
where
(
WeekendSqls
.<
ActivityPopupUser
>
custom
()
.
where
(
WeekendSqls
.<
ActivityPopupUser
>
custom
()
.
andEqualTo
(
ActivityPopupUser:
:
getUserId
,
userInfo
.
getUserid
())
.
andEqualTo
(
ActivityPopupUser:
:
getUserId
,
userInfo
.
getUserid
())
.
andIn
(
ActivityPopupUser:
:
getPopupId
,
collect
)
.
andIn
(
ActivityPopupUser:
:
getPopupId
,
collect
)
).
build
();
).
build
();
List
<
ActivityPopupUser
>
activityPopupUsers
=
activityPopupUserBiz
.
selectByExample
(
exaple
);
List
<
ActivityPopupUser
>
activityPopupUsers
=
activityPopupUserBiz
.
selectByExample
(
exaple
);
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
size
()==
0
)
{
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
size
()
==
0
)
{
return
activityPopups
;
return
activityPopups
;
}
}
Set
<
Integer
>
popupIdSet
=
activityPopupUsers
.
parallelStream
().
map
(
ActivityPopupUser:
:
getPopupId
).
collect
(
Collectors
.
toSet
());
Set
<
Integer
>
popupIdSet
=
activityPopupUsers
.
parallelStream
().
map
(
ActivityPopupUser:
:
getPopupId
).
collect
(
Collectors
.
toSet
());
List
<
ActivityPopup
>
result
=
new
ArrayList
<>();
List
<
ActivityPopup
>
result
=
new
ArrayList
<>();
for
(
ActivityPopup
activityPopup
:
activityPopups
)
{
for
(
ActivityPopup
activityPopup
:
activityPopups
)
{
if
(
popupIdSet
.
add
(
activityPopup
.
getId
())){
if
(
popupIdSet
.
add
(
activityPopup
.
getId
()))
{
result
.
add
(
activityPopup
);
result
.
add
(
activityPopup
);
}
}
}
}
return
result
;
return
result
;
}
else
{
}
else
{
return
getActivityPopupByTypes
(
notLoginTypes
);
return
getActivityPopupByTypes
(
notLoginTypes
);
...
@@ -77,41 +78,57 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
...
@@ -77,41 +78,57 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
/**
/**
* 根据不同的用户,可查询寻的类型.得到对应的弹窗
* 根据不同的用户,可查询寻的类型.得到对应的弹窗
*
* @param Types
* @param Types
* @return
* @return
*/
*/
private
List
<
ActivityPopup
>
getActivityPopupByTypes
(
String
Types
)
{
private
List
<
ActivityPopup
>
getActivityPopupByTypes
(
String
Types
)
{
long
timeMillis
=
System
.
currentTimeMillis
();
//获取有期限的弹窗timeType=1
Example
exa
=
Example
.
builder
(
ActivityPopup
.
class
)
Example
exa
=
Example
.
builder
(
ActivityPopup
.
class
)
.
where
(
.
where
(
WeekendSqls
.<
ActivityPopup
>
custom
()
WeekendSqls
.<
ActivityPopup
>
custom
()
.
andGreaterThanOrEqualTo
(
ActivityPopup:
:
getEndTime
,
BigInteger
.
valueOf
(
System
.
currentTimeMillis
()))
.
andEqualTo
(
ActivityPopup:
:
getTimeType
,
1
)
.
andLessThanOrEqualTo
(
ActivityPopup:
:
getStartTime
,
BigInteger
.
valueOf
(
System
.
currentTimeMillis
()))
.
andGreaterThanOrEqualTo
(
ActivityPopup:
:
getEndTime
,
BigInteger
.
valueOf
(
timeMillis
))
.
andLessThanOrEqualTo
(
ActivityPopup:
:
getStartTime
,
BigInteger
.
valueOf
(
timeMillis
))
.
andIn
(
ActivityPopup:
:
getType
,
Arrays
.
asList
(
Types
.
split
(
","
)))
.
andIn
(
ActivityPopup:
:
getType
,
Arrays
.
asList
(
Types
.
split
(
","
)))
.
andEqualTo
(
ActivityPopup:
:
getStatus
,
1
)
.
andEqualTo
(
ActivityPopup:
:
getStatus
,
1
)
.
andEqualTo
(
ActivityPopup:
:
getIsDel
,
0
)
.
andEqualTo
(
ActivityPopup:
:
getIsDel
,
0
)
).
orderByAsc
(
"sort"
).
build
();
).
orderByAsc
(
"sort"
).
build
();
List
<
ActivityPopup
>
activityPopups
=
mapper
.
selectByExample
(
exa
);
List
<
ActivityPopup
>
activityPopups
=
mapper
.
selectByExample
(
exa
);
long
l
=
System
.
currentTimeMillis
();
return
activityPopups
;
//获取永久的弹窗timeType=0
Example
permanentExa
=
Example
.
builder
(
ActivityPopup
.
class
)
.
where
(
WeekendSqls
.<
ActivityPopup
>
custom
()
.
andEqualTo
(
ActivityPopup:
:
getTimeType
,
0
)
.
andIn
(
ActivityPopup:
:
getType
,
Arrays
.
asList
(
Types
.
split
(
","
)))
.
andEqualTo
(
ActivityPopup:
:
getStatus
,
1
)
.
andEqualTo
(
ActivityPopup:
:
getIsDel
,
0
)
).
orderByAsc
(
"sort"
).
build
();
List
<
ActivityPopup
>
permanentActivityPopups
=
mapper
.
selectByExample
(
permanentExa
);
activityPopups
.
addAll
(
permanentActivityPopups
);
return
activityPopups
;
}
}
/**
/**
* 判断是否重复弹窗
* 判断是否重复弹窗
*
* @param userInfo
* @param userInfo
* @param id
* @param id
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
setActivityPopup
(
AppUserDTO
userInfo
,
Integer
id
)
{
public
void
setActivityPopup
(
AppUserDTO
userInfo
,
Integer
id
)
{
if
(
userInfo
!=
null
)
{
if
(
userInfo
!=
null
)
{
Example
exa
=
Example
.
builder
(
ActivityPopupUser
.
class
).
where
(
Example
exa
=
Example
.
builder
(
ActivityPopupUser
.
class
).
where
(
WeekendSqls
.<
ActivityPopupUser
>
custom
()
WeekendSqls
.<
ActivityPopupUser
>
custom
()
.
andEqualTo
(
ActivityPopupUser:
:
getPopupId
,
id
)
.
andEqualTo
(
ActivityPopupUser:
:
getPopupId
,
id
)
.
andEqualTo
(
ActivityPopupUser:
:
getUserId
,
userInfo
.
getUserid
())
.
andEqualTo
(
ActivityPopupUser:
:
getUserId
,
userInfo
.
getUserid
())
).
build
();
).
build
();
List
<
ActivityPopupUser
>
activityPopupUsers
=
activityPopupUserBiz
.
selectByExample
(
exa
);
List
<
ActivityPopupUser
>
activityPopupUsers
=
activityPopupUserBiz
.
selectByExample
(
exa
);
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
size
()==
0
)
{
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
size
()
==
0
)
{
ActivityPopupUser
activityPopupUser
=
new
ActivityPopupUser
();
ActivityPopupUser
activityPopupUser
=
new
ActivityPopupUser
();
activityPopupUser
.
setPopupId
(
id
);
activityPopupUser
.
setPopupId
(
id
);
activityPopupUser
.
setUserId
(
userInfo
.
getUserid
());
activityPopupUser
.
setUserId
(
userInfo
.
getUserid
());
...
@@ -126,11 +143,25 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
...
@@ -126,11 +143,25 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
public
void
deleteOne
(
Integer
id
)
{
public
void
deleteOne
(
Integer
id
)
{
ActivityPopup
activityPopup
=
selectById
(
id
);
ActivityPopup
activityPopup
=
selectById
(
id
);
if
(
activityPopup
.
getStatus
()
==
1
)
{
if
(
activityPopup
.
getStatus
()
==
1
)
{
throw
new
BaseException
(
"Please take it off the shelves first"
);
throw
new
BaseException
(
"Please take it off the shelves first"
);
}
else
{
}
else
{
activityPopup
.
setIsDel
(
1
);
activityPopup
.
setIsDel
(
1
);
}
}
updateById
(
activityPopup
);
updateById
(
activityPopup
);
}
}
@Override
public
int
updateSelectiveByIdRe
(
ActivityPopup
activityPopup
)
{
activityPopup
.
setUpdTime
(
BigInteger
.
valueOf
(
System
.
currentTimeMillis
()));
return
mapper
.
updateByPrimaryKeySelective
(
activityPopup
);
}
@Override
public
int
insertSelectiveRe
(
ActivityPopup
activityPopup
)
{
activityPopup
.
setCrtTime
(
BigInteger
.
valueOf
(
System
.
currentTimeMillis
()));
activityPopup
.
setSort
(
0
);
activityPopup
.
setTimeType
(
0
);
return
mapper
.
insertSelective
(
activityPopup
);
}
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/HomeActivitiesBiz.java
View file @
8c1bc421
...
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
...
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.math.BigInteger
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* @author Administrator
* @author Administrator
...
@@ -23,12 +24,22 @@ public class HomeActivitiesBiz extends BaseBiz<HomeActivitiesMapper, HomeActivit
...
@@ -23,12 +24,22 @@ public class HomeActivitiesBiz extends BaseBiz<HomeActivitiesMapper, HomeActivit
public
List
<
HomeActivities
>
activities
()
{
public
List
<
HomeActivities
>
activities
()
{
long
currentTime
=
System
.
currentTimeMillis
();
long
currentTime
=
System
.
currentTimeMillis
();
Example
exa
=
Example
.
builder
(
HomeActivities
.
class
).
where
(
WeekendSqls
.<
HomeActivities
>
custom
()
Example
exa
=
Example
.
builder
(
HomeActivities
.
class
).
where
(
WeekendSqls
.<
HomeActivities
>
custom
()
.
andEqualTo
(
HomeActivities:
:
getTimeType
,
1
)
.
andGreaterThanOrEqualTo
(
HomeActivities:
:
getEndTime
,
currentTime
)
.
andGreaterThanOrEqualTo
(
HomeActivities:
:
getEndTime
,
currentTime
)
.
andLessThanOrEqualTo
(
HomeActivities:
:
getStartTime
,
currentTime
)
.
andLessThanOrEqualTo
(
HomeActivities:
:
getStartTime
,
currentTime
)
.
andEqualTo
(
HomeActivities:
:
getStatus
,
1
)
.
andEqualTo
(
HomeActivities:
:
getStatus
,
1
)
.
andEqualTo
(
HomeActivities:
:
getIsDel
,
0
)
.
andEqualTo
(
HomeActivities:
:
getIsDel
,
0
)
).
orderByAsc
(
"sort"
).
build
();
).
orderByAsc
(
"sort"
).
build
();
List
<
HomeActivities
>
activityLists
=
selectByExample
(
exa
);
List
<
HomeActivities
>
activityLists
=
selectByExample
(
exa
);
Example
permanentExa
=
Example
.
builder
(
HomeActivities
.
class
).
where
(
WeekendSqls
.<
HomeActivities
>
custom
()
.
andEqualTo
(
HomeActivities:
:
getTimeType
,
0
)
.
andEqualTo
(
HomeActivities:
:
getStatus
,
1
)
.
andEqualTo
(
HomeActivities:
:
getIsDel
,
0
)
).
orderByAsc
(
"sort"
).
build
();
List
<
HomeActivities
>
permanentActivityLists
=
selectByExample
(
permanentExa
);
activityLists
.
addAll
(
permanentActivityLists
);
return
activityLists
;
return
activityLists
;
}
}
...
@@ -36,10 +47,11 @@ public class HomeActivitiesBiz extends BaseBiz<HomeActivitiesMapper, HomeActivit
...
@@ -36,10 +47,11 @@ public class HomeActivitiesBiz extends BaseBiz<HomeActivitiesMapper, HomeActivit
public
PageInfo
<
HomeActivities
>
getPage
(
ActivitiesQuery
query
)
{
public
PageInfo
<
HomeActivities
>
getPage
(
ActivitiesQuery
query
)
{
Example
exa
=
new
Example
(
HomeActivities
.
class
);
Example
exa
=
new
Example
(
HomeActivities
.
class
);
Example
.
Criteria
criteria
=
exa
.
createCriteria
();
if
(
StringUtils
.
isNotBlank
(
query
.
getActivitiesName
())){
if
(
StringUtils
.
isNotBlank
(
query
.
getActivitiesName
())){
exa
.
createCriteria
()
.
andLike
(
"name"
,
"%"
+
query
.
getActivitiesName
()+
"%"
);
criteria
.
andLike
(
"name"
,
"%"
+
query
.
getActivitiesName
()+
"%"
);
}
}
exa
.
createCriteria
()
.
andEqualTo
(
"isDel"
,
0
);
criteria
.
andEqualTo
(
"isDel"
,
0
);
exa
.
orderBy
(
"sort"
).
asc
();
exa
.
orderBy
(
"sort"
).
asc
();
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
HomeActivities
>
activityLists
=
selectByExample
(
exa
);
List
<
HomeActivities
>
activityLists
=
selectByExample
(
exa
);
...
@@ -56,4 +68,19 @@ public class HomeActivitiesBiz extends BaseBiz<HomeActivitiesMapper, HomeActivit
...
@@ -56,4 +68,19 @@ public class HomeActivitiesBiz extends BaseBiz<HomeActivitiesMapper, HomeActivit
updateById
(
homeActivities
);
updateById
(
homeActivities
);
}
}
@Override
public
int
updateSelectiveByIdRe
(
HomeActivities
activityPopup
)
{
activityPopup
.
setUpdTime
(
BigInteger
.
valueOf
(
System
.
currentTimeMillis
()));
return
mapper
.
updateByPrimaryKeySelective
(
activityPopup
);
}
@Override
public
int
insertSelectiveRe
(
HomeActivities
activityPopup
)
{
activityPopup
.
setCrtTime
(
BigInteger
.
valueOf
(
System
.
currentTimeMillis
()));
activityPopup
.
setSort
(
0
);
activityPopup
.
setTimeType
(
0
);
return
mapper
.
insertSelective
(
activityPopup
);
}
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityPopupManageController.java
View file @
8c1bc421
...
@@ -7,6 +7,7 @@ import com.github.wxiaoqi.security.common.rest.BaseController;
...
@@ -7,6 +7,7 @@ import com.github.wxiaoqi.security.common.rest.BaseController;
import
com.xxfc.platform.activity.biz.ActivityPopupBiz
;
import
com.xxfc.platform.activity.biz.ActivityPopupBiz
;
import
com.xxfc.platform.activity.entity.ActivityPopup
;
import
com.xxfc.platform.activity.entity.ActivityPopup
;
import
com.xxfc.platform.activity.vo.PopupQuery
;
import
com.xxfc.platform.activity.vo.PopupQuery
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -45,11 +46,12 @@ public class ActivityPopupManageController extends BaseController<ActivityPopupB
...
@@ -45,11 +46,12 @@ public class ActivityPopupManageController extends BaseController<ActivityPopupB
* @param id
* @param id
* @return
* @return
*/
*/
@
Pos
tMapping
(
value
=
"/manage/getOne/{id}"
)
@
Ge
tMapping
(
value
=
"/manage/getOne/{id}"
)
public
ObjectRestResponse
<
ActivityPopup
>
getOne
(
@PathVariable
Integer
id
)
{
public
ObjectRestResponse
<
ActivityPopup
>
getOne
(
@PathVariable
Integer
id
)
{
Example
exa
=
new
Example
(
ActivityPopup
.
class
);
Example
exa
=
new
Example
(
ActivityPopup
.
class
);
exa
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
);
Example
.
Criteria
criteria
=
exa
.
createCriteria
();
exa
.
createCriteria
().
andEqualTo
(
"id"
,
id
);
criteria
.
andEqualTo
(
"isDel"
,
0
);
criteria
.
andEqualTo
(
"id"
,
id
);
List
<
ActivityPopup
>
activityPopups
=
baseBiz
.
selectByExample
(
exa
);
List
<
ActivityPopup
>
activityPopups
=
baseBiz
.
selectByExample
(
exa
);
if
(
activityPopups
==
null
||
activityPopups
.
size
()==
0
)
{
if
(
activityPopups
==
null
||
activityPopups
.
size
()==
0
)
{
return
ObjectRestResponse
.
succ
(
new
ActivityPopup
());
return
ObjectRestResponse
.
succ
(
new
ActivityPopup
());
...
@@ -71,4 +73,18 @@ public class ActivityPopupManageController extends BaseController<ActivityPopupB
...
@@ -71,4 +73,18 @@ public class ActivityPopupManageController extends BaseController<ActivityPopupB
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
// /**
// * 添加
// * @param activityPopup
// * @return
// */
// @ApiOperation("保存")
// @PutMapping(value = "save")
// @ResponseBody
// public ObjectRestResponse<ActivityPopup> save(@RequestBody ActivityPopup activityPopup){
// baseBiz.save(activityPopup);
// return new ObjectRestResponse<ActivityPopup>();
// }
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/HomeActivitiesController.java
View file @
8c1bc421
...
@@ -28,7 +28,7 @@ public class HomeActivitiesController extends BaseController<HomeActivitiesBiz,
...
@@ -28,7 +28,7 @@ public class HomeActivitiesController extends BaseController<HomeActivitiesBiz,
* @throws IllegalAccessException
* @throws IllegalAccessException
*/
*/
@GetMapping
(
"/app/unauth/activity/findAll"
)
@GetMapping
(
"/app/unauth/activity/findAll"
)
public
ObjectRestResponse
<
List
<
HomeActivities
>>
appFindAll
()
throws
InvocationTargetException
,
IllegalAccessException
{
public
ObjectRestResponse
<
List
<
HomeActivities
>>
appFindAll
()
{
List
<
HomeActivities
>
list
=
baseBiz
.
activities
();
List
<
HomeActivities
>
list
=
baseBiz
.
activities
();
return
ObjectRestResponse
.
succ
(
list
);
return
ObjectRestResponse
.
succ
(
list
);
}
}
...
@@ -49,7 +49,7 @@ public class HomeActivitiesController extends BaseController<HomeActivitiesBiz,
...
@@ -49,7 +49,7 @@ public class HomeActivitiesController extends BaseController<HomeActivitiesBiz,
* @param id
* @param id
* @return
* @return
*/
*/
@
Pos
tMapping
(
value
=
"/manage/activity/getOne/{id}"
)
@
Ge
tMapping
(
value
=
"/manage/activity/getOne/{id}"
)
public
ObjectRestResponse
<
HomeActivities
>
getOne
(
@PathVariable
Integer
id
)
{
public
ObjectRestResponse
<
HomeActivities
>
getOne
(
@PathVariable
Integer
id
)
{
Example
exa
=
new
Example
(
HomeActivities
.
class
);
Example
exa
=
new
Example
(
HomeActivities
.
class
);
Example
.
Criteria
criteria
=
exa
.
createCriteria
();
Example
.
Criteria
criteria
=
exa
.
createCriteria
();
...
...
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/biz/AppVersionBiz.java
View file @
8c1bc421
...
@@ -112,7 +112,7 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
...
@@ -112,7 +112,7 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
String
realFileRelPath
=
dirPathToday
+
"/"
+
fileName
;
String
realFileRelPath
=
dirPathToday
+
"/"
+
fileName
;
String
filePath
=
uploadPath
+
realFileRelPath
;
String
filePath
=
uploadPath
+
realFileRelPath
;
FileUtils
.
copyInputStreamToFile
(
file
.
getInputStream
(),
new
File
(
filePath
));
FileUtils
.
copyInputStreamToFile
(
file
.
getInputStream
(),
new
File
(
filePath
));
realFileRelPath
=
Dev_url
+
realFileRel
Path
;
// filePath=Dev_url+file
Path;
return
ObjectRestResponse
.
succ
(
filePath
);
return
ObjectRestResponse
.
succ
(
filePath
);
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleActiveController.java
View file @
8c1bc421
...
@@ -26,7 +26,7 @@ public class VehicleActiveController {
...
@@ -26,7 +26,7 @@ public class VehicleActiveController {
*
*
* @return
* @return
*/
*/
@PostMapping
(
"departure"
)
@PostMapping
(
"
/
departure"
)
public
RestResponse
departure
(
@RequestBody
VehicleDepartureVo
departureVo
)
{
public
RestResponse
departure
(
@RequestBody
VehicleDepartureVo
departureVo
)
{
if
(
departureVo
==
null
||
departureVo
.
getVehicleId
()
==
null
if
(
departureVo
==
null
||
departureVo
.
getVehicleId
()
==
null
||
departureVo
.
getMileage
()
==
null
||
departureVo
.
getDepartureBranchCompanyId
()
==
null
||
departureVo
.
getMileage
()
==
null
||
departureVo
.
getDepartureBranchCompanyId
()
==
null
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleCataController.java
View file @
8c1bc421
...
@@ -125,7 +125,7 @@ public class VehicleCataController extends VehicleBaseController<VehiclePlatCata
...
@@ -125,7 +125,7 @@ public class VehicleCataController extends VehicleBaseController<VehiclePlatCata
* @return
* @return
*/
*/
@PostMapping
(
"/add/updateAndAdd"
)
@PostMapping
(
"/add/updateAndAdd"
)
public
ObjectRestResponse
updateAndAdd
(
@RequestBody
Cascade
<
VehiclePlatCata
>
cas
){
public
ObjectRestResponse
save
(
@RequestBody
Cascade
<
VehiclePlatCata
>
cas
){
return
baseBiz
.
updateAndAdd
(
cas
);
return
baseBiz
.
updateAndAdd
(
cas
);
}
}
...
...
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