zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml
@@ -6,25 +6,15 @@
    <select id="selectUserTotalScore" resultType="java.lang.Integer">
      select IFNULL(sum(IFNULL( remain_score, 0 )),0) from score_vip_detail
      <where>
      and state=1
         <if test="openId !=null">
            and open_id=#{openId}
         </if>
         <if test="vipId !=null">
            and vip_id=#{vipId}
         </if>
      </where>
        where  state=1 and vip_id=#{vipId}
   </select>
   <select id="selectEffectiveScore" resultType="com.matrix.system.score.entity.ScoreVipDetail">
      select  *  from score_vip_detail where state=1
         <if test="openId !=null">
         and open_id=#{openId}
      </if>
         <if test="vipId !=null">
            and vip_id=#{vipId}
         </if>
        select *
        from score_vip_detail
        where state = 1  and vip_id = #{vipId}
      order by create_time
   </select>