| | |
| | | </select> |
| | | |
| | | <select id="selectByMemberIdInPage" resultType="com.xcong.excoin.modules.coin.parameter.vo.ZhiyaInfoVo"> |
| | | select * from zhiya_record |
| | | select a.*,(SELECT ifnull(sum(b.reward_amout),0) FROM zhiya_reward b where b.member_id = #{record.memberId} and b.record_no = a.order_no) rewardCnt from zhiya_record a |
| | | <if test="record != null"> |
| | | <where> |
| | | <if test="record.memberId != null" > |
| | | and member_id=#{record.memberId} |
| | | and a.member_id=#{record.memberId} |
| | | </if> |
| | | </where> |
| | | </if> |
| | | order by id desc |
| | | </select> |
| | | |
| | | <select id="selectZhiyaRewardByMemberIdInPage" resultType="com.xcong.excoin.modules.coin.parameter.vo.ZhiyaRewardVo"> |
| | | select * from zhiya_reward |
| | | <if test="record != null"> |
| | | <where> |
| | | <if test="record.memberId != null" > |
| | | and member_id=#{record.memberId} |
| | | </if> |
| | | <if test="record.recordNo != null" > |
| | | and record_no=#{record.recordNo} |
| | | </if> |
| | | </where> |
| | | </if> |
| | | order by id desc |
| | | </select> |
| | | |
| | | <select id="selectZhiYaRewardByStatueAndTime" resultType="com.xcong.excoin.modules.coin.entity.ZhiYaRecordEntity"> |
| | | SELECT a.* FROM zhiya_record a where a.order_status= #{orderStatus} and #{now} > a.effect_date |
| | | </select> |
| | | |
| | | |
| | | <select id="selectTotalGusdByStatueAndTime" resultType="long"> |
| | | SELECT ifnull(sum(a.zhiya_cnt),0) FROM zhiya_record a where a.order_status= #{orderStatus} and #{now} > a.effect_date |
| | | </select> |
| | | |
| | | </mapper> |