| | |
| | | inner join yd_product c on c.id = a.product_id |
| | | where a.type=1 |
| | | </select> |
| | | |
| | | <update id="updateOrderProfit"> |
| | | update yd_order |
| | | set total_profit=total_profit+#{profit}, |
| | | today_profit=#{profit} |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <select id="selectAllPowerByMemberIdAndElse" resultType="java.lang.Integer"> |
| | | select ifnull(sum(quantity),0) from yd_order where type = 1 and member_id in ( |
| | | select id from member |
| | | where find_in_set(#{inviteId}, referer_ids) or invite_id=#{inviteId} |
| | | ) |
| | | </select> |
| | | |
| | | <select id="getTeamInfoList" resultType="com.xcong.excoin.modules.yunding.vo.TeamInfoVo"> |
| | | SELECT |
| | | a.invite_id invitephone |
| | | FROM |
| | | member a |
| | | WHERE |
| | | a.referer_id = #{record.inviteId} |
| | | </select> |
| | | |
| | | <select id="selectMemberByInviteId" resultType="com.xcong.excoin.modules.member.entity.MemberEntity"> |
| | | select * from member |
| | | where find_in_set(#{inviteId}, referer_ids) or invite_id=#{inviteId} |
| | | </select> |
| | | </mapper> |