xiaoyong931011
2022-12-21 ca08c1252a57544c56d75e4492cb7a846d6880d1
20221221
10 files modified
117 ■■■■■ changed files
src/main/java/cc/mrbird/febs/common/enumerates/MallMoneyFlowTypeEnum.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/common/enumerates/MemberAgentLevelEnum.java 4 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/mapper/MallMemberMapper.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java 26 ●●●● patch | view | raw | blame | history
src/main/resources/application-dev.yml 17 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/MallMemberMapper.xml 22 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html 17 ●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/mallMember/mallSystemPay.html 12 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html 6 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html 9 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/common/enumerates/MallMoneyFlowTypeEnum.java
@@ -5,6 +5,8 @@
@Getter
public enum MallMoneyFlowTypeEnum {
    SYSTEM_CHARGE("系统拨付",100),
    CHARGE("充值",10),
    WITHDRAW("提现",9),
    RETURN_MARKET_STAR("星级保证金返还",8),
    BUY_MARKET_STAR("购买星级",7),
src/main/java/cc/mrbird/febs/common/enumerates/MemberAgentLevelEnum.java
@@ -78,7 +78,7 @@
    public String getNameByCode(String code){
        String name = null;
        for (MemberAgentLevelEnum memberAgentLevelEnum : MemberAgentLevelEnum.values()) {
            if(memberAgentLevelEnum.getCode() == code){
            if(memberAgentLevelEnum.getCode().equals(code)){
                name = memberAgentLevelEnum.getName();
            }
        }
@@ -93,7 +93,7 @@
    public String getCodeByName(String name){
        String code = null;
        for (MemberAgentLevelEnum memberAgentLevelEnum : MemberAgentLevelEnum.values()) {
            if(memberAgentLevelEnum.getName() == name){
            if(memberAgentLevelEnum.getName().equals(name)){
                code = memberAgentLevelEnum.getCode();
            }
        }
src/main/java/cc/mrbird/febs/mall/mapper/MallMemberMapper.java
@@ -97,4 +97,6 @@
    Integer selectByReferersIdAndLevel(@Param("inviteId")String inviteId, @Param("level")String minLevel);
    void updateAccountLevelById(@Param("accountLevel")String accountLevel, @Param("id")Long id);
    void updateLevelStatusById(@Param("levelStatus")int i, @Param("id")Long memberId);
}
src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java
@@ -398,13 +398,32 @@
        } else {
            iApiMallMemberWalletService.add(mallSystemPayDto.getAddBalance(), mallSystemPayDto.getId(), filedType);
        }
        mallMoneyFlowService.addMoneyFlow(memberId, bigDecimal, MoneyFlowTypeEnum.SYSTEM.getValue(), null, type);
        mallMoneyFlowService.addMoneyFlow(
                memberId,
                null,
                bigDecimal,
                MallMoneyFlowTypeEnum.SYSTEM_CHARGE.getCode(),
                MallMoneyFlow.STATUS_SUCCESS,
                MallMoneyFlow.IS_RETURN_Y,
                memberId,
                FlowTypeEnum.BALANCE.getValue(),
                MallMoneyFlowTypeEnum.SYSTEM_CHARGE.getName()
        );
        return new FebsResponse().success();
    }
    @Override
    public AdminAgentLevelSetInfoVo getAgentLevelSetInfoByMemberId(long id) {
        AdminAgentLevelSetInfoVo adminAgentLevelSetInfoVo = mallMemberMapper.getAgentLevelSetInfoByMemberId(id);
        AdminAgentLevelSetInfoVo adminAgentLevelSetInfoVo = new AdminAgentLevelSetInfoVo();
        AdminAgentLevelSetInfoVo adminAgentLevelSetInfo = mallMemberMapper.getAgentLevelSetInfoByMemberId(id);
        if(ObjectUtil.isEmpty(adminAgentLevelSetInfo)){
            adminAgentLevelSetInfoVo.setId(id);
            adminAgentLevelSetInfoVo.setLevelCode(MemberAgentLevelEnum.AGENT.getCodeByName(MemberAgentLevelEnum.AGENT.getName()));
        }else{
            adminAgentLevelSetInfoVo.setId(id);
            adminAgentLevelSetInfoVo.setLevelCode(MemberAgentLevelEnum.AGENT.getCodeByName(adminAgentLevelSetInfo.getLevelCode()));
        }
        return adminAgentLevelSetInfoVo;
    }
@@ -417,8 +436,7 @@
        }
        String levelCode = agentLevelSetUpdateDto.getLevelCode();
        String nameByCode = MemberAgentLevelEnum.AGENT.getNameByCode(levelCode);
        mallMember.setLevelStatus(1);
        mallMemberMapper.updateById(mallMember);
        mallMemberMapper.updateLevelStatusById(1,memberId);
        mallMemberMapper.updateLevelById(nameByCode,memberId);
        return new FebsResponse().success();
    }
src/main/resources/application-dev.yml
@@ -15,25 +15,20 @@
      datasource:
        # 数据源-1,名称为 base
        base:
          username: ct_test
          password: 123456
          username: db_mall_coin
          password: db_mall_coin!@#123
          driver-class-name: com.mysql.cj.jdbc.Driver
          url: jdbc:mysql://120.27.238.55:3306/db_amz?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
  #          username: db_mall_coin
  #          password: db_mall_coin123!@#
  #          driver-class-name: com.mysql.cj.jdbc.Driver
  #          url: jdbc:mysql://154.91.195.148:3306/db_mall_coin?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
          url: jdbc:mysql://154.91.195.148:3306/db_mall_coin?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8
  redis:
    # Redis数据库索引(默认为 0)
    database: 10
    database: 0
    # Redis服务器地址
    host: 127.0.0.1
    # Redis服务器连接端口
    port: 6379
    # Redis 密码
    password: dapp!@#123
#    password: dapp!@#123
    lettuce:
      pool:
        # 连接池中的最小空闲连接
@@ -47,7 +42,7 @@
    # 连接超时时间(毫秒)
    timeout: 5000
  rabbitmq:
    host: 127.0.0.1
    host: 154.91.195.148
    port: 5672
    username: xc_rabbit
    password: xuncong123
src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -31,6 +31,9 @@
                <if test="record.level!=null and record.level!=''">
                    and m.level=#{record.level}
                </if>
                <if test="record.accountLevel!=null and record.accountLevel!=''">
                    and m.account_level=#{record.accountLevel}
                </if>
            </if>
        </where>
        order by m.CREATED_TIME desc
@@ -47,16 +50,13 @@
               a.account_status,
               a.CREATED_TIME,
               IFNULL(c.balance,0) balance,
               IFNULL(c.score,0) score,
               IFNULL(c.prize_score,0) prizeScore,
               d.description levelName,
               b.name
               FROM mall_member a
            LEFT JOIN mall_member b on a.referrer_id = b.invite_id
            LEFT JOIN mall_member_wallet c on c.member_id = a.id
            LEFT JOIN data_dictionary_custom d on d.code = a.level
            LEFT JOIN data_dictionary_custom d on d.description = a.level
            where a.id = #{id}
            GROUP BY a.id
    </select>
    <select id="selectInfoByAccount" resultType="cc.mrbird.febs.mall.entity.MallMember">
@@ -261,10 +261,10 @@
    <select id="getAgentLevelSetInfoByMemberId" resultType="cc.mrbird.febs.mall.vo.AdminAgentLevelSetInfoVo">
        SELECT a.id,d.code levelCode
        SELECT d.description levelCode
        FROM mall_member a
                 LEFT JOIN data_dictionary_custom d on d.code = a.level
        where a.id = #{id} and d.type = 'AGENT_LEVEL'
                 LEFT JOIN data_dictionary_custom d on d.description = a.level
        where a.id = #{id} and d.type = 'MEMBER_AGENT_LEVEL'
        GROUP BY a.id
    </select>
@@ -437,4 +437,12 @@
        where
            id = #{id}
    </update>
    <update id="updateLevelStatusById">
        update mall_member
        set
            level_status = #{levelStatus}
        where
            id = #{id}
    </update>
</mapper>
src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html
@@ -30,13 +30,12 @@
                                    <div class="layui-inline">
                                        <label class="layui-form-label layui-form-label-sm">会员类型</label>
                                        <div class="layui-input-inline">
                                            <select name="level">
                                            <select name="accountLevel">
                                                <option value="">请选择</option>
                                                <option value="FIRST_LEVEL">普通会员</option>
                                                <option value="SECOND_LEVEL">一星</option>
                                                <option value="THIRD_LEVEL">二星</option>
                                                <option value="FOUR_LEVEL">三星</option>
                                                <option value="FIFTH_LEVEL">四星</option>
                                                <option value="普通">普通</option>
                                                <option value="一星">一星</option>
                                                <option value="二星">二星</option>
                                                <option value="三星">三星</option>
                                            </select>
                                        </div>
                                    </div>
@@ -284,7 +283,7 @@
            }
            if (layEvent === 'resetPwd') {
                febs.modal.confirm('重置登录密码', '是否重置选中账号登录密码?', function () {
                febs.modal.confirm('重置登录密码', '是否重置选中账号登录密码为【a123456】?', function () {
                    var ids = [];
                    layui.each(checkData, function (key, item) {
                        ids.push(item.id)
@@ -294,7 +293,7 @@
            }
            if (layEvent === 'resetPayPwd') {
                febs.modal.confirm('重置交易密码', '是否重置选中账号交易密码?', function () {
                febs.modal.confirm('重置交易密码', '是否重置选中账号交易密码为【654321】?', function () {
                    var ids = [];
                    layui.each(checkData, function (key, item) {
                        ids.push(item.id)
@@ -356,7 +355,7 @@
                name: $searchForm.find('input[name="name"]').val().trim(),
                account: $searchForm.find('input[name="account"]').val().trim(),
                accountStatus: $searchForm.find("select[name='accountStatus']").val(),
                level: $searchForm.find("select[name='level']").val(),
                accountLevel: $searchForm.find("select[name='accountLevel']").val(),
            };
        }
src/main/resources/templates/febs/views/modules/mallMember/mallSystemPay.html
@@ -73,19 +73,9 @@
        initUserValue();
        function initUserValue() {
            var balance;
            if (type == 1) {
                balance = systemPay.balance
            } else if (type == 2) {
                balance = systemPay.score
            } else if (type ==3) {
                balance = systemPay.prizeScore
            } else {
            }
            form.val("systemPay-update-form", {
                "id": systemPay.id,
                "balance": balance,
                "balance": systemPay.balance,
            });
        }
src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html
@@ -62,6 +62,12 @@
                                return '<span>购买星级</span>'
                            }else if (d.type === 8) {
                                return '<span>星级保证金返还</span>'
                            }else if (d.type === 9) {
                                return '<span>提现</span>'
                            }else if (d.type === 10) {
                                return '<span>充值</span>'
                            }else if (d.type === 100) {
                                return '<span>系统拨付</span>'
                            }else{
                                return ''
                            }
src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html
@@ -30,6 +30,9 @@
                                                <option value="6">团队管理补贴</option>
                                                <option value="7">购买星级</option>
                                                <option value="8">星级保证金返还</option>
                                                <option value="9">提现</option>
                                                <option value="10">充值</option>
                                                <option value="100">系统拨付</option>
                                            </select>
                                        </div>
                                    </div>
@@ -129,6 +132,12 @@
                                return '<span>购买星级</span>'
                            }else if (d.type === 8) {
                                return '<span>星级保证金返还</span>'
                            }else if (d.type === 9) {
                                return '<span>提现</span>'
                            }else if (d.type === 10) {
                                return '<span>充值</span>'
                            }else if (d.type === 100) {
                                return '<span>系统拨付</span>'
                            }else{
                                return ''
                            }