xiaoyong931011
2022-10-26 9978e005f24643414d9fcfe8e9c34ec64a3747f8
20221021
3 files modified
31 ■■■■ changed files
src/main/java/cc/mrbird/febs/dapp/entity/DappMemberEntity.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java 7 ●●●● patch | view | raw | blame | history
src/main/resources/mapper/dapp/DappMemberDao.xml 18 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/entity/DappMemberEntity.java
@@ -98,4 +98,10 @@
    private String wahtsApp;
    private String email;
    private String telegram;
    /**
     * 后台操作用户的标识
     */
    @TableField(exist = false)
    private String description;
}
src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java
@@ -207,8 +207,11 @@
    public IPage<DappMemberEntity> selectInPage(DappMemberEntity member, QueryRequest request) {
        Page<DappMemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
        User currentUser = FebsUtil.getCurrentUser();
        if (currentUser.getDeptId() == null) {
            member.setCurrentUser(currentUser.getUserId());
//        if (currentUser.getDeptId() == null) {
//            member.setCurrentUser(currentUser.getUserId());
//        }
        if(StrUtil.isNotEmpty(currentUser.getDescription())){
            member.setDescription(currentUser.getDescription());
        }
        return dappMemberDao.selectInPage(member, page);
    }
src/main/resources/mapper/dapp/DappMemberDao.xml
@@ -14,22 +14,26 @@
    </select>
    <select id="selectInPage" resultType="cc.mrbird.febs.dapp.entity.DappMemberEntity">
        select * from dapp_member
        select * from dapp_member a
        <where>
            <if test="record.currentUser != null">
                and referer_id = (select invite_id from dapp_user_member_relate where user_id=#{record.currentUser})
<!--            <if test="record.currentUser != null">-->
<!--                and referer_id = (select invite_id from dapp_user_member_relate where user_id=#{record.currentUser})-->
<!--            </if>-->
            <if test="record.description!=null and record.description!=''">
                and a.id in (select id from dapp_member where FIND_IN_SET(#{record.description}, referer_ids))
            </if>
            <if test="record.accountStatus != null">
                and account_status = #{record.accountStatus}
                and a.account_status = #{record.accountStatus}
            </if>
            <if test="record.changeAble != null">
                and change_able = #{record.changeAble}
                and a.change_able = #{record.changeAble}
            </if>
            <if test="record.withdrawAble != null">
                and withdraw_able = #{record.withdrawAble}
                and a.withdraw_able = #{record.withdrawAble}
            </if>
            <if test="record.inviteId != null and record.inviteId != ''">
                and invite_id = #{record.inviteId}
                and a.invite_id = #{record.inviteId}
            </if>
        </where>
        order by create_time desc