debug
This commit is contained in:
parent
79dc7fde0f
commit
47a2ced150
|
@ -2,6 +2,7 @@ package com.ruoyi.bst.bonus.domain;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
@ -98,4 +99,19 @@ public class Bonus extends BaseEntity
|
||||||
@Excel(name = "其他可见用户ID列表")
|
@Excel(name = "其他可见用户ID列表")
|
||||||
@ApiModelProperty("其他可见用户ID列表")
|
@ApiModelProperty("其他可见用户ID列表")
|
||||||
private List<Long> viewUserIds;
|
private List<Long> viewUserIds;
|
||||||
|
|
||||||
|
|
||||||
|
public void addViewUserId(Long userId) {
|
||||||
|
if (userId == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.viewUserIds == null) {
|
||||||
|
this.viewUserIds = new ArrayList<>();
|
||||||
|
}
|
||||||
|
if (viewUserIds.contains(userId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
viewUserIds.add(userId);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,9 @@ public class BonusConverterImpl implements BonusConverter {
|
||||||
Bonus bonus = BonusUtil.getInitBonus(BonusArrivalType.JOIN, joinUserId, join.getUserName(), join.getPoint());
|
Bonus bonus = BonusUtil.getInitBonus(BonusArrivalType.JOIN, joinUserId, join.getUserName(), join.getPoint());
|
||||||
if (bonus != null) {
|
if (bonus != null) {
|
||||||
result.add(bonus);
|
result.add(bonus);
|
||||||
bonus.setViewUserIds(Arrays.asList(areaUserId, areaAgentId)); // 代理商、运营商可见
|
// 代理商、运营商可见
|
||||||
|
bonus.addViewUserId(areaUserId);
|
||||||
|
bonus.addViewUserId(areaAgentId);
|
||||||
totalPoint = totalPoint.add(bonus.getPoint());
|
totalPoint = totalPoint.add(bonus.getPoint());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,7 +125,9 @@ public class BonusConverterImpl implements BonusConverter {
|
||||||
Bonus bonus = BonusUtil.getInitBonus(BonusArrivalType.PARTNER, partner.getUserId(), partner.getUserName(), partner.getPoint());
|
Bonus bonus = BonusUtil.getInitBonus(BonusArrivalType.PARTNER, partner.getUserId(), partner.getUserName(), partner.getPoint());
|
||||||
if (bonus != null) {
|
if (bonus != null) {
|
||||||
result.add(bonus);
|
result.add(bonus);
|
||||||
bonus.setViewUserIds(Arrays.asList(areaUserId, areaAgentId)); // 代理商、运营商可见
|
// 代理商、运营商可见
|
||||||
|
bonus.addViewUserId(areaUserId);
|
||||||
|
bonus.addViewUserId(areaAgentId);
|
||||||
totalPoint = totalPoint.add(bonus.getPoint());
|
totalPoint = totalPoint.add(bonus.getPoint());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,7 +138,8 @@ public class BonusConverterImpl implements BonusConverter {
|
||||||
Bonus bonus = BonusUtil.getInitBonus(BonusArrivalType.MCH, areaUserId, device.getAreaUserName(), device.getAreaUserPoint().subtract(totalPoint));
|
Bonus bonus = BonusUtil.getInitBonus(BonusArrivalType.MCH, areaUserId, device.getAreaUserName(), device.getAreaUserPoint().subtract(totalPoint));
|
||||||
if (bonus != null) {
|
if (bonus != null) {
|
||||||
result.add(bonus);
|
result.add(bonus);
|
||||||
bonus.setViewUserIds(Arrays.asList(areaAgentId)); // 代理商可见
|
// 代理商可见
|
||||||
|
bonus.addViewUserId(areaAgentId);
|
||||||
totalPoint = totalPoint.add(bonus.getPoint());
|
totalPoint = totalPoint.add(bonus.getPoint());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
bo.verify_remark,
|
bo.verify_remark,
|
||||||
bo.area_user_id,
|
bo.area_user_id,
|
||||||
bo.area_agent_id,
|
bo.area_agent_id,
|
||||||
|
bo.cancel_remark,
|
||||||
ba.name as area_name,
|
ba.name as area_name,
|
||||||
su.nick_name as user_name,
|
su.nick_name as user_name,
|
||||||
su.user_name as user_phone,
|
su.user_name as user_phone,
|
||||||
|
@ -119,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="query.areaUserId != null "> and bo.area_user_id = #{query.areaUserId}</if>
|
<if test="query.areaUserId != null "> and bo.area_user_id = #{query.areaUserId}</if>
|
||||||
<if test="query.areaAgentId != null "> and bo.area_agent_id = #{query.areaAgentId}</if>
|
<if test="query.areaAgentId != null "> and bo.area_agent_id = #{query.areaAgentId}</if>
|
||||||
<if test="query.createDate != null "> and date(bo.create_time) = #{query.createDate}</if>
|
<if test="query.createDate != null "> and date(bo.create_time) = #{query.createDate}</if>
|
||||||
|
<if test="query.cancelRemark != null and query.cancelRemark != ''"> and bo.cancel_remark like concat('%', #{query.cancelRemark}, '%')</if>
|
||||||
<if test="query.bonusUserId != null ">
|
<if test="query.bonusUserId != null ">
|
||||||
and bo.id in (
|
and bo.id in (
|
||||||
select distinct bb.bst_id from bst_bonus bb
|
select distinct bb.bst_id from bst_bonus bb
|
||||||
|
@ -216,6 +218,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="verifyRemark != null">verify_remark,</if>
|
<if test="verifyRemark != null">verify_remark,</if>
|
||||||
<if test="areaUserId != null">area_user_id,</if>
|
<if test="areaUserId != null">area_user_id,</if>
|
||||||
<if test="areaAgentId != null">area_agent_id,</if>
|
<if test="areaAgentId != null">area_agent_id,</if>
|
||||||
|
<if test="cancelRemark != null">cancel_remark,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="no != null and no != ''">#{no},</if>
|
<if test="no != null and no != ''">#{no},</if>
|
||||||
|
@ -257,6 +260,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="verifyRemark != null">#{verifyRemark},</if>
|
<if test="verifyRemark != null">#{verifyRemark},</if>
|
||||||
<if test="areaUserId != null">#{areaUserId},</if>
|
<if test="areaUserId != null">#{areaUserId},</if>
|
||||||
<if test="areaAgentId != null">#{areaAgentId},</if>
|
<if test="areaAgentId != null">#{areaAgentId},</if>
|
||||||
|
<if test="cancelRemark != null">#{cancelRemark},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -308,6 +312,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="data.verifyRemark != null">verify_remark = #{data.verifyRemark},</if>
|
<if test="data.verifyRemark != null">verify_remark = #{data.verifyRemark},</if>
|
||||||
<if test="data.areaUserId != null">area_user_id = #{data.areaUserId},</if>
|
<if test="data.areaUserId != null">area_user_id = #{data.areaUserId},</if>
|
||||||
<if test="data.areaAgentId != null">area_agent_id = #{data.areaAgentId},</if>
|
<if test="data.areaAgentId != null">area_agent_id = #{data.areaAgentId},</if>
|
||||||
|
<if test="data.cancelRemark != null">cancel_remark = #{data.cancelRemark},</if>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<delete id="deleteOrderById" parameterType="Long">
|
<delete id="deleteOrderById" parameterType="Long">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user