xiaoyong931011
2022-11-11 b56dfb09003079683c1dcae9a9ebcad81f19cb3c
20221021
12 files modified
122 ■■■■ changed files
src/main/java/cc/mrbird/febs/dapp/controller/MemberController.java 8 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/entity/MemberCoinWithdrawEntity.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/mapper/DappMemberDao.java 2 ●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/service/DappMemberService.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java 20 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/dapp/DappAccountMoneyChangeDao.xml 2 ●●● patch | view | raw | blame | history
src/main/resources/mapper/dapp/DappMemberDao.xml 5 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/dapp/IgtOnHookPlanOrderDao.xml 4 ●●●● patch | view | raw | blame | history
src/main/resources/mapper/dapp/MemberCoinWithdrawMapper.xml 5 ●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/dapp/member-charge.html 7 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/dapp/money-change-flow.html 57 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/walletCoin/transferInsideList.html 7 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/dapp/controller/MemberController.java
@@ -222,4 +222,12 @@
    public FebsResponse identitySet(@Valid DappMemberEntity memberEntity) {
        return dappMemberService.identitySet(memberEntity);
    }
    /**
     * 资金流水--回退
     */
    @GetMapping(value = "/amountFlowBack/{id}")
    public FebsResponse amountFlowBack(@PathVariable("id") Long id) {
        return dappMemberService.amountFlowBack(id);
    }
}
src/main/java/cc/mrbird/febs/dapp/entity/MemberCoinWithdrawEntity.java
@@ -60,6 +60,9 @@
     */
    @TableField(exist = false)
    private String description;
    @TableField(exist = false)
    private String username;
    
    
src/main/java/cc/mrbird/febs/dapp/mapper/DappMemberDao.java
@@ -70,7 +70,7 @@
    IPage<AppVersion> getAppVersionListInPage(Page<AppVersion> page, AppVersion appVersion);
    IPage<MemberCoinChargeEntity> getChargeListInPage(Page<MemberCoinChargeEntity> page, MemberCoinChargeEntity memberCoinChargeEntity);
    IPage<MemberCoinChargeEntity> getChargeListInPage(Page<MemberCoinChargeEntity> page, @Param("record")MemberCoinChargeEntity memberCoinChargeEntity);
    List<DappMemberEntity> selectTotalMemberByRefererIdAndIdentity(@Param("inviteId")String inviteId);
}
src/main/java/cc/mrbird/febs/dapp/service/DappMemberService.java
@@ -102,4 +102,6 @@
    List<AdminMemberIdentityVo> identitySetList();
    FebsResponse identitySet(DappMemberEntity memberEntity);
    FebsResponse amountFlowBack(Long id);
}
src/main/java/cc/mrbird/febs/dapp/service/impl/DappMemberServiceImpl.java
@@ -17,6 +17,7 @@
import cc.mrbird.febs.dapp.enumerate.DataDictionaryEnum;
import cc.mrbird.febs.dapp.mapper.*;
import cc.mrbird.febs.dapp.service.DappMemberService;
import cc.mrbird.febs.dapp.service.DappWalletService;
import cc.mrbird.febs.dapp.utils.CaptchaUtil;
import cc.mrbird.febs.dapp.utils.UUIDUtil;
import cc.mrbird.febs.dapp.vo.*;
@@ -1032,6 +1033,25 @@
        return new FebsResponse().success();
    }
    @Override
    public FebsResponse amountFlowBack(Long id) {
        DappAccountMoneyChangeEntity dappAccountMoneyChangeEntity = dappAccountMoneyChangeDao.selectById(id);
        if(7 == dappAccountMoneyChangeEntity.getType() || 8 == dappAccountMoneyChangeEntity.getType() ){
            Long memberId = dappAccountMoneyChangeEntity.getMemberId();
            DappWalletCoinEntity dappWalletCoinEntity = dappWalletCoinDao.selectByMemberId(memberId);
            dappWalletCoinDao.delAvailableDelTotalById(dappWalletCoinEntity.getId(),dappAccountMoneyChangeEntity.getAmount());
            DappAccountMoneyChangeEntity addFlow = new DappAccountMoneyChangeEntity(65L,
                    dappAccountMoneyChangeEntity.getAmount(), "系统", 9,dappAccountMoneyChangeEntity.getOrderId());
            dappAccountMoneyChangeDao.insert(addFlow);
            dappAccountMoneyChangeDao.deleteById(dappAccountMoneyChangeEntity.getId());
            return new FebsResponse().fail().message("操作成功");
        }else{
            return new FebsResponse().fail().message("只允许回退【盈利分成】和【流水佣金】");
        }
    }
    public String generateAsaToken(String token) {
        RSA rsa = new RSA(null, AppContants.PUBLIC_KEY);
        return rsa.encryptBase64(token + "_" + System.currentTimeMillis(), KeyType.PublicKey);
src/main/resources/mapper/dapp/DappAccountMoneyChangeDao.xml
@@ -7,7 +7,7 @@
        inner join dapp_member b on a.member_id=b.id
        <where>
            <if test="record.description!=null and record.description!=''">
                (a.member_id in (select id from dapp_member where FIND_IN_SET(#{record.description}, referer_ids)))
                and (a.member_id in (select id from dapp_member where FIND_IN_SET(#{record.description}, referer_ids)))
            </if>
            <if test="record.username !='' and record.username != null">
                and b.username like CONCAT('%',#{record.username},'%')
src/main/resources/mapper/dapp/DappMemberDao.xml
@@ -253,6 +253,11 @@
               a.*,b.username username
        from member_coin_charge a
        inner join dapp_member b on b.id = a.member_id
        <where>
            <if test="record.username !='' and record.username != null">
                and b.username = #{record.username}
            </if>
        </where>
        order  by create_time desc
    </select>
src/main/resources/mapper/dapp/IgtOnHookPlanOrderDao.xml
@@ -68,10 +68,10 @@
        <where>
            <if test="record != null" >
                <if test="record.username!=null and record.username!=''">
                    m.username = #{record.username}
                    and m.username = #{record.username}
                </if>
                <if test="record.description!=null and record.description!=''">
                    (s.member_id in (select id from dapp_member where FIND_IN_SET(#{record.description}, referer_ids)))
                    and (s.member_id in (select id from dapp_member where FIND_IN_SET(#{record.description}, referer_ids)))
                </if>
                <if test="record.state!=null and record.state!=''">
                    and s.state= #{record.state}
src/main/resources/mapper/dapp/MemberCoinWithdrawMapper.xml
@@ -12,8 +12,11 @@
        left join dapp_member m on m.id = s.member_id
        <where>
            <if test="record != null" >
                <if test="record.username!=null and record.username!=''">
                    and m.username = #{record.username}
                </if>
                <if test="record.description!=null and record.description!=''">
                    (s.member_id in (select id from dapp_member where FIND_IN_SET(#{record.description}, referer_ids)))
                    and (s.member_id in (select id from dapp_member where FIND_IN_SET(#{record.description}, referer_ids)))
                </if>
                <if test="record.isInside!=null and record.isInside!=''">
                    and s.is_inside= #{record.isInside}
src/main/resources/templates/febs/views/dapp/member-charge.html
@@ -7,6 +7,12 @@
                        <div class="layui-row">
                            <div class="layui-col-md10">
                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label layui-form-label-sm">用户名</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="username" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
<!--                                    <div class="layui-inline">-->
<!--                                        <div class="layui-input-inline">-->
<!--                                            <input type="text" name="address" autocomplete="off" placeholder="输入地址或邀请码" class="layui-input">-->
@@ -120,6 +126,7 @@
        function getQueryParams() {
            return {
                username: $searchForm.find('input[name="username"]').val().trim()
                // address: $searchForm.find('input[name="address"]').val().trim(),
                // status: $searchForm.find("select[name='status']").val(),
                // invalidate_ie_cache: new Date()
src/main/resources/templates/febs/views/dapp/money-change-flow.html
@@ -30,26 +30,6 @@
                                            </select>
                                        </div>
                                    </div>
<!--                                    <div class="layui-inline">-->
<!--                                        <label class="layui-form-label layui-form-label-sm">可兑换</label>-->
<!--                                        <div class="layui-input-inline">-->
<!--                                            <select name="changeAble">-->
<!--                                                <option value=""></option>-->
<!--                                                <option value="2">否</option>-->
<!--                                                <option value="1">是</option>-->
<!--                                            </select>-->
<!--                                        </div>-->
<!--                                    </div>-->
<!--                                    <div class="layui-inline">-->
<!--                                        <label class="layui-form-label layui-form-label-sm">可提现</label>-->
<!--                                        <div class="layui-input-inline">-->
<!--                                            <select name="withdrawAble">-->
<!--                                                <option value=""></option>-->
<!--                                                <option value="2">否</option>-->
<!--                                                <option value="1">是</option>-->
<!--                                            </select>-->
<!--                                        </div>-->
<!--                                    </div>-->
                                </div>
                            </div>
                            <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area">
@@ -111,7 +91,26 @@
        table.on('tool(moneyChangeTable)', function (obj) {
            var data = obj.data,
                layEvent = obj.event;
            if (layEvent === 'amountFlow') {
                febs.modal.open( '资金流水详情', 'onHookView/amountFlow/' + data.orderId, {
                    maxmin: true,
                });
            }
            if (layEvent === 'amountFlowBack') {
                febs.modal.confirm('回退', '是否回退当前资金流水?', function () {
                    amountFlowBack(data.id);
                });
            }
        });
        function amountFlowBack(id) {
            febs.get(ctx + 'member/amountFlowBack/' + id, null, function () {
                febs.alert.success('操作成功');
                $query.click();
            });
        }
        table.on('sort(moneyChangeTable)', function (obj) {
            sortObject = obj;
@@ -147,7 +146,23 @@
                    {field: 'afterAmount', title: '变化后金额', minWidth: 100},
                    {field: 'content', title: '描述', minWidth: 130},
                    // {title: '类型', templet: '#type-format'},
                    {field: 'createTime', title: '创建时间', minWidth: 180}
                    {field: 'createTime', title: '创建时间', minWidth: 180},
                    {title: '流水记录',
                        templet: function (d) {
                            if(d.orderId != null || d.orderId != ""){
                                return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="amountFlow" shiro:hasPermission="user:update">流水记录</button>'
                            }else{
                                return ''
                            }
                        },minWidth: 120,align:'center'},
                    {title: '流水回退',
                        templet: function (d) {
                            if(d.type == 7 || d.type == 8){
                                return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="amountFlowBack" shiro:hasPermission="user:update">流水回退</button>'
                            }else{
                                return ''
                            }
                        },minWidth: 120,align:'center'}
                ]]
            });
        }
src/main/resources/templates/febs/views/walletCoin/transferInsideList.html
@@ -8,6 +8,12 @@
                            <div class="layui-col-md10">
                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label layui-form-label-sm">用户名</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="username" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label layui-form-label-sm">操作类型</label>
                                        <div class="layui-input-inline">
                                            <select name="isInsideOption">
@@ -172,6 +178,7 @@
        function getQueryParams() {
            return {
                status: $searchForm.find("select[name='statusOption']").val(),
                username: $searchForm.find('input[name="username"]').val().trim(),
                isInside: $searchForm.find("select[name='isInsideOption']").val()
            };
        }