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
299603ff
Commit
299603ff
authored
Dec 18, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
169aae70
3dbdf86c
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
254 additions
and
159 deletions
+254
-159
AppUserPositionTempDTO.java
...ub/wxiaoqi/security/admin/dto/AppUserPositionTempDTO.java
+4
-2
AppUserPositionTemp.java
...ub/wxiaoqi/security/admin/entity/AppUserPositionTemp.java
+4
-0
AppUserPositionTempVo.java
...thub/wxiaoqi/security/admin/vo/AppUserPositionTempVo.java
+3
-0
AppStaffUserBiz.java
...om/github/wxiaoqi/security/admin/biz/AppStaffUserBiz.java
+2
-2
AppUserPositionChangeRecordBiz.java
...qi/security/admin/biz/AppUserPositionChangeRecordBiz.java
+1
-1
AppUserPositionTempBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
+2
-2
ActivityLuckDrawFindDTO.java
...m/xxfc/platform/activity/dto/ActivityLuckDrawFindDTO.java
+2
-0
ActivityLuckyDrawListVo.java
...om/xxfc/platform/activity/vo/ActivityLuckyDrawListVo.java
+11
-0
ActivityLuckyDrawBiz.java
.../com/xxfc/platform/activity/biz/ActivityLuckyDrawBiz.java
+18
-6
ActivityPopularizeBiz.java
...com/xxfc/platform/activity/biz/ActivityPopularizeBiz.java
+162
-137
PopularizeMQHandler.java
...m/xxfc/platform/activity/handler/PopularizeMQHandler.java
+0
-4
ActivityLuckyDrawMapper.java
...xfc/platform/activity/mapper/ActivityLuckyDrawMapper.java
+4
-0
ActivityPopularizeController.java
.../platform/activity/rest/ActivityPopularizeController.java
+9
-0
ActivityLuckyDrawAdminController.java
...activity/rest/admin/ActivityLuckyDrawAdminController.java
+4
-5
ActivityLuckyDrawMapper.xml
...ver/src/main/resources/mapper/ActivityLuckyDrawMapper.xml
+28
-0
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/AppUserPositionTempDTO.java
View file @
299603ff
...
...
@@ -26,8 +26,7 @@ public class AppUserPositionTempDTO {
@ApiModelProperty
(
value
=
"姓名"
)
private
String
name
;
@ApiModelProperty
(
value
=
"身份id"
)
@ApiModelProperty
(
value
=
"身份id"
)
private
Integer
positionId
;
@ApiModelProperty
(
value
=
"员工职位id"
)
...
...
@@ -48,6 +47,9 @@ public class AppUserPositionTempDTO {
@ApiModelProperty
(
value
=
"是否删除:0-正常;1-删除"
)
private
Integer
isDel
;
@ApiModelProperty
(
value
=
"员工职位状态:0-正常;1-离职"
)
private
Integer
isQuit
;
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
userId
;
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/AppUserPositionTemp.java
View file @
299603ff
...
...
@@ -76,4 +76,8 @@ public class AppUserPositionTemp implements Serializable {
private
Integer
isDel
;
@Column
(
name
=
"is_quit"
)
@ApiModelProperty
(
value
=
"员工职位状态:0-正常;1-离职"
)
private
Integer
isQuit
;
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/AppUserPositionTempVo.java
View file @
299603ff
...
...
@@ -51,4 +51,7 @@ public class AppUserPositionTempVo {
@ApiModelProperty
(
value
=
"分公司名称"
)
private
String
companyName
;
@ApiModelProperty
(
value
=
"员工职位状态 0:在职 1:离职"
)
private
Integer
idQuit
;
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppStaffUserBiz.java
View file @
299603ff
...
...
@@ -66,14 +66,14 @@ public class AppStaffUserBiz extends BaseBiz<AppStaffUserMapper, AppStaffUser> {
BeanUtils
.
copyProperties
(
staffUser
,
appStaffUserVo
);
Integer
suId
=
staffUser
.
getSuId
();
//上级员工信息
if
(
suId
!=
null
||
suId
!=
0
||
appStaffUser
.
getPhone
()!=
null
){
if
(
suId
!=
null
&&
suId
!=
0
&&
appStaffUser
.
getPhone
()
!=
null
){
AppUserVo
spuser
=
appUserDetailBiz
.
getUserInfoById
(
suId
);
appStaffUserVo
.
setEmployeeName
(
spuser
.
getRealname
());
appStaffUserVo
.
setEmployeePhone
(
spuser
.
getUsername
());
}
//客户信息
Integer
uid
=
staffUser
.
getUid
();
if
(
uid
!=
null
||
uid
!=
0
){
if
(
uid
!=
null
&&
uid
>
0
){
AppUserVo
user
=
appUserDetailBiz
.
getUserInfoById
(
uid
);
appStaffUserVo
.
setUName
(
StringUtil
.
isEmpty
(
user
.
getRealname
())?
user
.
getNickname
():
user
.
getRealname
());
appStaffUserVo
.
setPhone
(
user
.
getUsername
());
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserPositionChangeRecordBiz.java
View file @
299603ff
...
...
@@ -49,7 +49,7 @@ public class AppUserPositionChangeRecordBiz extends BaseBiz<AppUserPositionChang
public
void
addPositionChangeRecord
(
AppUserPositionTemp
userPositionTemp
,
AppUserPositionTemp
oldData
,
Integer
operatorId
,
Timestamp
relTime
)
{
AppUserPositionChangeRecord
appUserPositionChangeRecord
=
new
AppUserPositionChangeRecord
();
if
(!(
userPositionTemp
.
getIs
Del
().
equals
(
oldData
.
getIsDel
())))
{
if
(!(
userPositionTemp
.
getIs
Quit
().
equals
(
oldData
.
getIsQuit
())))
{
appUserPositionChangeRecord
.
setJobRemark
(
USER_LEAVE_COMPANT
);
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
View file @
299603ff
...
...
@@ -168,6 +168,7 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
String
jobName
=
jobMap
==
null
?
""
:
jobMap
.
get
(
appUserPositionTemp
.
getJobId
())
==
null
?
""
:
jobMap
.
get
(
appUserPositionTemp
.
getJobId
()).
getName
();
appUserPositionTempVo
.
setPositionName
(
postionName
);
appUserPositionTempVo
.
setJobName
(
jobName
);
appUserPositionTempVo
.
setIdQuit
(
appUserPositionTemp
.
getIsQuit
());
appUserPositionTempVo
.
setStatus
(
appUserPositionTemp
.
getUserId
()
==
null
?
DataStatus
.
NO_USERED
.
code
:
appUserPositionTemp
.
getUserId
()
==
0
?
DataStatus
.
NO_USERED
.
code
:
DataStatus
.
USERED
.
code
);
appUserPositionTempVos
.
add
(
appUserPositionTempVo
);
}
...
...
@@ -421,8 +422,7 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
* 员工复职
*/
public
ObjectRestResponse
andAddUserPositionChangeRecord
(
AppUserPositionTempDTO
appUserPositionTempDTO
,
Integer
operatorId
)
{
if
(
appUserPositionTempDTO
==
null
||
StringUtils
.
isBlank
(
appUserPositionTempDTO
.
getPhone
())
||
StringUtils
.
isBlank
(
appUserPositionTempDTO
.
getName
())
)
{
if
(
appUserPositionTempDTO
==
null
||
StringUtils
.
isBlank
(
appUserPositionTempDTO
.
getPhone
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"参数不能为空"
);
}
AppUserPositionTemp
userPositionTemp
=
new
AppUserPositionTemp
();
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/dto/ActivityLuckDrawFindDTO.java
View file @
299603ff
...
...
@@ -24,4 +24,6 @@ public class ActivityLuckDrawFindDTO extends PageParam {
private
Date
endTime
;
private
String
phone
;
private
Integer
activityId
;
private
String
parentPhone
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/ActivityLuckyDrawListVo.java
0 → 100644
View file @
299603ff
package
com
.
xxfc
.
platform
.
activity
.
vo
;
import
com.xxfc.platform.activity.entity.ActivityLuckyDraw
;
import
lombok.Data
;
@Data
public
class
ActivityLuckyDrawListVo
extends
ActivityLuckyDraw
{
private
String
positionName
;
private
String
parentPhone
;
private
String
parentName
;
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityLuckyDrawBiz.java
View file @
299603ff
package
com
.
xxfc
.
platform
.
activity
.
biz
;
import
cn.hutool.core.date.DateUtil
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.excel.ExcelUtils
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.activity.dto.ActivityLuckDrawFindDTO
;
import
com.xxfc.platform.activity.entity.ActivityLuckyDraw
;
import
com.xxfc.platform.activity.mapper.ActivityLuckyDrawMapper
;
import
com.xxfc.platform.activity.vo.ActivityLuckyDrawListVo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.poi.ss.usermodel.CellStyle
;
import
org.apache.poi.ss.usermodel.Row
;
import
org.apache.poi.xssf.usermodel.XSSFRow
;
import
org.apache.poi.xssf.usermodel.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.activity.entity.ActivityLuckyDraw
;
import
com.xxfc.platform.activity.mapper.ActivityLuckyDrawMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.servlet.ServletOutputStream
;
...
...
@@ -50,7 +51,7 @@ public class ActivityLuckyDrawBiz extends BaseBiz<ActivityLuckyDrawMapper, Activ
*
* @param activityLuckDrawFindDTO
* @return
*/
*/
public
PageDataVO
<
ActivityLuckyDraw
>
listLuckDrawWithPage
(
ActivityLuckDrawFindDTO
activityLuckDrawFindDTO
)
{
PageDataVO
<
ActivityLuckyDraw
>
dataVO
=
PageDataVO
.
pageInfo
(
activityLuckDrawFindDTO
.
getPage
(),
activityLuckDrawFindDTO
.
getLimit
(),
()
->
mapper
.
listLuckDrawWithPage
(
activityLuckDrawFindDTO
));
List
<
ActivityLuckyDraw
>
data
=
dataVO
.
getData
();
...
...
@@ -106,4 +107,15 @@ public class ActivityLuckyDrawBiz extends BaseBiz<ActivityLuckyDrawMapper, Activ
}
return
activityLuckyDraws
;
}
public
ObjectRestResponse
<
PageDataVO
<
ActivityLuckyDrawListVo
>>
getAll
(
ActivityLuckDrawFindDTO
activityLuckDrawFindDTO
)
{
Integer
page
=
activityLuckDrawFindDTO
.
getPage
()
==
null
?
1
:
activityLuckDrawFindDTO
.
getPage
();
Integer
limit
=
activityLuckDrawFindDTO
.
getLimit
()
==
null
?
10
:
activityLuckDrawFindDTO
.
getLimit
();
activityLuckDrawFindDTO
.
setPage
(
page
);
activityLuckDrawFindDTO
.
setLimit
(
limit
);
Query
query
=
new
Query
(
activityLuckDrawFindDTO
);
PageDataVO
<
ActivityLuckyDrawListVo
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getAllByPage
(
query
.
getSuper
()));
return
ObjectRestResponse
.
succ
(
pageDataVO
);
//添加个人积分状态
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityPopularizeBiz.java
View file @
299603ff
This diff is collapsed.
Click to expand it.
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/handler/PopularizeMQHandler.java
View file @
299603ff
...
...
@@ -2,15 +2,11 @@ package com.xxfc.platform.activity.handler;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.wxiaoqi.security.admin.dto.RegisterQueueDTO
;
import
com.rabbitmq.client.Channel
;
import
com.xxfc.platform.activity.biz.ActivityPopularizeBiz
;
import
com.xxfc.platform.activity.biz.ActivityUserJoinBiz
;
import
com.xxfc.platform.activity.biz.IntegralUserRecordBiz
;
import
com.xxfc.platform.activity.config.RabbitActivityConfig
;
import
com.xxfc.platform.activity.entity.ActivityPopularize
;
import
com.xxfc.platform.activity.vo.IntegralUserRecordDto
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.amqp.core.Message
;
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/mapper/ActivityLuckyDrawMapper.java
View file @
299603ff
...
...
@@ -2,9 +2,11 @@ package com.xxfc.platform.activity.mapper;
import
com.xxfc.platform.activity.dto.ActivityLuckDrawFindDTO
;
import
com.xxfc.platform.activity.entity.ActivityLuckyDraw
;
import
com.xxfc.platform.activity.vo.ActivityLuckyDrawListVo
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.util.List
;
import
java.util.Map
;
/**
* 活动抽奖报名表
...
...
@@ -16,4 +18,6 @@ import java.util.List;
public
interface
ActivityLuckyDrawMapper
extends
Mapper
<
ActivityLuckyDraw
>
{
List
<
ActivityLuckyDraw
>
listLuckDrawWithPage
(
ActivityLuckDrawFindDTO
activityLuckDrawFindDTO
);
List
<
ActivityLuckyDrawListVo
>
getAllByPage
(
Map
<
String
,
Object
>
param
);
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityPopularizeController.java
View file @
299603ff
package
com
.
xxfc
.
platform
.
activity
.
rest
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
...
...
@@ -29,6 +30,7 @@ import tk.mybatis.mapper.entity.Example;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -156,7 +158,14 @@ public class ActivityPopularizeController extends BaseController<ActivityPopular
setUserId
(
getAppUser
().
getUserid
());
setPopularizeId
(
itemAddDTO
.
getPopularizeId
());
}});
Date
now
=
DateUtil
.
date
();
Date
start
=
DateUtil
.
date
(
ap
.
getStartTime
());
Date
end
=
DateUtil
.
date
(
ap
.
getEndTime
());
//判断是否活动超时
if
(
now
.
before
(
start
)
||
now
.
after
(
end
))
{
return
ObjectRestResponse
.
createFailedResult
(
2005
,
"活动已结束"
);
}
//添加用户活动关系
if
(
null
==
activityPopularizeUser
)
{
activityPopularizeUser
=
popularizeUserBiz
.
insertSelectiveReT
(
new
ActivityPopularizeUser
(){{
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/admin/ActivityLuckyDrawAdminController.java
View file @
299603ff
package
com
.
xxfc
.
platform
.
activity
.
rest
.
admin
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.activity.biz.ActivityLuckyDrawBiz
;
import
com.xxfc.platform.activity.dto.ActivityLuckDrawFindDTO
;
import
com.xxfc.platform.activity.entity.ActivityLuckyDraw
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.xxfc.platform.activity.vo.ActivityLuckyDrawListVo
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
...
@@ -38,9 +38,8 @@ public class ActivityLuckyDrawAdminController {
* @return
*/
@PostMapping
(
"/page"
)
public
ObjectRestResponse
<
PageDataVO
<
ActivityLuckyDraw
>>
listActivtyLuckyDrawWithPage
(
@RequestBody
ActivityLuckDrawFindDTO
activityLuckDrawFindDTO
)
{
PageDataVO
<
ActivityLuckyDraw
>
activityLuckyDrawPageDataVO
=
activityLuckyDrawBiz
.
listLuckDrawWithPage
(
activityLuckDrawFindDTO
);
return
ObjectRestResponse
.
succ
(
activityLuckyDrawPageDataVO
);
public
ObjectRestResponse
<
PageDataVO
<
ActivityLuckyDrawListVo
>>
listActivtyLuckyDrawWithPage
(
@RequestBody
ActivityLuckDrawFindDTO
activityLuckDrawFindDTO
)
{
return
activityLuckyDrawBiz
.
getAll
(
activityLuckDrawFindDTO
);
}
@PostMapping
(
"/export"
)
...
...
xx-activity/xx-activity-server/src/main/resources/mapper/ActivityLuckyDrawMapper.xml
View file @
299603ff
...
...
@@ -39,4 +39,32 @@
order by `crt_time` desc
</select>
<select
id=
"getAllByPage"
resultType=
"com.xxfc.platform.activity.vo.ActivityLuckyDrawListVo"
parameterType=
"Map"
>
select * from `activity_lucky_draw_list` where 1=1
<if
test=
"activityId != null"
>
and `activity_id`=#{activityId}
</if>
<if
test=
"phone != null and phone != ''"
>
and `phone`=#{phone}
</if>
<if
test=
"parentPhone!=null and parentPhone!=''"
>
and `parentPhone`=#{parentPhone}
</if>
<if
test=
"startTime != null and endTime != null"
>
and `crt_time` between #{startTime} and #{endTime}
</if>
<if
test=
"startTime != null and endTime == null"
>
and
<![CDATA[
`crt_time` >
= #{startTime}
]]>
</if>
<if
test=
"startTime==null and endTime!=null"
>
and
<![CDATA[
`crt_time`<=#{endTime}
]]>
</if>
order by `crt_time` desc
</select>
</mapper>
\ 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