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
00c2fbeb
Commit
00c2fbeb
authored
Sep 13, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(member): 分享统计详情单独页面
parent
9e4fb7dd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
11 deletions
+49
-11
ScoreRuleShareRecordMapper.java
...ysql/ScoreRuleShareRecord/ScoreRuleShareRecordMapper.java
+3
-2
ScoreRuleShareRecordServiceImpl.java
...ScoreRuleShareRecord/ScoreRuleShareRecordServiceImpl.java
+2
-2
ScoreRuleShareRecordDetailReqVO.java
...ScoreRuleShareRecord/ScoreRuleShareRecordDetailReqVO.java
+3
-5
ScoreRuleShareRecordMapper.xml
...main/resources/mapper/user/ScoreRuleShareRecordMapper.xml
+41
-2
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/ScoreRuleShareRecord/ScoreRuleShareRecordMapper.java
View file @
00c2fbeb
...
...
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.member.dal.mysql.ScoreRuleShareRecord;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.module.member.dal.dataobject.ScoreRuleShareRecord.ScoreRuleShareRecordDO
;
import
cn.iocoder.yudao.module.member.vo.ScoreRuleShareRecord.ScoreRuleShareRecordDetailReqVO
;
import
cn.iocoder.yudao.module.member.vo.ScoreRuleShareRecord.ScoreRuleShareRecordDetailVO
;
import
cn.iocoder.yudao.module.member.vo.ScoreRuleShareRecord.ScoreRuleShareRecordPageVO
;
import
cn.iocoder.yudao.module.member.vo.ScoreRuleShareRecord.ScoreRuleShareRecordQueryVO
;
...
...
@@ -22,9 +23,9 @@ public interface ScoreRuleShareRecordMapper extends AbstractMapper<ScoreRuleShar
int
countScoreRuleShareRecord
(
@Param
(
"query"
)
ScoreRuleShareRecordQueryVO
query
);
List
<
ScoreRuleShareRecordDetailVO
>
getRuleShareRecordDetail
(
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"
id"
)
Long
id
);
List
<
ScoreRuleShareRecordDetailVO
>
getRuleShareRecordDetail
(
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"
query"
)
ScoreRuleShareRecordDetailReqVO
query
);
int
countScoreRuleShareRecordDetail
(
@Param
(
"
id"
)
Long
id
);
int
countScoreRuleShareRecordDetail
(
@Param
(
"
query"
)
ScoreRuleShareRecordDetailReqVO
query
);
String
getCurrentMaxShareRecordCode
();
}
\ No newline at end of file
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/ScoreRuleShareRecord/ScoreRuleShareRecordServiceImpl.java
View file @
00c2fbeb
...
...
@@ -51,7 +51,7 @@ public class ScoreRuleShareRecordServiceImpl extends AbstractService<ScoreRuleSh
public
PageResult
<
ScoreRuleShareRecordDetailVO
>
getRuleShareRecordDetail
(
ScoreRuleShareRecordDetailReqVO
reqVO
)
{
int
size
=
reqVO
.
getRows
();
int
start
=
(
reqVO
.
getPage
()
-
1
)
*
size
;
List
<
ScoreRuleShareRecordDetailVO
>
list
=
scoreRuleShareRecordMapper
.
getRuleShareRecordDetail
(
start
,
size
,
reqVO
.
getId
()
);
List
<
ScoreRuleShareRecordDetailVO
>
list
=
scoreRuleShareRecordMapper
.
getRuleShareRecordDetail
(
start
,
size
,
reqVO
);
if
(
list
.
isEmpty
())
{
return
PageResult
.
empty
();
}
...
...
@@ -59,7 +59,7 @@ public class ScoreRuleShareRecordServiceImpl extends AbstractService<ScoreRuleSh
item
.
setTypeZh
(
DictFrameworkUtils
.
getDictDataFromCache
(
"score_rule_type"
,
item
.
getType
().
toString
()).
getLabel
());
item
.
setTypeEn
(
DictFrameworkUtils
.
getDictDataFromCache
(
"score_rule_type"
,
item
.
getType
().
toString
()).
getLabelEn
());
});
int
total
=
scoreRuleShareRecordMapper
.
countScoreRuleShareRecordDetail
(
reqVO
.
getId
()
);
int
total
=
scoreRuleShareRecordMapper
.
countScoreRuleShareRecordDetail
(
reqVO
);
return
new
PageResult
<>(
list
,
total
,
size
,
reqVO
.
getPage
(),
(
total
+
size
-
1
)
/
size
);
}
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/vo/ScoreRuleShareRecord/ScoreRuleShareRecordDetailReqVO.java
View file @
00c2fbeb
package
cn
.
iocoder
.
yudao
.
module
.
member
.
vo
.
ScoreRuleShareRecord
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
lombok.EqualsAndHashCode
;
@Data
@ApiModel
(
"管理后台 - 分享记录详情查询 VO"
)
public
class
ScoreRuleShareRecordDetailReqVO
extends
PageVO
{
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
ScoreRuleShareRecordDetailReqVO
extends
ScoreRuleShareRecordQueryVO
{
@ApiModelProperty
(
value
=
"分享记录id"
)
@NotNull
(
message
=
"分享记录id不能为空"
)
private
Long
id
;
}
yudao-module-member/yudao-module-member-impl/src/main/resources/mapper/user/ScoreRuleShareRecordMapper.xml
View file @
00c2fbeb
...
...
@@ -50,7 +50,11 @@
LEFT JOIN score_rule_share_record srsr ON msul.member_id = srsr.member_id AND msul.rule_id = srsr.rule_id
LEFT JOIN member_user mu ON srsr.member_id = mu.id
LEFT JOIN score_rule sr ON srsr.rule_id = sr.id
where srsr.deleted = 0 AND srsr.id = #{id}
where srsr.deleted = 0
<if
test=
"query.id != null"
>
AND srsr.id = #{query.id}
</if>
<include
refid=
"shareRecordDetailCondition"
/>
order by srsr.create_time desc
limit #{start}, #{size}
</select>
...
...
@@ -60,7 +64,13 @@
FROM
member_user_score_log msul
LEFT JOIN score_rule_share_record srsr ON msul.member_id = srsr.member_id AND msul.rule_id = srsr.rule_id
where srsr.deleted = 0 AND srsr.id = #{id}
LEFT JOIN member_user mu ON srsr.member_id = mu.id
LEFT JOIN score_rule sr ON srsr.rule_id = sr.id
where srsr.deleted = 0
<if
test=
"query.id != null"
>
AND srsr.id = #{query.id}
</if>
<include
refid=
"shareRecordDetailCondition"
/>
</select>
<select
id=
"getCurrentMaxShareRecordCode"
resultType=
"java.lang.String"
>
SELECT code FROM score_rule_share_record ORDER BY code desc LIMIT 1
...
...
@@ -94,4 +104,33 @@
</if>
</if>
</sql>
<sql
id=
"shareRecordDetailCondition"
>
<if
test=
"query.memberName != null and query.memberName != ''"
>
AND mu.nickname = #{query.memberName}
</if>
<if
test=
"query.type != null"
>
AND sr.type = #{query.type}
</if>
<if
test=
"query.title != null and query.title != ''"
>
AND ( sr.title_zh LIKE concat('%', #{query.title}, '%') OR sr.title_en LIKE concat('%', #{query.title}, '%') )
</if>
<if
test=
"query.code != null and query.code != ''"
>
AND srsr.code = #{query.code}
</if>
<if
test=
"query.beginCreateTime != null and query.endCreateTime != null"
>
AND ( srsr.create_time BETWEEN #{query.beginCreateTime} AND #{query.endCreateTime} )
</if>
<if
test=
"query.relationSymbol != null and query.totalScore != null"
>
<!--1:大于 2:等于 3:小于-->
<if
test=
"query.relationSymbol == 1"
>
AND sr.get_score_once
>
#{query.totalScore}
</if>
<if
test=
"query.relationSymbol == 2"
>
AND sr.get_score_once = #{query.totalScore}
</if>
<if
test=
"query.relationSymbol == 3"
>
AND sr.get_score_once
<
#{query.totalScore}
</if>
</if>
</sql>
</mapper>
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