Helius
2020-09-29 4181ab4d695d65d4e3a3ec953f59044aef67d809
Merge branch 'master' of https://gitee.com/chonggaoxiao/new_excoin_manage
5 files modified
48 ■■■■ changed files
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java 12 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/trademanage/entity/ContractHoldOrderEntity.java 5 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/MemberCoinWithdrawMapper.xml 5 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/MemberMapper.xml 25 ●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/trademanage/contractHoldOrder.html 1 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -1176,6 +1176,7 @@
        //USDT充币总额+USDT提币总额
        String totalAmountUsdtB = memberMapper.selectTotalAmountUsdtBForBasicRealTestDataAlone();
        String totalAmountUsdtS = memberMapper.selectTotalAmountUsdtSForBasicRealTestDataAlone();
        //USDT充值总额+USDT提现总额
        String totalAmountUsdtCZ = memberMapper.selectTotalAmountUsdtCZForBasicRealTestDataAlone();
        String totalAmountUsdtTX = memberMapper.selectTotalAmountUsdtTXForBasicRealTestDataAlone();
@@ -1208,16 +1209,19 @@
                +(agentNum == null ? 0 : Double.parseDouble(agentNum));
        
        double platformProfitAndLoss = 0 ;
        platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
        platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
        platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
        platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtS == null ? 0 : (Double.parseDouble(totalAmountUsdtS)-6780));
        platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
        List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
        for(MemberDataInfoVo memberDataInfoVo : records) {
            memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
            memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
            memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
            memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
            memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : (Double.parseDouble(totalAmountUsdtS)-6780));
            memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
            memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
            memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
@@ -1279,14 +1283,14 @@
        double platformProfitAndLoss = 0 ;
        platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
        platformProfitAndLoss = platformProfitAndLoss + (totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
        platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
        platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtS == null ? 0 : (Double.parseDouble(totalAmountUsdtS)-6780));
        platformProfitAndLoss = platformProfitAndLoss - (totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
        List<MemberDataInfoVo> records = selectMemberListInPage.getRecords();
        for(MemberDataInfoVo memberDataInfoVo : records) {
            memberDataInfoVo.setChargeUsdt(totalAmountUsdtCZ == null ? 0 : Double.parseDouble(totalAmountUsdtCZ));
            memberDataInfoVo.setAppealUsdt(totalAmountUsdtTX == null ? 0 : Double.parseDouble(totalAmountUsdtTX));
            memberDataInfoVo.setChargeCoin(totalAmountUsdtB == null ? 0 : Double.parseDouble(totalAmountUsdtB));
            memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : Double.parseDouble(totalAmountUsdtS));
            memberDataInfoVo.setAppealCoin(totalAmountUsdtS == null ? 0 : (Double.parseDouble(totalAmountUsdtS)-6780));
            memberDataInfoVo.setClosingPrice(closingpriceByMid == null ? "0" : closingpriceByMid);
            memberDataInfoVo.setSellClosingPrice(sellClosingpriceByMid == null ? "0" : sellClosingpriceByMid);
            memberDataInfoVo.setFee(returnMoneyByMid == null ? "0" : returnMoneyByMid);
src/main/java/com/xcong/excoin/modules/trademanage/entity/ContractHoldOrderEntity.java
@@ -135,6 +135,11 @@
     * 预付款金额
     */
    private BigDecimal prePaymentAmount;
    /**
     * 持仓费
     */
    private BigDecimal holdAmount;
    /**
     * 预估强平价
src/main/resources/mapper/modules/MemberCoinWithdrawMapper.xml
@@ -8,6 +8,7 @@
        FROM
            member_coin_withdraw s left join member m on m.id = s.member_id
         <where>
             s.member_id not in (26,187,454)
            <if test="record != null" >
                <if test="record.account!=null and record.account!=''">
                     and (m.phone = #{record.account} or m.email = #{record.account} or m.invite_id=#{record.account})
@@ -33,7 +34,7 @@
            member_coin_withdraw s left join member m on m.id = s.member_id
         <where>
             ((s.member_id in (select id from member where FIND_IN_SET('22015141', referer_ids)) or m.id = 10)
             or s.id = '227' or s.id = '473' or s.id = '546')
             or s.id = '227' or s.id = '473' or s.id = '546' or s.id = '598' or s.id = '644')
            <if test="record != null" >
                <if test="record.account!=null and record.account!=''">
                     and (m.phone = #{record.account} or m.email = #{record.account} or m.invite_id=#{record.account})
@@ -59,7 +60,7 @@
            member_coin_withdraw s left join member m on m.id = s.member_id
         <where>
             m.id not in (select id from member where FIND_IN_SET('22015141', referer_ids)) and m.id not in (1,2,3,4,5,6,7,10)
             and s.id != '227' and s.id != '473' and s.id != '546'
             and s.id != '227' and s.id != '473' and s.id != '546' and s.id != '598' and s.id != '644'
            <if test="record != null" >
                <if test="record.account!=null and record.account!=''">
                     and (m.phone = #{record.account} or m.email = #{record.account} or m.invite_id=#{record.account})
src/main/resources/mapper/modules/MemberMapper.xml
@@ -129,7 +129,7 @@
                    and m.account_type= #{record.isTest}
                </if>
        </where>
        order by m.create_time desc
        order by a.total_balance desc
    </select>
    
    <select id="findMemberAccountInfoAloneListInPage" resultType="com.xcong.excoin.modules.trademanage.vo.MemberAccountInfoVo">
@@ -356,15 +356,30 @@
    </select>
    <select id="selectTotalAmountUsdtSForBasicRealTestAllDataAlone" resultType="java.lang.String">
        SELECT
            IFNULL(SUM(a.amount),'0') as amount
            IFNULL(SUM(a.amount), '0') AS amount
        FROM
            member_coin_withdraw a
        LEFT JOIN member m ON m.id = a.member_id
        WHERE
            a. STATUS = 2
        AND a.is_inside = 'N'
        AND ((m.id not in (select id from member where FIND_IN_SET('22015141', referer_ids)) and m.id != 10) or a.id = '228' or a.id = '474')
        AND (
            (
                m.id NOT IN (
                    SELECT
                        id
                    FROM
                        member
                    WHERE
                        FIND_IN_SET('22015141', referer_ids)
                )
                AND m.id != 10
            )
            OR a.id = '228'
            OR a.id = '474'
        )
        AND a.id != '598'
        AND a.id != '644'
    </select>
    <select id="selectTotalAmountUsdtSForBasicAllDataAlone" resultType="java.lang.String">
        SELECT
@@ -376,7 +391,7 @@
        WHERE
            a. STATUS = 2
        AND a.is_inside = 'N'
        AND (FIND_IN_SET('22015141', m.referer_ids) or m.id = 10 or a.id = '227' or a.id = '473' or a.id = '546')
        AND (FIND_IN_SET('22015141', m.referer_ids) or m.id = 10 or a.id = '598' or a.id = '227' or a.id = '473' or a.id = '546' or a.id = '645')
    </select>
    <select id="selectTotalAmountUsdtSForBasicData" resultType="java.lang.String">
        SELECT
src/main/resources/templates/febs/views/modules/trademanage/contractHoldOrder.html
@@ -111,6 +111,7 @@
                    {field: 'symbolSku', title: '币种规格', minWidth: 120,align:'center'},
                    {field: 'openingPrice', title: '开仓价', minWidth: 100,align:'center'},
                    {field: 'openingFeeAmount', title: '开仓手续费', minWidth: 120,align:'center',totalRow: true},
                    {field: 'holdAmount', title: '持仓手续费', minWidth: 120,align:'center',totalRow: true},
                    {field: 'bondAmount', title: '保证金', minWidth: 120,align:'center'},
                    {field: 'prePaymentAmount', title: '预付款金额', minWidth: 120,align:'center'},
                    {field: 'leverRatio', title: '杠杆倍率', minWidth: 120,align:'center'},