Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
向汉
/
uc-engine
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
546d2831
...
546d28310d8f2bd1c3e6f6e7dedbe83c9e8b2c63
authored
2022-02-07 13:24:13 +0800
by
xianghan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.修改权益触发事件的发放逻辑,修改Timestamp对象为LocalDateTime对象
1 parent
acf75df0
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
162 additions
and
169 deletions
member-service-api/src/main/java/com/topdraw/module/mq/DataSyncMsg.java
member-service-api/src/main/java/com/topdraw/module/mq/DeviceType.java
member-service-impl/pom.xml
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/domain/CouponHistory.java
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/repository/CouponHistoryRepository.java
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/rest/CouponHistoryController.java
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/service/CouponHistoryService.java
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/service/dto/CouponHistoryDTO.java
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/service/impl/CouponHistoryServiceImpl.java
member-service-impl/src/main/java/com/topdraw/business/module/coupon/rest/CouponController.java
member-service-impl/src/main/java/com/topdraw/business/module/exp/detail/rest/ExpDetailController.java
member-service-impl/src/main/java/com/topdraw/business/module/member/address/rest/MemberAddressController.java
member-service-impl/src/main/java/com/topdraw/business/module/member/domain/Member.java
member-service-impl/src/main/java/com/topdraw/business/module/member/group/rest/MemberGroupController.java
member-service-impl/src/main/java/com/topdraw/business/module/member/profile/rest/MemberProfileController.java
member-service-impl/src/main/java/com/topdraw/business/module/member/relatedinfo/rest/MemberRelatedInfoController.java
member-service-impl/src/main/java/com/topdraw/business/module/member/rest/MemberController.java
member-service-impl/src/main/java/com/topdraw/business/module/member/service/dto/MemberDTO.java
member-service-impl/src/main/java/com/topdraw/business/module/member/viphistory/rest/MemberVipHistoryController.java
member-service-impl/src/main/java/com/topdraw/business/module/points/standingbook/rest/PointsStandingBookController.java
member-service-impl/src/main/java/com/topdraw/business/module/rights/permanentrights/rest/PermanentRightsController.java
member-service-impl/src/main/java/com/topdraw/business/module/task/attribute/rest/TaskAttrController.java
member-service-impl/src/main/java/com/topdraw/business/module/task/progress/rest/TrTaskProgressController.java
member-service-impl/src/main/java/com/topdraw/business/module/task/rest/TaskController.java
member-service-impl/src/main/java/com/topdraw/business/module/task/template/rest/TaskTemplateController.java
member-service-impl/src/main/java/com/topdraw/business/module/user/iptv/repository/UserTvRepository.java
member-service-impl/src/main/java/com/topdraw/business/module/user/iptv/rest/UserTvController.java
member-service-impl/src/main/java/com/topdraw/business/module/user/iptv/service/UserTvService.java
member-service-impl/src/main/java/com/topdraw/business/module/user/iptv/service/impl/UserTvServiceImpl.java
member-service-impl/src/main/java/com/topdraw/business/module/user/weixin/rest/UserWeixinController.java
member-service-impl/src/main/java/com/topdraw/business/process/rest/CouponOperationController.java
member-service-impl/src/main/java/com/topdraw/business/process/rest/ExpOperationController.java
member-service-impl/src/main/java/com/topdraw/business/process/rest/MemberOperationController.java
member-service-impl/src/main/java/com/topdraw/business/process/rest/PointsOperationController.java
member-service-impl/src/main/java/com/topdraw/business/process/rest/TaskOperationController.java
member-service-impl/src/main/java/com/topdraw/business/process/rest/UserOperationController.java
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/CouponOperationServiceImpl.java
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/ExpOperationServiceImpl.java
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/PointsOperationServiceImpl.java
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/TaskOperationServiceImpl.java
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
member-service-impl/src/test/java/com/topdraw/test/business/basicdata/member/rest/MemberControllerTest.java
member-service-impl/src/test/java/com/topdraw/test/business/process/service/MemberOperationServiceTest.java
member-service-api/src/main/java/com/topdraw/module/mq/DataSyncMsg.java
View file @
546d283
...
...
@@ -40,6 +40,7 @@ public class DataSyncMsg implements Serializable {
private
Integer
event
;
// 具体事件 行为事件类型 1:登录;2:观影;3:参与活动;4:订购;10:跨屏绑定;11:积分转移;30:积分兑换商品;98:系统操作;99:其他
@NotNull
private
Long
memberId
;
// 会员id
private
Long
userId
;
// 账户id
@NotNull
private
Integer
deviceType
;
//设备类型 1:大屏;2:小屏(微信)3.小屏(xx)
@NotNull
...
...
member-service-api/src/main/java/com/topdraw/module/mq/DeviceType.java
0 → 100644
View file @
546d283
package
com
.
topdraw
.
module
.
mq
;
/**
* @author :
* @description:
* @function :
* @date :Created in 2022/2/3 22:46
* @version: :
* @modified By:
* @since : modified in 2022/2/3 22:46
*/
public
enum
DeviceType
{
IPTV
(),
weixin
();
}
member-service-impl/pom.xml
View file @
546d283
...
...
@@ -34,13 +34,6 @@
<version>
${parent.version}
</version>
</dependency>
<!--代码生成器-->
<dependency>
<groupId>
com.topdraw
</groupId>
<artifactId>
code-generator
</artifactId>
<version>
3.1.0
</version>
</dependency>
<!-- Spring boot 热部署 : 此热部署会遇到 java.lang.ClassCastException 异常 -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/domain/CouponHistory.java
View file @
546d283
...
...
@@ -48,7 +48,7 @@ public class CouponHistory implements Serializable {
// 领取时间
@Column
(
name
=
"receive_time"
)
private
Timestamp
receiveTime
;
private
LocalDateTime
receiveTime
;
// 失效时间
@Column
(
name
=
"expire_time"
)
...
...
@@ -60,7 +60,7 @@ public class CouponHistory implements Serializable {
// 使用时间
@Column
(
name
=
"use_time"
)
private
Timestamp
useTime
;
private
LocalDateTime
useTime
;
// 订单详情id
@Column
(
name
=
"order_detail_id"
)
...
...
@@ -69,12 +69,12 @@ public class CouponHistory implements Serializable {
// 创建时间
@CreatedDate
@Column
(
name
=
"create_time"
)
private
Timestamp
createTime
;
private
LocalDateTime
createTime
;
// 更新时间
@LastModifiedDate
@Column
(
name
=
"update_time"
)
private
Timestamp
updateTime
;
private
LocalDateTime
updateTime
;
public
void
copy
(
CouponHistory
source
){
BeanUtil
.
copyProperties
(
source
,
this
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
));
...
...
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/repository/CouponHistoryRepository.java
View file @
546d283
...
...
@@ -5,6 +5,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
java.sql.Timestamp
;
import
java.time.LocalDateTime
;
/**
* @author XiangHan
...
...
@@ -14,7 +15,7 @@ public interface CouponHistoryRepository extends JpaRepository<CouponHistory, Lo
Long
countByUserId
(
Long
userId
);
Long
countByUserIdAndExpireTimeBefore
(
Long
userId
,
Timestamp
now
);
Long
countByUserIdAndExpireTimeBefore
(
Long
userId
,
LocalDateTime
now
);
Long
countByUserIdAndExpireTimeBetween
(
Long
userId
,
Timestamp
now
,
Timestamp
expireTime
);
Long
countByUserIdAndExpireTimeBetween
(
Long
userId
,
LocalDateTime
now
,
LocalDateTime
expireTime
);
}
...
...
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/rest/CouponHistoryController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
coupon
.
history
.
rest
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.coupon.history.domain.CouponHistory
;
import
com.topdraw.business.module.coupon.history.service.CouponHistoryService
;
import
com.topdraw.business.module.coupon.history.service.dto.CouponHistoryQueryCriteria
;
...
...
@@ -35,7 +34,6 @@ public class CouponHistoryController {
return
ResultInfo
.
success
(
CouponHistoryService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
(
value
=
"/create"
)
@ApiOperation
(
"新增CouponHistory"
)
public
ResultInfo
create
(
@Validated
@RequestBody
CouponHistory
resources
)
{
...
...
@@ -43,7 +41,6 @@ public class CouponHistoryController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
"修改CouponHistory"
)
public
ResultInfo
update
(
@Validated
@RequestBody
CouponHistory
resources
)
{
...
...
@@ -52,7 +49,6 @@ public class CouponHistoryController {
}
@Log
@DeleteMapping
(
value
=
"/delete/{id}"
)
@ApiOperation
(
"删除CouponHistory"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/service/CouponHistoryService.java
View file @
546d283
...
...
@@ -6,6 +6,7 @@ import com.topdraw.business.module.coupon.history.service.dto.CouponHistoryQuery
import
org.springframework.data.domain.Pageable
;
import
java.sql.Timestamp
;
import
java.time.LocalDateTime
;
import
java.util.Map
;
import
java.util.List
;
...
...
@@ -45,7 +46,7 @@ public interface CouponHistoryService {
Long
countByUserId
(
Long
userId
);
Long
countByUserIdAndExpireTimeBefore
(
Long
userId
,
Timestamp
now
);
Long
countByUserIdAndExpireTimeBefore
(
Long
userId
,
LocalDateTime
now
);
Long
countByUserIdAndExpireTimeBetween
(
Long
userId
,
Timestamp
now
,
Timestamp
expireTime
);
Long
countByUserIdAndExpireTimeBetween
(
Long
userId
,
LocalDateTime
now
,
LocalDateTime
expireTime
);
}
...
...
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/service/dto/CouponHistoryDTO.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
coupon
.
history
.
service
.
dto
;
import
lombok.Data
;
import
java.sql.Timestamp
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
...
...
@@ -29,7 +28,7 @@ public class CouponHistoryDTO implements Serializable {
private
String
userNickname
;
// 领取时间
private
Timestamp
receiveTime
;
private
LocalDateTime
receiveTime
;
// 失效时间
private
LocalDateTime
expireTime
;
...
...
@@ -38,14 +37,14 @@ public class CouponHistoryDTO implements Serializable {
private
Integer
useStatus
;
// 使用时间
private
Timestamp
useTime
;
private
LocalDateTime
useTime
;
// 订单详情id
private
Long
orderDetailId
;
// 创建时间
private
Timestamp
createTime
;
private
LocalDateTime
createTime
;
// 更新时间
private
Timestamp
updateTime
;
private
LocalDateTime
updateTime
;
}
...
...
member-service-impl/src/main/java/com/topdraw/business/module/coupon/history/service/impl/CouponHistoryServiceImpl.java
View file @
546d283
...
...
@@ -20,6 +20,7 @@ import com.topdraw.utils.PageUtil;
import
com.topdraw.utils.QueryHelp
;
import
java.sql.Timestamp
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -87,12 +88,12 @@ public class CouponHistoryServiceImpl implements CouponHistoryService {
}
@Override
public
Long
countByUserIdAndExpireTimeBefore
(
Long
userId
,
Timestamp
now
)
{
public
Long
countByUserIdAndExpireTimeBefore
(
Long
userId
,
LocalDateTime
now
)
{
return
this
.
CouponHistoryRepository
.
countByUserIdAndExpireTimeBefore
(
userId
,
now
);
}
@Override
public
Long
countByUserIdAndExpireTimeBetween
(
Long
userId
,
Timestamp
now
,
Timestamp
expireTime
)
{
public
Long
countByUserIdAndExpireTimeBetween
(
Long
userId
,
LocalDateTime
now
,
LocalDateTime
expireTime
)
{
return
this
.
CouponHistoryRepository
.
countByUserIdAndExpireTimeBetween
(
userId
,
now
,
expireTime
);
}
...
...
member-service-impl/src/main/java/com/topdraw/business/module/coupon/rest/CouponController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
coupon
.
rest
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.coupon.domain.Coupon
;
import
com.topdraw.business.module.coupon.service.CouponService
;
import
com.topdraw.business.module.coupon.service.dto.CouponQueryCriteria
;
...
...
@@ -35,7 +34,6 @@ public class CouponController {
return
ResultInfo
.
success
(
CouponService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
(
value
=
"/create"
)
@ApiOperation
(
"新增Coupon"
)
public
ResultInfo
create
(
@Validated
@RequestBody
Coupon
resources
)
{
...
...
@@ -43,7 +41,6 @@ public class CouponController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
"修改Coupon"
)
public
ResultInfo
update
(
@Validated
@RequestBody
Coupon
resources
)
{
...
...
@@ -51,8 +48,6 @@ public class CouponController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/delete/{id}"
)
@ApiOperation
(
"删除Coupon"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/exp/detail/rest/ExpDetailController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
exp
.
detail
.
rest
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.exp.detail.domain.ExpDetail
;
import
com.topdraw.business.module.exp.detail.service.ExpDetailService
;
import
com.topdraw.business.module.exp.detail.service.dto.ExpDetailQueryCriteria
;
...
...
@@ -35,7 +34,6 @@ public class ExpDetailController {
return
ResultInfo
.
success
(
ExpDetailService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
(
value
=
"/create"
)
@ApiOperation
(
"新增ExpDetail"
)
public
ResultInfo
create
(
@Validated
@RequestBody
ExpDetail
resources
)
{
...
...
@@ -43,7 +41,6 @@ public class ExpDetailController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
"修改ExpDetail"
)
public
ResultInfo
update
(
@Validated
@RequestBody
ExpDetail
resources
)
{
...
...
@@ -51,8 +48,6 @@ public class ExpDetailController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/delete/{id}"
)
@ApiOperation
(
"删除ExpDetail"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/member/address/rest/MemberAddressController.java
View file @
546d283
...
...
@@ -3,7 +3,6 @@ package com.topdraw.business.module.member.address.rest;
import
com.topdraw.business.module.member.service.MemberService
;
import
com.topdraw.business.module.member.service.dto.MemberDTO
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.member.address.domain.MemberAddress
;
import
com.topdraw.business.module.member.address.service.MemberAddressService
;
import
com.topdraw.business.module.member.address.service.dto.MemberAddressQueryCriteria
;
...
...
@@ -43,7 +42,6 @@ public class MemberAddressController {
return
ResultInfo
.
success
(
MemberAddressService
.
findById
(
id
));
}
@Log
@PostMapping
(
value
=
"/create"
)
@ApiOperation
(
"新增MemberAddress"
)
public
ResultInfo
create
(
@Validated
@RequestBody
MemberAddress
resources
)
{
...
...
@@ -51,7 +49,6 @@ public class MemberAddressController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
"修改MemberAddress"
)
public
ResultInfo
update
(
@Validated
@RequestBody
MemberAddress
resources
)
{
...
...
@@ -69,7 +66,6 @@ public class MemberAddressController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/delete/{id}"
)
@ApiOperation
(
"删除MemberAddress"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/member/domain/Member.java
View file @
546d283
...
...
@@ -116,17 +116,17 @@ public class Member implements Serializable {
/** iptv账号绑定时间 */
@Column
(
name
=
"bind_iptv_time"
)
private
Timestamp
bindIptvTime
;
private
LocalDateTime
bindIptvTime
;
/** 创建时间 */
@CreatedDate
@Column
(
name
=
"create_time"
)
private
Timestamp
createTime
;
private
LocalDateTime
createTime
;
/** 更新时间 */
@LastModifiedDate
@Column
(
name
=
"update_time"
)
private
Timestamp
updateTime
;
private
LocalDateTime
updateTime
;
/** 是否在黑名单 1:是;0否 */
@Column
(
name
=
"black_status"
)
...
...
member-service-impl/src/main/java/com/topdraw/business/module/member/group/rest/MemberGroupController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
member
.
group
.
rest
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.member.group.domain.MemberGroup
;
import
com.topdraw.business.module.member.group.service.MemberGroupService
;
import
com.topdraw.business.module.member.group.service.dto.MemberGroupQueryCriteria
;
...
...
@@ -35,7 +34,6 @@ public class MemberGroupController {
return
ResultInfo
.
success
(
MemberGroupService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
@ApiOperation
(
"新增MemberGroup"
)
public
ResultInfo
create
(
@Validated
@RequestBody
MemberGroup
resources
)
{
...
...
@@ -43,7 +41,6 @@ public class MemberGroupController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
@ApiOperation
(
"修改MemberGroup"
)
public
ResultInfo
update
(
@Validated
@RequestBody
MemberGroup
resources
)
{
...
...
@@ -51,8 +48,6 @@ public class MemberGroupController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/{id}"
)
@ApiOperation
(
"删除MemberGroup"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/member/profile/rest/MemberProfileController.java
View file @
546d283
...
...
@@ -5,7 +5,6 @@ import com.topdraw.business.module.member.profile.service.dto.MemberProfileDTO;
import
com.topdraw.business.module.member.service.MemberService
;
import
com.topdraw.business.module.member.service.dto.MemberDTO
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.member.profile.domain.MemberProfile
;
import
com.topdraw.business.module.member.profile.service.MemberProfileService
;
import
com.topdraw.utils.StringUtils
;
...
...
@@ -44,7 +43,6 @@ public class MemberProfileController {
return ResultInfo.success(MemberProfileService.queryAll(criteria));
}*/
@Log
@PostMapping
(
value
=
"/create"
)
@ApiOperation
(
"新增MemberProfile"
)
@AnonymousAccess
...
...
@@ -53,7 +51,6 @@ public class MemberProfileController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
"修改MemberProfile"
)
@AnonymousAccess
...
...
@@ -78,7 +75,6 @@ public class MemberProfileController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
@ApiOperation
(
"修改MemberProfile"
)
@AnonymousAccess
...
...
@@ -87,8 +83,6 @@ public class MemberProfileController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/delete/{id}"
)
@ApiOperation
(
"删除MemberProfile"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/member/relatedinfo/rest/MemberRelatedInfoController.java
View file @
546d283
...
...
@@ -6,7 +6,6 @@ import com.topdraw.business.module.member.relatedinfo.service.dto.MemberRelatedI
import
com.topdraw.business.module.member.service.MemberService
;
import
com.topdraw.business.module.member.service.dto.MemberDTO
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.member.relatedinfo.domain.MemberRelatedInfo
;
import
com.topdraw.business.module.member.relatedinfo.service.MemberRelatedInfoService
;
import
com.topdraw.business.module.member.relatedinfo.service.dto.MemberRelatedInfoQueryCriteria
;
...
...
@@ -46,7 +45,6 @@ public class MemberRelatedInfoController {
return
ResultInfo
.
successPage
(
MemberRelatedInfoService
.
queryAll
(
criteria
,
pageable
));
}
@Log
@PostMapping
(
value
=
"/create"
)
@ApiOperation
(
"新增MemberRelatedInfo"
)
@AnonymousAccess
...
...
@@ -55,7 +53,6 @@ public class MemberRelatedInfoController {
return
ResultInfo
.
success
();
}
@Log
(
"修改MemberRelatedInfo"
)
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
"修改MemberRelatedInfo"
)
@AnonymousAccess
...
...
@@ -96,7 +93,6 @@ public class MemberRelatedInfoController {
return
ResultInfo
.
success
(
MemberRelatedInfoService
.
findById
(
id
));
}
@Log
@DeleteMapping
(
value
=
"/delete/{id}"
)
@ApiOperation
(
"删除MemberRelatedInfo"
)
@AnonymousAccess
...
...
member-service-impl/src/main/java/com/topdraw/business/module/member/rest/MemberController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
member
.
rest
;
import
com.topdraw.annotation.AnonymousAccess
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.member.domain.Member
;
import
com.topdraw.business.module.member.service.MemberService
;
import
com.topdraw.business.module.member.service.dto.MemberDTO
;
...
...
@@ -36,7 +35,6 @@ public class MemberController {
@Autowired
private
UserOperationService
userTvOperationService
;
@Log
@GetMapping
(
value
=
"/findById/{id}"
)
@ApiOperation
(
"新增UserTv会员"
)
public
ResultInfo
findById
(
@PathVariable
Long
id
)
{
...
...
@@ -44,7 +42,6 @@ public class MemberController {
return
ResultInfo
.
success
(
memberDTO
);
}
@Log
@PostMapping
(
value
=
"/createMemberByUserTv"
)
@ApiOperation
(
"新增UserTv会员"
)
public
ResultInfo
createMemberByUserTv
(
@Validated
@RequestBody
UserTv
resources
)
{
...
...
@@ -54,7 +51,6 @@ public class MemberController {
return
ResultInfo
.
success
(
result
);
}
@Log
@PostMapping
(
value
=
"/create"
)
@ApiOperation
(
"新增Member"
)
public
ResultInfo
create
(
@Validated
@RequestBody
Member
resources
)
{
...
...
@@ -62,7 +58,6 @@ public class MemberController {
return
ResultInfo
.
success
(
id
);
}
@Log
@PostMapping
(
value
=
"/doUpdateVip"
)
@ApiOperation
(
"修改Member等级"
)
public
ResultInfo
doUpdateVip
(
@RequestBody
Member
member
)
{
...
...
@@ -70,7 +65,6 @@ public class MemberController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
"修改Member"
)
@AnonymousAccess
...
...
member-service-impl/src/main/java/com/topdraw/business/module/member/service/dto/MemberDTO.java
View file @
546d283
...
...
@@ -81,13 +81,13 @@ public class MemberDTO implements Serializable {
private
Integer
bindIptvPlatformType
;
// iptv账号绑定时间
private
Timestamp
bindIptvTime
;
private
LocalDateTime
bindIptvTime
;
// 创建时间
private
Timestamp
createTime
;
private
LocalDateTime
createTime
;
// 更新时间
private
Timestamp
updateTime
;
private
LocalDateTime
updateTime
;
// 是否在黑名单 1:是;0否
private
Long
blackStatus
;
...
...
member-service-impl/src/main/java/com/topdraw/business/module/member/viphistory/rest/MemberVipHistoryController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
member
.
viphistory
.
rest
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.member.viphistory.domain.MemberVipHistory
;
import
com.topdraw.business.module.member.viphistory.service.MemberVipHistoryService
;
import
com.topdraw.business.module.member.viphistory.service.dto.MemberVipHistoryQueryCriteria
;
...
...
@@ -36,7 +35,6 @@ public class MemberVipHistoryController {
return
ResultInfo
.
success
(
memberVipHistoryService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
@ApiOperation
(
"新增MemberVipHistory"
)
public
ResultInfo
create
(
@Validated
@RequestBody
MemberVipHistory
resources
)
{
...
...
@@ -44,7 +42,6 @@ public class MemberVipHistoryController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
@ApiOperation
(
"修改MemberVipHistory"
)
public
ResultInfo
update
(
@Validated
@RequestBody
MemberVipHistory
resources
)
{
...
...
@@ -52,8 +49,6 @@ public class MemberVipHistoryController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/{id}"
)
@ApiOperation
(
"删除MemberVipHistory"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/points/standingbook/rest/PointsStandingBookController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
points
.
standingbook
.
rest
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.points.standingbook.domain.PointsStandingBook
;
import
com.topdraw.business.module.points.standingbook.service.PointsStandingBookService
;
import
com.topdraw.business.module.points.standingbook.service.dto.PointsStandingBookQueryCriteria
;
...
...
@@ -35,7 +34,6 @@ public class PointsStandingBookController {
return
ResultInfo
.
success
(
PointsStandingBookService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
@ApiOperation
(
"新增PointsStandingBook"
)
public
ResultInfo
create
(
@Validated
@RequestBody
PointsStandingBook
resources
)
{
...
...
@@ -43,7 +41,6 @@ public class PointsStandingBookController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
@ApiOperation
(
"修改PointsStandingBook"
)
public
ResultInfo
update
(
@Validated
@RequestBody
PointsStandingBook
resources
)
{
...
...
@@ -51,8 +48,6 @@ public class PointsStandingBookController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/{id}"
)
@ApiOperation
(
"删除PointsStandingBook"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/rights/permanentrights/rest/PermanentRightsController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
rights
.
permanentrights
.
rest
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.rights.permanentrights.domain.PermanentRights
;
import
com.topdraw.business.module.rights.permanentrights.service.PermanentRightsService
;
import
com.topdraw.business.module.rights.permanentrights.service.dto.PermanentRightsQueryCriteria
;
...
...
@@ -35,7 +34,6 @@ public class PermanentRightsController {
return
ResultInfo
.
success
(
PermanentRightsService
.
findById
(
id
));
}
@Log
@PostMapping
(
value
=
"/create"
)
@ApiOperation
(
"新增PermanentRights"
)
public
ResultInfo
create
(
@Validated
@RequestBody
PermanentRights
resources
)
{
...
...
@@ -43,7 +41,6 @@ public class PermanentRightsController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
"修改PermanentRights"
)
public
ResultInfo
update
(
@Validated
@RequestBody
PermanentRights
resources
)
{
...
...
@@ -51,7 +48,6 @@ public class PermanentRightsController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/delete/{id}"
)
@ApiOperation
(
"删除PermanentRights"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/task/attribute/rest/TaskAttrController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
task
.
attribute
.
rest
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.task.attribute.domain.TaskAttr
;
import
com.topdraw.business.module.task.attribute.service.TaskAttrService
;
import
com.topdraw.business.module.task.attribute.service.dto.TaskAttrQueryCriteria
;
...
...
@@ -39,7 +38,6 @@ public class TaskAttrController {
return
ResultInfo
.
success
(
TaskAttrService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
@ApiOperation
(
"新增TaskAttr"
)
public
ResultInfo
create
(
@Validated
@RequestBody
TaskAttr
resources
)
{
...
...
@@ -47,7 +45,6 @@ public class TaskAttrController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
@ApiOperation
(
"修改TaskAttr"
)
public
ResultInfo
update
(
@Validated
@RequestBody
TaskAttr
resources
)
{
...
...
@@ -55,8 +52,6 @@ public class TaskAttrController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/{id}"
)
@ApiOperation
(
"删除TaskAttr"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/task/progress/rest/TrTaskProgressController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
task
.
progress
.
rest
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.task.progress.domain.TrTaskProgress
;
import
com.topdraw.business.module.task.progress.service.TrTaskProgressService
;
import
com.topdraw.business.module.task.progress.service.dto.TrTaskProgressQueryCriteria
;
...
...
@@ -35,7 +34,6 @@ public class TrTaskProgressController {
return
ResultInfo
.
success
(
TrTaskProgressService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
@ApiOperation
(
"新增TrTaskProgress"
)
public
ResultInfo
create
(
@Validated
@RequestBody
TrTaskProgress
resources
)
{
...
...
@@ -43,7 +41,6 @@ public class TrTaskProgressController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
@ApiOperation
(
"修改TrTaskProgress"
)
public
ResultInfo
update
(
@Validated
@RequestBody
TrTaskProgress
resources
)
{
...
...
@@ -51,8 +48,6 @@ public class TrTaskProgressController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/{id}"
)
@ApiOperation
(
"删除TrTaskProgress"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/task/rest/TaskController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
task
.
rest
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.task.domain.Task
;
import
com.topdraw.business.module.task.service.TaskService
;
import
com.topdraw.business.module.task.service.dto.TaskQueryCriteria
;
...
...
@@ -35,7 +34,6 @@ public class TaskController {
return
ResultInfo
.
success
(
TaskService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
@ApiOperation
(
"新增Task"
)
public
ResultInfo
create
(
@Validated
@RequestBody
Task
resources
)
{
...
...
@@ -43,7 +41,6 @@ public class TaskController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
@ApiOperation
(
"修改Task"
)
public
ResultInfo
update
(
@Validated
@RequestBody
Task
resources
)
{
...
...
@@ -51,8 +48,6 @@ public class TaskController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/{id}"
)
@ApiOperation
(
"删除Task"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/task/template/rest/TaskTemplateController.java
View file @
546d283
package
com
.
topdraw
.
business
.
module
.
task
.
template
.
rest
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.task.template.domain.TaskTemplate
;
import
com.topdraw.business.module.task.template.service.TaskTemplateService
;
import
com.topdraw.business.module.task.template.service.dto.TaskTemplateQueryCriteria
;
...
...
@@ -35,7 +34,6 @@ public class TaskTemplateController {
return
ResultInfo
.
success
(
TaskTemplateService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
@ApiOperation
(
"新增TaskTemplate"
)
public
ResultInfo
create
(
@Validated
@RequestBody
TaskTemplate
resources
)
{
...
...
@@ -43,7 +41,6 @@ public class TaskTemplateController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
@ApiOperation
(
"修改TaskTemplate"
)
public
ResultInfo
update
(
@Validated
@RequestBody
TaskTemplate
resources
)
{
...
...
@@ -51,8 +48,6 @@ public class TaskTemplateController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/{id}"
)
@ApiOperation
(
"删除TaskTemplate"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/user/iptv/repository/UserTvRepository.java
View file @
546d283
...
...
@@ -15,4 +15,6 @@ public interface UserTvRepository extends JpaRepository<UserTv, Long>, JpaSpecif
Optional
<
UserTv
>
findByPlatformAccount
(
String
platformAccount
);
Optional
<
UserTv
>
findByPriorityMemberCode
(
String
memberCode
);
Optional
<
UserTv
>
findByMemberId
(
Long
memberId
);
}
...
...
member-service-impl/src/main/java/com/topdraw/business/module/user/iptv/rest/UserTvController.java
View file @
546d283
...
...
@@ -2,7 +2,6 @@ package com.topdraw.business.module.user.iptv.rest;
import
com.topdraw.annotation.AnonymousAccess
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.user.iptv.domain.UserTv
;
import
com.topdraw.business.module.user.iptv.service.UserTvService
;
import
com.topdraw.business.module.user.iptv.service.dto.UserTvQueryCriteria
;
...
...
@@ -36,7 +35,6 @@ public class UserTvController {
return
ResultInfo
.
success
(
UserTvService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
(
value
=
"/create"
)
@ApiOperation
(
"新增UserTv"
)
@AnonymousAccess
...
...
@@ -45,7 +43,6 @@ public class UserTvController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
@ApiOperation
(
"修改UserTv"
)
@AnonymousAccess
...
...
@@ -54,7 +51,6 @@ public class UserTvController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/{id}"
)
@ApiOperation
(
"删除UserTv"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/module/user/iptv/service/UserTvService.java
View file @
546d283
...
...
@@ -44,4 +44,6 @@ public interface UserTvService {
UserTvDTO
findByPlatformAccount
(
String
platformAccount
);
UserTvDTO
findByPriorityMemberCode
(
String
memberCode
);
UserTvDTO
findByMemberId
(
Long
memberId
);
}
...
...
member-service-impl/src/main/java/com/topdraw/business/module/user/iptv/service/impl/UserTvServiceImpl.java
View file @
546d283
...
...
@@ -115,5 +115,15 @@ public class UserTvServiceImpl implements UserTvService {
return
null
;
}
@Override
public
UserTvDTO
findByMemberId
(
Long
memberId
)
{
Optional
<
UserTv
>
userTv
=
UserTvRepository
.
findByMemberId
(
memberId
);
if
(
userTv
.
isPresent
())
{
ValidationUtil
.
isNull
(
userTv
.
get
().
getId
(),
"UserTv"
,
"id"
,
userTv
.
get
().
getId
());
return
UserTvMapper
.
toDto
(
userTv
.
get
());
}
return
null
;
}
}
...
...
member-service-impl/src/main/java/com/topdraw/business/module/user/weixin/rest/UserWeixinController.java
View file @
546d283
...
...
@@ -2,7 +2,6 @@ package com.topdraw.business.module.user.weixin.rest;
import
com.topdraw.annotation.AnonymousAccess
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.user.weixin.domain.UserWeixin
;
import
com.topdraw.business.module.user.weixin.service.UserWeixinService
;
import
com.topdraw.business.module.user.weixin.service.dto.UserWeixinQueryCriteria
;
...
...
@@ -36,7 +35,6 @@ public class UserWeixinController {
return
ResultInfo
.
success
(
UserWeixinService
.
queryAll
(
criteria
));
}
@Log
@PostMapping
(
value
=
"/create"
)
@ApiOperation
(
"新增UserWeixin"
)
@AnonymousAccess
...
...
@@ -45,7 +43,6 @@ public class UserWeixinController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
"修改UserWeixin"
)
@AnonymousAccess
...
...
@@ -54,8 +51,6 @@ public class UserWeixinController {
return
ResultInfo
.
success
();
}
@Log
@PutMapping
(
value
=
"/updateWeixinMemberProfile"
)
@ApiOperation
(
"修改UserWeixin"
)
@AnonymousAccess
...
...
@@ -64,8 +59,6 @@ public class UserWeixinController {
return
ResultInfo
.
success
();
}
@Log
@DeleteMapping
(
value
=
"/{id}"
)
@ApiOperation
(
"删除UserWeixin"
)
public
ResultInfo
delete
(
@PathVariable
Long
id
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/process/rest/CouponOperationController.java
View file @
546d283
package
com
.
topdraw
.
business
.
process
.
rest
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.process.domian.TempCoupon
;
import
com.topdraw.business.process.service.CouponOperationService
;
import
com.topdraw.common.ResultInfo
;
...
...
@@ -23,7 +22,6 @@ public class CouponOperationController {
@Autowired
private
CouponOperationService
couponOperationService
;
@Log
@PostMapping
(
value
=
"/grantCouponByManual"
)
@ApiOperation
(
"手动发放优惠券"
)
public
ResultInfo
grantCouponByManual
(
List
<
TempCoupon
>
tempCouponList
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/process/rest/ExpOperationController.java
View file @
546d283
package
com
.
topdraw
.
business
.
process
.
rest
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.process.domian.TempCoupon
;
import
com.topdraw.business.process.domian.TempExp
;
import
com.topdraw.business.process.service.CouponOperationService
;
...
...
@@ -30,7 +29,6 @@ public class ExpOperationController {
@Autowired
private
ExpOperationService
expOperationService
;
@Log
@PostMapping
(
value
=
"/grantExpByManual"
)
@ApiOperation
(
"手动发放成长值"
)
public
ResultInfo
grantExpByManual
(
@Validated
@RequestBody
TempExp
tempExp
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/process/rest/MemberOperationController.java
View file @
546d283
package
com
.
topdraw
.
business
.
process
.
rest
;
import
com.topdraw.annotation.AnonymousAccess
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.member.profile.service.dto.MemberProfileDTO
;
import
com.topdraw.business.module.member.service.dto.MemberDTO
;
import
com.topdraw.business.module.user.weixin.service.dto.UserWeixinQueryCriteria
;
...
...
@@ -23,7 +22,6 @@ public class MemberOperationController {
@Autowired
private
MemberOperationService
memberOperationService
;
@Log
(
"获取会员基本信息并且检查vip状态"
)
@GetMapping
(
"/getMemberProfileAndCheckVip/{appId}/{memberId}"
)
@ApiOperation
(
"获取会员基本信息并且检查vip状态"
)
@AnonymousAccess
...
...
@@ -32,7 +30,6 @@ public class MemberOperationController {
return
ResultInfo
.
success
(
memberProfileDTO
);
}
@Log
(
"购买vip"
)
@PutMapping
(
"/buyVip"
)
@ApiOperation
(
"购买vip"
)
@AnonymousAccess
...
...
member-service-impl/src/main/java/com/topdraw/business/process/rest/PointsOperationController.java
View file @
546d283
package
com
.
topdraw
.
business
.
process
.
rest
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.member.service.MemberService
;
import
com.topdraw.business.module.member.service.dto.MemberDTO
;
import
com.topdraw.business.module.points.available.service.PointsAvailableService
;
...
...
@@ -74,7 +73,6 @@ public class PointsOperationController {
return
ResultInfo
.
successPage
(
pointsAvailableService
.
queryAll
(
criteria
,
pageable
));
}
@Log
@GetMapping
(
value
=
"/cleanInvalidPointsAndCalculateCurrentPoints/{id}"
)
@ApiOperation
(
"清除过期积分并计算总积分,供客户端会员查询积分时调用"
)
public
ResultInfo
cleanInvalidPointsAndCalculateCurrentPoints
(
@PathVariable
(
"id"
)
Long
id
)
{
...
...
@@ -82,7 +80,6 @@ public class PointsOperationController {
return
ResultInfo
.
success
(
Objects
.
isNull
(
aLong
)
?
0L
:
aLong
);
}
@Log
@PostMapping
(
value
=
"/grantPointsByManual"
)
@ApiOperation
(
"手动发放积分"
)
public
ResultInfo
grantPointsByManual
(
@Validated
@RequestBody
TempPoints
tempPoints
)
{
...
...
@@ -105,7 +102,6 @@ public class PointsOperationController {
* @param tempIptvUser
* @return
*/
@Log
@PostMapping
(
value
=
"/customPointsByUserTvPlatformAccount"
)
@ApiOperation
(
"通过大屏账户积分消耗"
)
public
ResultInfo
customPointsByUserTvPlatformAccount
(
@Validated
@RequestBody
TempCustomPointBean
tempIptvUser
)
{
...
...
@@ -144,7 +140,6 @@ public class PointsOperationController {
* @param tempPoints
* @return
*/
@Log
@PostMapping
(
value
=
"/customPointsByUserId"
)
@ApiOperation
(
"积分消耗"
)
public
ResultInfo
customPointsByUserId
(
@Validated
@RequestBody
TempPoints
tempPoints
)
{
...
...
@@ -185,7 +180,6 @@ public class PointsOperationController {
return
userWeixinDTO
.
getMemberId
();
}
@Log
@PostMapping
(
value
=
"/consumePoints"
)
@ApiOperation
(
"积分消耗"
)
public
ResultInfo
customPoints
(
@Validated
@RequestBody
TempPoints
tempPoints
)
{
...
...
member-service-impl/src/main/java/com/topdraw/business/process/rest/TaskOperationController.java
View file @
546d283
package
com
.
topdraw
.
business
.
process
.
rest
;
import
com.topdraw.annotation.AnonymousAccess
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.process.domian.TempIptvUser
;
import
com.topdraw.business.process.service.TaskOperationService
;
import
com.topdraw.common.ResultInfo
;
...
...
@@ -26,7 +25,6 @@ public class TaskOperationController {
*
* @param criteria 消息
*/
@Log
@PostMapping
(
value
=
"/dealTask"
)
@ApiOperation
(
"事件处理"
)
@AnonymousAccess
...
...
@@ -42,7 +40,6 @@ public class TaskOperationController {
* 1.用户每天首次进入活动详情页的时候赠送5个积分
* 2.判断任务是否已经做过,没有做过的话,保存任务记录,任务记录通过redis保存即可
*/
@Log
@PostMapping
(
value
=
"/createPoint4ChongQing"
)
@ApiOperation
(
"针对重庆大屏20211220号的积分兑换活动专门定制的接口"
)
@Deprecated
...
...
member-service-impl/src/main/java/com/topdraw/business/process/rest/UserOperationController.java
View file @
546d283
...
...
@@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.topdraw.annotation.AnonymousAccess
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.member.profile.domain.MemberProfile
;
import
com.topdraw.business.module.member.service.dto.MemberDTO
;
import
com.topdraw.business.module.user.iptv.domain.UserTv
;
...
...
@@ -57,7 +56,6 @@ public class UserOperationController {
@Autowired
private
RedisUtils
redisUtils
;
@Log
(
"新增大屏账户同时创建会员信息"
)
@PostMapping
(
value
=
"/createUserAndCreateMember"
)
@ApiOperation
(
"新增大屏账户同时创建会员信息"
)
@AnonymousAccess
...
...
@@ -68,7 +66,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
result
);
}
@Log
(
"新增小屏账户同时创建会员信息"
)
@PostMapping
(
value
=
"/createWeixinUserAndCreateMember"
)
@ApiOperation
(
"新增小屏账户同时创建会员信息"
)
@AnonymousAccess
...
...
@@ -93,7 +90,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
result
);
}
@Log
(
"获取大屏绑定的小屏会员列表"
)
@GetMapping
(
value
=
"/findBindByPlatformAccount/{platformAccount}"
)
@AnonymousAccess
public
ResultInfo
findBindByPlatformAccount
(
@PathVariable
(
"platformAccount"
)
String
platformAccount
)
{
...
...
@@ -102,7 +98,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
result
);
}
@Log
(
"带参二维码"
)
@PostMapping
(
value
=
"/sendQrCodeMessage"
)
@ApiOperation
(
"带参二维码"
)
@AnonymousAccess
...
...
@@ -112,7 +107,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
result
);
}
@Log
(
"删除全部收藏"
)
@PostMapping
(
value
=
"/deleteAllCollection"
)
@ApiOperation
(
"删除全部收藏"
)
@AnonymousAccess
...
...
@@ -122,7 +116,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
result
);
}
@Log
(
"删除收藏"
)
@PostMapping
(
value
=
"/deleteCollection"
)
@ApiOperation
(
"删除收藏"
)
@AnonymousAccess
...
...
@@ -132,7 +125,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
result
);
}
@Log
(
"添加收藏"
)
@PostMapping
(
value
=
"/addCollection"
)
@ApiOperation
(
"添加收藏"
)
@AnonymousAccess
...
...
@@ -142,9 +134,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
result
);
}
@Log
(
"大屏用户解绑"
)
@PutMapping
(
value
=
"/unbind"
)
@ApiOperation
(
"大屏用户解绑"
)
@AnonymousAccess
...
...
@@ -155,7 +144,6 @@ public class UserOperationController {
return
ResultInfo
.
success
();
}
@Log
(
"大屏更换主账号"
)
@PutMapping
(
value
=
"/changeMainAccount"
)
@ApiOperation
(
"大屏更换主账号"
)
@AnonymousAccess
...
...
@@ -166,7 +154,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
"update success"
);
}
@Log
(
"微信服务号(H5)登录"
)
@PostMapping
(
"/serviceLogin"
)
@ApiOperation
(
"微信服务号(H5)登录"
)
@AnonymousAccess
...
...
@@ -175,7 +162,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
o
);
}
@Log
(
"微信小程序登录"
)
@PostMapping
(
"/appletLogin"
)
@ApiOperation
(
"微信小程序登录"
)
@AnonymousAccess
...
...
@@ -184,7 +170,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
result
);
}
@Log
(
"微信小程序绑定大屏"
)
@PostMapping
(
"/appletBind"
)
@ApiOperation
(
"微信小程序绑定大屏"
)
@AnonymousAccess
...
...
@@ -201,7 +186,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
result
);
}
@Log
(
"微信公众号关注"
)
@PostMapping
(
"/subscribe"
)
@ApiOperation
(
"微信公众号关注"
)
@AnonymousAccess
...
...
@@ -293,7 +277,6 @@ public class UserOperationController {
}
}
@Log
(
"微信公众号取关"
)
@PostMapping
(
"/unsubscribe"
)
@ApiOperation
(
"微信公众号取关"
)
@AnonymousAccess
...
...
@@ -315,7 +298,6 @@ public class UserOperationController {
* @author Hongyan Wang
* @date 2021/8/24 4:54 下午
*/
@Log
(
"保存大屏侧信息"
)
@PostMapping
(
value
=
"/saveUserInfo"
)
@ApiOperation
(
"保存大屏侧信息"
)
@AnonymousAccess
...
...
@@ -334,7 +316,6 @@ public class UserOperationController {
return
ResultInfo
.
success
(
s
);
}
@Log
(
"保存用户手机号信息"
)
@PostMapping
(
value
=
"/saveUserWeixinPhone"
)
@ApiOperation
(
"保存用户手机号信息"
)
@AnonymousAccess
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/CouponOperationServiceImpl.java
View file @
546d283
...
...
@@ -4,6 +4,8 @@ import com.topdraw.business.module.coupon.history.domain.CouponHistory;
import
com.topdraw.business.module.coupon.history.service.CouponHistoryService
;
import
com.topdraw.business.module.coupon.service.CouponService
;
import
com.topdraw.business.module.member.domain.Member
;
import
com.topdraw.business.module.member.service.MemberService
;
import
com.topdraw.business.module.member.service.dto.MemberDTO
;
import
com.topdraw.business.process.service.CouponOperationService
;
import
com.topdraw.business.process.service.MemberOperationService
;
import
com.topdraw.business.process.domian.TempCoupon
;
...
...
@@ -39,6 +41,8 @@ public class CouponOperationServiceImpl implements CouponOperationService {
@Autowired
RightsOperationService
rightsOperationService
;
@Autowired
MemberService
memberService
;
@Autowired
RedissonClient
redissonClient
;
@Autowired
ThreadPoolTaskExecutor
threadPoolTaskExecutor
;
...
...
@@ -123,14 +127,23 @@ public class CouponOperationServiceImpl implements CouponOperationService {
* @param expireSoonCouponCount
*/
private
void
doUpdateMemberInfo
(
Long
memberId
,
Long
currentCoupon
,
Long
expireSoonCouponCount
)
{
MemberDTO
memberDTO
=
this
.
findMemberByMemberId
(
memberId
);
Member
member
=
new
Member
();
member
.
setId
(
memberId
);
BeanUtils
.
copyProperties
(
memberDTO
,
member
);
member
.
setCouponAmount
(
currentCoupon
);
member
.
setDueCouponAmount
(
expireSoonCouponCount
);
member
.
setUpdateTime
(
TimestampUtil
.
now
());
member
.
setUpdateTime
(
LocalDateTime
.
now
());
this
.
memberOperationService
.
doUpdateMemberInfo
(
member
);
}
private
MemberDTO
findMemberByMemberId
(
Long
memberId
)
{
MemberDTO
memberDTO
=
this
.
memberService
.
findById
(
memberId
);
return
memberDTO
;
}
/**
* 当前优惠券数量 = 总优惠券-已过期的优惠券
...
...
@@ -149,8 +162,8 @@ public class CouponOperationServiceImpl implements CouponOperationService {
* @return
*/
private
Long
getTotalExpireSoonCoupon
(
Long
userId
,
Integer
expireFactor
)
{
Timestamp
expireTime
=
TimestampUtil
.
localDateTime2Timestamp
(
LocalDateTime
.
now
().
plusDays
(
expireFactor
)
);
return
this
.
couponHistoryService
.
countByUserIdAndExpireTimeBetween
(
userId
,
TimestampUtil
.
now
(),
expireTime
);
LocalDateTime
expireTime
=
LocalDateTime
.
now
().
plusDays
(
expireFactor
);
return
this
.
couponHistoryService
.
countByUserIdAndExpireTimeBetween
(
userId
,
LocalDateTime
.
now
(),
expireTime
);
}
...
...
@@ -160,7 +173,7 @@ public class CouponOperationServiceImpl implements CouponOperationService {
* @return
*/
private
Long
getTotalExpireCoupon
(
Long
userId
)
{
return
this
.
couponHistoryService
.
countByUserIdAndExpireTimeBefore
(
userId
,
TimestampUtil
.
now
());
return
this
.
couponHistoryService
.
countByUserIdAndExpireTimeBefore
(
userId
,
LocalDateTime
.
now
());
}
...
...
@@ -187,7 +200,7 @@ public class CouponOperationServiceImpl implements CouponOperationService {
couponHistory
.
setCouponCode
(
tempCoupon
.
getCode
());
couponHistory
.
setUserNickname
(
tempCoupon
.
getUserNickname
());
couponHistory
.
setOrderDetailId
(
tempCoupon
.
getOrderId
());
couponHistory
.
setReceiveTime
(
TimestampUtil
.
now
());
couponHistory
.
setReceiveTime
(
LocalDateTime
.
now
());
couponHistory
.
setUseStatus
(
Objects
.
nonNull
(
couponHistory
.
getUseStatus
())
?
couponHistory
.
getUseStatus
():
0
);
this
.
couponHistoryService
.
create
(
couponHistory
);
}
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/ExpOperationServiceImpl.java
View file @
546d283
...
...
@@ -5,6 +5,7 @@ import com.topdraw.business.module.exp.detail.service.ExpDetailService;
import
com.topdraw.business.module.member.domain.Member
;
import
com.topdraw.business.module.member.level.service.MemberLevelService
;
import
com.topdraw.business.module.member.level.service.dto.MemberLevelDTO
;
import
com.topdraw.business.module.member.service.MemberService
;
import
com.topdraw.business.module.member.service.dto.MemberDTO
;
import
com.topdraw.business.process.service.ExpOperationService
;
import
com.topdraw.business.process.service.MemberOperationService
;
...
...
@@ -23,6 +24,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.Objects
;
...
...
@@ -41,6 +43,8 @@ public class ExpOperationServiceImpl implements ExpOperationService {
@Autowired
MemberLevelService
memberLevelService
;
@Autowired
MemberService
memberService
;
@Autowired
RedissonClient
redissonClient
;
@Autowired
ThreadPoolTaskExecutor
threadPoolTaskExecutor
;
...
...
@@ -137,14 +141,22 @@ public class ExpOperationServiceImpl implements ExpOperationService {
* @param memberId 会员id
*/
private
void
updateMemberInfo
(
Integer
level
,
Long
totalExp
,
Long
memberId
)
{
MemberDTO
memberDTO
=
this
.
findMemberByMemberId
(
memberId
);
Member
member
=
new
Member
();
member
.
setId
(
memberId
);
BeanUtils
.
copyProperties
(
memberDTO
,
member
);
member
.
setExp
(
totalExp
);
member
.
setLevel
(
level
);
member
.
setUpdateTime
(
TimestampUtil
.
now
());
member
.
setUpdateTime
(
LocalDateTime
.
now
());
this
.
memberOperationService
.
doUpdateMemberInfo
(
member
);
}
private
MemberDTO
findMemberByMemberId
(
Long
memberId
)
{
MemberDTO
memberDTO
=
this
.
memberService
.
findById
(
memberId
);
return
memberDTO
;
}
private
Integer
compareExp
(
long
newExp
,
MemberLevelDTO
memberLevelDTO
,
MemberDTO
memberDTO
)
{
if
(
Objects
.
nonNull
(
memberLevelDTO
))
{
Long
nextLevelExp
=
memberLevelDTO
.
getExpValue
();
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/PointsOperationServiceImpl.java
View file @
546d283
...
...
@@ -497,12 +497,15 @@ public class PointsOperationServiceImpl implements PointsOperationService {
* @param currentPoints 当前总积分
*/
private
void
freshMemberCurrentPoints
(
Long
memberId
,
Long
currentPoints
,
long
duePoints
,
TempPoints
tempPoints
)
{
MemberDTO
memberDTO
=
this
.
findMemberByMemberId
(
memberId
);
Member
member
=
new
Member
();
member
.
setId
(
memberId
);
BeanUtils
.
copyProperties
(
memberDTO
,
member
);
member
.
setPoints
(
Objects
.
nonNull
(
currentPoints
)?
currentPoints:
0
);
member
.
setDuePoints
(
duePoints
);
member
.
setUpdateTime
(
Timestamp
.
valueOf
(
LocalDateTime
.
now
()));
member
.
setCode
(
tempPoints
.
getMemberCode
());
member
.
setUpdateTime
(
LocalDateTime
.
now
());
try
{
this
.
memberOperationService
.
doUpdateMemberPoints
(
member
);
}
catch
(
Exception
e
){
...
...
@@ -510,6 +513,11 @@ public class PointsOperationServiceImpl implements PointsOperationService {
}
}
private
MemberDTO
findMemberByMemberId
(
Long
memberId
)
{
MemberDTO
memberDTO
=
this
.
memberService
.
findById
(
memberId
);
return
memberDTO
;
}
/**
* 计算当前总积分
* @param memberId 会员id
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/TaskOperationServiceImpl.java
View file @
546d283
...
...
@@ -33,6 +33,7 @@ import com.topdraw.business.module.task.template.service.TaskTemplateService;
import
com.topdraw.business.process.domian.*
;
import
com.topdraw.business.process.service.UserOperationService
;
import
com.topdraw.common.ResultInfo
;
import
com.topdraw.exception.BadRequestException
;
import
com.topdraw.module.mq.DataSyncMsg
;
import
com.topdraw.util.*
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -44,6 +45,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
javax.validation.constraints.NotNull
;
import
java.sql.Timestamp
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
...
...
@@ -82,6 +84,8 @@ public class TaskOperationServiceImpl implements TaskOperationService {
MemberGroupService
memberGroupService
;
@Autowired
TaskAttrService
taskAttrService
;
@Autowired
UserTvService
userTvService
;
private
static
final
Integer
TASK_FINISH_STATUS
=
1
;
...
...
@@ -108,20 +112,37 @@ public class TaskOperationServiceImpl implements TaskOperationService {
// 2.通过任务模板获取对应的任务列表
List
<
Task
>
taskList
=
this
.
loadListTaskByTaskTemplate
(
taskTemplate
,
dataSyncMsg
);
// 4.判断当前用户是否满足任务完成条件
/*
boolean checkResult = this.checkTaskCompletion(memberId,taskList);
boolean
checkResult
=
this
.
checkTaskCompletion
(
memberId
,
taskList
);
if
(
checkResult
)
{
// 5.权益区分(积分、权益、成长值)
Map
<
RightType
,
Object
>
tempRightsMap
=
this
.
distinguishRight
(
memberId
,
taskList
,
msgData
);
// 6.权益发放
// 6.风控检查
boolean
result
=
this
.
checkRiskManagement
(
memberId
,
tempRightsMap
);
if
(
result
)
throw
new
BadRequestException
(
"发放失败,已达风控上限"
);
// 7.权益发放
this
.
grantRight
(
tempRightsMap
);
}
*/
}
System
.
out
.
println
(
taskList
);
return
ResultInfo
.
success
();
}
/**
* 风控检查
* @param memberId
* @param tempRightsMap
* @return
*/
private
boolean
checkRiskManagement
(
Long
memberId
,
Map
<
RightType
,
Object
>
tempRightsMap
)
{
return
false
;
}
/**
* 验证会员信息
* @param memberId
* @return
...
...
@@ -224,6 +245,34 @@ public class TaskOperationServiceImpl implements TaskOperationService {
}
private
Long
getIptvPriorityMemberId
(
Long
memberId1
,
DataSyncMsg
.
MsgData
msgData
)
{
//
if
(
Objects
.
nonNull
(
memberId1
))
{
return
memberId1
;
}
@NotNull
Integer
deviceType
=
msgData
.
getDeviceType
();
Long
userId
=
msgData
.
getUserId
();
// 大屏
if
(
Objects
.
nonNull
(
userId
)
||
deviceType
==
1
)
{
}
MemberDTO
memberDTO
=
this
.
findMemberById
(
memberId1
);
if
(
Objects
.
nonNull
(
memberDTO
.
getId
()))
{
Long
userIptvId
=
memberDTO
.
getUserIptvId
();
// 绑定了大屏,直接返回小屏会员id
if
(
Objects
.
nonNull
(
userIptvId
))
{
return
memberDTO
.
getId
();
}
else
{
//
}
}
return
null
;
}
/**
* 验证是否满足永久权益
* @param permanentRights
...
...
@@ -929,8 +978,6 @@ public class TaskOperationServiceImpl implements TaskOperationService {
////////////////////////////////////////////////////////////////////////////////////////////////////////////
@Autowired
UserTvService
userTvService
;
@Autowired
private
StringRedisTemplate
stringRedisTemplate
;
@Autowired
private
PointsOperationService
pointsOperationService
;
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
View file @
546d283
...
...
@@ -60,6 +60,7 @@ import org.springframework.transaction.annotation.Propagation;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
...
...
@@ -958,7 +959,7 @@ public class UserOperationServiceImpl implements UserOperationService {
if
(
memberDTO
!=
null
)
{
memberDTO
.
setUserIptvId
(
userIptvId
);
memberDTO
.
setBindIptvTime
(
TimestampUtil
.
now
());
memberDTO
.
setBindIptvTime
(
LocalDateTime
.
now
());
memberDTO
.
setBindIptvPlatformType
(
bindIptvPlatformType
);
}
...
...
member-service-impl/src/test/java/com/topdraw/test/business/basicdata/member/rest/MemberControllerTest.java
View file @
546d283
...
...
@@ -10,6 +10,8 @@ import com.topdraw.util.TimestampUtil;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.time.LocalDateTime
;
public
class
MemberControllerTest
extends
BaseTest
{
...
...
@@ -75,7 +77,7 @@ public class MemberControllerTest extends BaseTest {
member
.
setDueCouponAmount
(
0L
);
member
.
setUserIptvId
(
1L
);
member
.
setBindIptvPlatformType
(
0
);
member
.
setUpdateTime
(
TimestampUtil
.
now
());
member
.
setUpdateTime
(
LocalDateTime
.
now
());
String
s
=
JSON
.
toJSONString
(
member
);
ResultInfo
byId
=
this
.
memberController
.
create
(
member
);
LOG
.
info
(
"===>>>"
+
byId
);
...
...
member-service-impl/src/test/java/com/topdraw/test/business/process/service/MemberOperationServiceTest.java
View file @
546d283
...
...
@@ -9,6 +9,8 @@ import com.topdraw.util.TimestampUtil;
import
org.junit.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.time.LocalDateTime
;
public
class
MemberOperationServiceTest
extends
BaseTest
{
@Autowired
...
...
@@ -43,7 +45,7 @@ public class MemberOperationServiceTest extends BaseTest {
member
.
setDueCouponAmount
(
0L
);
member
.
setUserIptvId
(
1L
);
member
.
setBindIptvPlatformType
(
0
);
member
.
setUpdateTime
(
TimestampUtil
.
now
());
member
.
setUpdateTime
(
LocalDateTime
.
now
());
String
s
=
JSONObject
.
toJSONString
(
member
);
this
.
memberOperationService
.
doUpdateMemberInfo
(
member
);
...
...
@@ -71,9 +73,9 @@ public class MemberOperationServiceTest extends BaseTest {
member
.
setDueCouponAmount
(
0L
);
member
.
setUserIptvId
(
1L
);
member
.
setBindIptvPlatformType
(
0
);
member
.
setBindIptvTime
(
TimestampUtil
.
now
());
member
.
setCreateTime
(
TimestampUtil
.
now
());
member
.
setUpdateTime
(
TimestampUtil
.
now
());
member
.
setBindIptvTime
(
LocalDateTime
.
now
());
member
.
setCreateTime
(
LocalDateTime
.
now
());
member
.
setUpdateTime
(
LocalDateTime
.
now
());
// member.setUpdateTime(Timestamp.valueOf(LocalDateTime.now()));
this
.
memberOperationService
.
doInsertMember
(
member
);
}
...
...
Please
register
or
sign in
to post a comment