Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
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
pseer
gxpt_ht
Commits
a81e99d0
Commit
a81e99d0
authored
Sep 12, 2024
by
YG8429
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改权益会员绑定逻辑。权益会员返佣逻辑
parent
4e26a05c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
40 deletions
+3
-40
SharingActivitiesController.java
...re/web/controller/system/SharingActivitiesController.java
+0
-12
WxRegisterPhoneRequest.java
...ain/java/share/system/request/WxRegisterPhoneRequest.java
+0
-3
SharingActivitiesService.java
...n/java/share/system/service/SharingActivitiesService.java
+1
-1
SharingActivitiesServiceImpl.java
...are/system/service/impl/SharingActivitiesServiceImpl.java
+2
-24
No files found.
share-admin/src/main/java/share/web/controller/system/SharingActivitiesController.java
View file @
a81e99d0
...
...
@@ -77,18 +77,6 @@ public class SharingActivitiesController extends BaseController {
return
toAjax
(
sharingActivitiesService
.
insertSharingActivities
(
sharingActivities
));
}
/**
* 新增分享活动绑定关系
*/
// @PreAuthorize("@ss.hasPermi('system:activities:addSharingActivities')")
@Log
(
title
=
"分享活动绑定关系"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/addSharingActivities"
)
public
AjaxResult
addSharingActivities
(
@RequestBody
SharingActivities
sharingActivities
)
{
AjaxResult
ajaxResult
=
sharingActivitiesService
.
addSharingActivities
(
sharingActivities
);
return
ajaxResult
;
}
/**
* 修改分享活动绑定关系
...
...
share-system/src/main/java/share/system/request/WxRegisterPhoneRequest.java
View file @
a81e99d0
...
...
@@ -49,7 +49,4 @@ public class WxRegisterPhoneRequest implements Serializable {
@ApiModelProperty
(
value
=
"上级id"
)
private
Long
uid
;
@ApiModelProperty
(
value
=
"活动类型"
)
private
String
activityType
;
}
share-system/src/main/java/share/system/service/SharingActivitiesService.java
View file @
a81e99d0
...
...
@@ -61,5 +61,5 @@ public interface SharingActivitiesService extends IService<SharingActivities>
*/
public
int
deleteSharingActivitiesById
(
Long
id
);
AjaxResult
addSharingActivities
(
SharingActivities
sharingActivities
);
}
share-system/src/main/java/share/system/service/impl/SharingActivitiesServiceImpl.java
View file @
a81e99d0
package
share
.
system
.
service
.
impl
;
import
java.time.YearMonth
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -10,6 +11,7 @@ import org.springframework.data.redis.core.RedisTemplate;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.redis.RedisUtil
;
import
share.common.enums.ReceiptRdeisEnum
;
import
share.common.enums.YesNoEnum
;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -107,28 +109,4 @@ public class SharingActivitiesServiceImpl extends ServiceImpl<SharingActivitiesM
return
sharingActivitiesMapper
.
deleteSharingActivitiesById
(
id
);
}
/**
* 新增分享活动绑定关系
* @param sharingActivities
* @return
*/
@Override
public
AjaxResult
addSharingActivities
(
SharingActivities
sharingActivities
)
{
sharingActivities
.
setCreateTime
(
DateUtils
.
getNowDate
());
Long
newUid
=
sharingActivities
.
getNewUid
();
SharingActivities
sharingActivities1
=
sharingActivitiesMapper
.
selectOne
(
new
LambdaQueryWrapper
<
SharingActivities
>().
eq
(
SharingActivities:
:
getNewUid
,
newUid
));
if
(
ObjectUtil
.
isNotEmpty
(
sharingActivities1
)){
return
AjaxResult
.
success
(
"此用户以绑定其他权益会员"
);
}
Boolean
B
=
redisTemplate
.
hasKey
(
ReceiptRdeisEnum
.
EQUITY_MEMBERS_TIME
+
sharingActivities
.
getUid
().
toString
());
if
(!
B
){
return
AjaxResult
.
success
(
"分享用户权益过期"
);
}
sharingActivitiesMapper
.
insertSharingActivities
(
sharingActivities
);
Boolean
aBoolean
=
redisTemplate
.
hasKey
(
ReceiptRdeisEnum
.
EQUITY_MEMBERS_TIME
+
sharingActivities
.
getUid
().
toString
());
if
(!
aBoolean
){
sharingActivitiesMapper
.
deleteSharingActivitiesById
(
sharingActivities
.
getId
());
}
return
AjaxResult
.
success
();
}
}
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