Commit 6a08071f authored by zhangfeng's avatar zhangfeng

feat-508: 分享详情新增点击IP,记录非有效点击

parent 64e344fa
......@@ -72,6 +72,8 @@ public class ScoreRuleShareRecordServiceImpl extends AbstractService<ScoreRuleSh
if (item.getIpAddress().contains("SHARE")) {
String[] split = item.getIpAddress().split("_");
item.setIpAddress(split[split.length - 1]);
} else {
item.setIpAddress("-");
}
item.setTypeZh(DictFrameworkUtils.getDictDataFromCache("score_rule_type", item.getType().toString()).getLabel());
item.setTypeEn(DictFrameworkUtils.getDictDataFromCache("score_rule_type", item.getType().toString()).getLabelEn());
......
......@@ -57,7 +57,7 @@
</if>
<include refid="shareRecordDetailCondition"/>
<if test="query.id == null and query.relationSymbol == null">
<if test="query.id == null">
UNION
SELECT
srsr.id,
......@@ -76,7 +76,7 @@
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
<include refid="shareRecordDetailCondition"/>
<include refid="shareRecordFailDetailCondition"/>
</if>
order by createTime desc, triggerTime desc
......@@ -96,7 +96,7 @@
AND srsr.id = #{query.id}
</if>
<include refid="shareRecordDetailCondition"/>
<if test="query.id == null and query.relationSymbol == null">
<if test="query.id == null">
UNION ALL
SELECT srsr.id
FROM score_rule_share_fail_trigger srsf
......@@ -104,7 +104,7 @@
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
<include refid="shareRecordDetailCondition"/>
<include refid="shareRecordFailDetailCondition"/>
</if>
) subquery
</select>
......@@ -169,4 +169,33 @@
</if>
</if>
</sql>
<sql id="shareRecordFailDetailCondition">
<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 0 &gt; #{query.totalScore}
</if>
<if test="query.relationSymbol == 2">
AND 0 = #{query.totalScore}
</if>
<if test="query.relationSymbol == 3">
AND 0 &lt; #{query.totalScore}
</if>
</if>
</sql>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment