| | |
| | | @Getter |
| | | public enum MallMoneyFlowTypeEnum { |
| | | |
| | | SYSTEM_CHARGE("系统拨付",100), |
| | | CHARGE("充值",10), |
| | | WITHDRAW("提现",9), |
| | | RETURN_MARKET_STAR("星级保证金返还",8), |
| | | BUY_MARKET_STAR("购买星级",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(); |
| | | } |
| | | } |
| | |
| | | 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(); |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | } 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; |
| | | } |
| | | |
| | |
| | | } |
| | | 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(); |
| | | } |
| | |
| | | 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: |
| | | # 连接池中的最小空闲连接 |
| | |
| | | # 连接超时时间(毫秒) |
| | | timeout: 5000 |
| | | rabbitmq: |
| | | host: 127.0.0.1 |
| | | host: 154.91.195.148 |
| | | port: 5672 |
| | | username: xc_rabbit |
| | | password: xuncong123 |
| | |
| | | <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 |
| | |
| | | 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"> |
| | |
| | | |
| | | |
| | | <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> |
| | | |
| | |
| | | where |
| | | id = #{id} |
| | | </update> |
| | | |
| | | <update id="updateLevelStatusById"> |
| | | update mall_member |
| | | set |
| | | level_status = #{levelStatus} |
| | | where |
| | | id = #{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | <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> |
| | |
| | | } |
| | | |
| | | if (layEvent === 'resetPwd') { |
| | | febs.modal.confirm('重置登录密码', '是否重置选中账号登录密码?', function () { |
| | | febs.modal.confirm('重置登录密码', '是否重置选中账号登录密码为【a123456】?', function () { |
| | | var ids = []; |
| | | layui.each(checkData, function (key, item) { |
| | | ids.push(item.id) |
| | |
| | | } |
| | | |
| | | if (layEvent === 'resetPayPwd') { |
| | | febs.modal.confirm('重置交易密码', '是否重置选中账号交易密码?', function () { |
| | | febs.modal.confirm('重置交易密码', '是否重置选中账号交易密码为【654321】?', function () { |
| | | var ids = []; |
| | | layui.each(checkData, function (key, item) { |
| | | ids.push(item.id) |
| | |
| | | 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(), |
| | | }; |
| | | } |
| | | |
| | |
| | | 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, |
| | | }); |
| | | } |
| | | |
| | |
| | | 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 '' |
| | | } |
| | |
| | | <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> |
| | |
| | | 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 '' |
| | | } |