Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
49260a8c
Commit
49260a8c
authored
Sep 13, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix-438,443: 分享统计id命名,客户端活动列表筛选
parent
fc70713f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
AppScoreRuleShareRecordController.java
...ller/app/scoreRule/AppScoreRuleShareRecordController.java
+1
-1
ScoreRuleServiceImpl.java
...module/member/service/scoreRule/ScoreRuleServiceImpl.java
+16
-1
ScoreRuleGenCodeUtils.java
...coder/yudao/module/member/util/ScoreRuleGenCodeUtils.java
+3
-2
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/scoreRule/AppScoreRuleShareRecordController.java
View file @
49260a8c
...
@@ -16,7 +16,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
...
@@ -16,7 +16,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Validated
@Validated
@RestController
@RestController
@Api
(
tags
=
"
管理后台
- 分享记录"
)
@Api
(
tags
=
"
用户 APP
- 分享记录"
)
@RequestMapping
(
"/member/score-rule/share-record"
)
@RequestMapping
(
"/member/score-rule/share-record"
)
public
class
AppScoreRuleShareRecordController
{
public
class
AppScoreRuleShareRecordController
{
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/scoreRule/ScoreRuleServiceImpl.java
View file @
49260a8c
...
@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
...
@@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
import
cn.iocoder.yudao.framework.common.util.json.JsonUtils
;
import
cn.iocoder.yudao.framework.common.util.json.JsonUtils
;
import
cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils
;
import
cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.depository.service.warehouse.WarehouseService
;
import
cn.iocoder.yudao.module.depository.service.warehouse.WarehouseService
;
...
@@ -57,6 +58,8 @@ import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*;
...
@@ -57,6 +58,8 @@ import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*;
public
class
ScoreRuleServiceImpl
extends
AbstractService
<
ScoreRuleMapper
,
ScoreRuleDO
>
implements
ScoreRuleService
{
public
class
ScoreRuleServiceImpl
extends
AbstractService
<
ScoreRuleMapper
,
ScoreRuleDO
>
implements
ScoreRuleService
{
private
static
final
String
PROD_REGISTER_URL
=
"https://app2.groupage.cn/#/pages/register/register?code="
;
private
static
final
String
PROD_REGISTER_URL
=
"https://app2.groupage.cn/#/pages/register/register?code="
;
private
static
final
String
UAT_REGISTER_URL
=
"https://apptest.groupage.cn/#/pages/register/register?code="
;
private
static
final
String
UAT_REGISTER_URL
=
"https://apptest.groupage.cn/#/pages/register/register?code="
;
private
static
final
String
PROD_SHARE_URL
=
"https://app2.groupage.cn/#"
;
private
static
final
String
UAT_SHARE_URL
=
"https://apptest.groupage.cn/#"
;
@Value
(
"${spring.profiles.active}"
)
@Value
(
"${spring.profiles.active}"
)
private
String
env
;
private
String
env
;
@Resource
@Resource
...
@@ -509,7 +512,12 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
...
@@ -509,7 +512,12 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
@Override
@Override
public
List
<
AppScoreRuleListBackVO
>
appGetScoreRuleList
(
AppScoreRuleListReqVO
reqVO
)
{
public
List
<
AppScoreRuleListBackVO
>
appGetScoreRuleList
(
AppScoreRuleListReqVO
reqVO
)
{
List
<
ScoreRuleDO
>
scoreRuleDOS
=
scoreRuleMapper
.
selectList
(
"status"
,
ScoreRuleStatusEnum
.
ENABLED
.
getValue
());
// 开启,且活动开始时间在当前时间前,结束时间在当前时间后
LambdaQueryWrapperX
<
ScoreRuleDO
>
queryWrapperX
=
new
LambdaQueryWrapperX
<>();
queryWrapperX
.
eq
(
ScoreRuleDO:
:
getStatus
,
ScoreRuleStatusEnum
.
ENABLED
.
getValue
())
.
lt
(
ScoreRuleDO:
:
getStartTime
,
new
Date
())
.
gt
(
ScoreRuleDO:
:
getEndTime
,
new
Date
());
List
<
ScoreRuleDO
>
scoreRuleDOS
=
scoreRuleMapper
.
selectList
(
queryWrapperX
);
if
(
CollectionUtils
.
isNotEmpty
(
scoreRuleDOS
))
{
if
(
CollectionUtils
.
isNotEmpty
(
scoreRuleDOS
))
{
List
<
AppScoreRuleListBackVO
>
appScoreRuleListBackVOS
=
new
ArrayList
<>();
List
<
AppScoreRuleListBackVO
>
appScoreRuleListBackVOS
=
new
ArrayList
<>();
for
(
ScoreRuleDO
scoreRuleDO
:
scoreRuleDOS
)
{
for
(
ScoreRuleDO
scoreRuleDO
:
scoreRuleDOS
)
{
...
@@ -531,6 +539,13 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
...
@@ -531,6 +539,13 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
}
}
}
else
if
(
scoreRuleDO
.
getType
()
==
ScoreRuleTypeEnum
.
SHARE
.
getValue
())
{
}
else
if
(
scoreRuleDO
.
getType
()
==
ScoreRuleTypeEnum
.
SHARE
.
getValue
())
{
ScoreRuleShareExtraVO
scoreRuleShareExtraVO
=
JsonUtils
.
parseObject
(
scoreRuleDO
.
getExtra
(),
ScoreRuleShareExtraVO
.
class
);
ScoreRuleShareExtraVO
scoreRuleShareExtraVO
=
JsonUtils
.
parseObject
(
scoreRuleDO
.
getExtra
(),
ScoreRuleShareExtraVO
.
class
);
MemberUserDO
memberUserDO
=
memberUserService
.
getUser
(
reqVO
.
getMemberId
());
String
activityUrl
=
scoreRuleShareExtraVO
.
getActivityUrl
();
if
(
memberUserDO
!=
null
&&
!
"pro"
.
equals
(
env
))
{
scoreRuleShareExtraVO
.
setActivityUrl
(
UAT_SHARE_URL
+
activityUrl
);
}
else
if
(
memberUserDO
!=
null
)
{
scoreRuleShareExtraVO
.
setActivityUrl
(
PROD_SHARE_URL
+
activityUrl
);
}
appScoreRuleListBackVO
.
setExtraShare
(
scoreRuleShareExtraVO
);
appScoreRuleListBackVO
.
setExtraShare
(
scoreRuleShareExtraVO
);
}
}
String
type
=
appScoreRuleListBackVO
.
getType
().
toString
();
String
type
=
appScoreRuleListBackVO
.
getType
().
toString
();
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/util/ScoreRuleGenCodeUtils.java
View file @
49260a8c
...
@@ -91,7 +91,7 @@ public class ScoreRuleGenCodeUtils {
...
@@ -91,7 +91,7 @@ public class ScoreRuleGenCodeUtils {
if
(
currentMaxShareRecordCode
==
null
){
if
(
currentMaxShareRecordCode
==
null
){
codeNum
=
1L
;
codeNum
=
1L
;
}
else
{
}
else
{
codeNum
=
Long
.
parseLong
(
currentMaxShareRecordCode
.
substring
(
3
))
+
1
;
codeNum
=
Long
.
parseLong
(
currentMaxShareRecordCode
.
substring
(
5
))
+
1
;
}
}
redisHelper
.
set
(
key
,
String
.
valueOf
(
codeNum
),
10
,
TimeUnit
.
SECONDS
);
redisHelper
.
set
(
key
,
String
.
valueOf
(
codeNum
),
10
,
TimeUnit
.
SECONDS
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
...
@@ -100,7 +100,8 @@ public class ScoreRuleGenCodeUtils {
...
@@ -100,7 +100,8 @@ public class ScoreRuleGenCodeUtils {
lock
.
unlock
();
lock
.
unlock
();
}
}
}
}
// 获得5位序列号,不足位前面补0
// 获得5位序列号
codeNum
=
codeNum
%
100000
;
code
.
append
(
String
.
format
(
"%05d"
,
codeNum
));
code
.
append
(
String
.
format
(
"%05d"
,
codeNum
));
return
code
.
toString
();
return
code
.
toString
();
}
}
...
...
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