admin
2020-04-13 dd5b15229cb15459fa7c31ccea77dac28cbfafbd
fanli/src/main/java/com/yeshi/fanli/mapping/ExtractMapper.xml
@@ -16,7 +16,7 @@
      <result column="adminId" property="adminId" jdbcType="BIGINT" />
      <association property="userInfo" column="uid"
         select="com.yeshi.fanli.dao.mybatis.UserInfoMapper.selectByPKey">
         select="com.yeshi.fanli.dao.mybatis.UserInfoMapper.selectByPrimaryKey">
      </association>
      <association property="system" column="sid"
@@ -47,7 +47,7 @@
   <select id="computeCompensateByUid" resultType="java.math.BigDecimal"
      parameterType="java.lang.Long">
      select
      ecc_money
      sum(ecc_money)
      from yeshi_ec_extract_check_compensate
      where ecc_uid=#{0}
   </select>
@@ -74,7 +74,7 @@
      #{state,jdbcType=INTEGER},
      #{type,jdbcType=INTEGER},
      #{userInfo.id,jdbcType=BIGINT},
      #{system.id,jdbcType=BIGINT}
      #{system.id,jdbcType=BIGINT},
      #{adminId,jdbcType=BIGINT},
      #{receiveTime,jdbcType=TIMESTAMP}
      )
@@ -408,5 +408,24 @@
      AND <![CDATA[TO_DAYS( FROM_UNIXTIME(t.extractTime/1000)) = TO_DAYS(NOW())]]>
   </select>
   <select id="sumToadyApplyByUid" resultType="java.math.BigDecimal">
      SELECT IFNULL(SUM(t.`money`),0) FROM yeshi_ec_extract t
      WHERE t.`uid` = #{uid}
      AND  FROM_UNIXTIME(t.extractTime/1000,'%Y-%m-%d') = #{day}
   </select>
   <select id="sumMoneyByUidAndState" resultType="java.math.BigDecimal">
      SELECT IFNULL(SUM(t.`money`),0) FROM yeshi_ec_extract t
      WHERE t.`uid` = #{uid}
      <if test="stateList!=null">
      <foreach collection="stateList" item="state" open="and (" close=")" separator=" or ">
      `state`=#{state}
      </foreach>
      </if>
   </select>
</mapper>