From 6ed309c5a80c36e752bfd799cbaba7665cf7364b Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Fri, 14 May 2021 17:31:02 +0800 Subject: [PATCH] 20210514 云顶 --- src/main/resources/mapper/modules/BasicSettingMapper.xml | 94 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 94 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/modules/BasicSettingMapper.xml b/src/main/resources/mapper/modules/BasicSettingMapper.xml index 8e43d7e..204ba1e 100644 --- a/src/main/resources/mapper/modules/BasicSettingMapper.xml +++ b/src/main/resources/mapper/modules/BasicSettingMapper.xml @@ -12,9 +12,28 @@ left join member c on c.id = a.member_id <if test="record != null"> <where> + and a.type=1 <if test="record.state != null" > and a.state=#{record.state} </if> + <if test="record.account!=null and record.account!=''"> + and (c.phone = #{record.account} or c.email = #{record.account} or c.invite_id=#{record.account}) + </if> + </where> + </if> + ORDER BY a.create_time DESC + </select> + + <select id="getAgentOrderList" resultType="com.xcong.excoin.modules.yunding.vo.YdAgentOrderVo"> + SELECT + * + FROM + yd_order a + left join yd_basic_level_setting b on b.id = a.product_id + left join member c on c.id = a.member_id + <if test="record != null"> + <where> + and a.type=2 <if test="record.account!=null and record.account!=''"> and (c.phone = #{record.account} or c.email = #{record.account} or c.invite_id=#{record.account}) </if> @@ -60,6 +79,7 @@ FROM yd_order a where a.member_id = #{memberId} + and type = #{type} </select> @@ -83,4 +103,78 @@ </select> + + <select id="selectAgentReturnByMemberId" resultType="java.math.BigDecimal"> + SELECT + IFNULL(sum(amount),0) + FROM + member_account_money_change + WHERE + member_id = #{memberId} + AND type = 6 + AND status = 1 + </select> + + <select id="seeAgentReturn" resultType="com.xcong.excoin.modules.member.entity.MemberAccountMoneyChangeEntity"> + SELECT + b.phone phoneTo, + a.content content, + a.amount amount, + a.symbol symbol, + a.status status, + c.phone phoneFrom, + d.amount amountOrder, + d.type typeOrder + FROM + member_account_money_change a + left join member b on b.id = a.member_id + left join member c on c.id = ( + select member_id from yd_order where id = a.withdraw_id + ) + left join yd_order d on d.id = a.withdraw_id + where a.type=6 + and a.member_id = #{record.id} + ORDER BY a.create_time DESC + </select> + + <select id="selectTotalProfitByMemberIdAndType" resultType="java.math.BigDecimal"> + SELECT + IFNULL(sum(total_profit),0) + FROM + yd_order a + where a.member_id = #{memberId} + and a.type = #{type} + </select> + + <select id="seeReturn" resultType="com.xcong.excoin.modules.member.entity.MemberAccountMoneyChangeEntity"> + SELECT + a.content content, + a.amount amount, + a.symbol symbol, + a.status status, + b.phone phoneFrom, + d.quantity quantityOrder, + e.name name + FROM + member_account_money_change a + left join member b on b.id = a.member_id + left join yd_order d on d.id = a.withdraw_id + left join yd_product e on e.id = d.product_id + where a.type=4 + and a.member_id = #{record.id} + ORDER BY a.create_time DESC + </select> + + <select id="seeOrder" resultType="com.xcong.excoin.modules.yunding.entity.YdOrderEntity"> + SELECT + * + FROM + yd_order a + left join yd_product e on e.id = a.product_id + where a.member_id = #{record.id} + and a.type = 1 + ORDER BY a.buy_time DESC + </select> + + </mapper> \ No newline at end of file -- Gitblit v1.9.1