PushLogMapper.xml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.api.games.dao.PushLogMapper">
  4. <resultMap id="BaseResultMap" type="com.api.games.model.PushLog">
  5. <!--
  6. WARNING - @mbg.generated
  7. -->
  8. <id column="id" jdbcType="BIGINT" property="id" />
  9. <result column="msg_id" jdbcType="VARCHAR" property="msgId" />
  10. <result column="push_time" jdbcType="TIMESTAMP" property="pushTime" />
  11. <result column="uid" jdbcType="BIGINT" property="uid" />
  12. <result column="alias" jdbcType="VARCHAR" property="alias" />
  13. <result column="type" jdbcType="INTEGER" property="type" />
  14. <result column="status" jdbcType="INTEGER" property="status" />
  15. <result column="device_id" jdbcType="VARCHAR" property="deviceId" />
  16. </resultMap>
  17. <delete id="deleteByUid">
  18. delete from push_log where uid = #{uid}
  19. </delete>
  20. <select id="listByGamePlayId" resultMap="BaseResultMap">
  21. select * from push_log where msg_id = #{id}
  22. </select>
  23. <select id="list" resultType="com.api.common.mybatis.ResultMap">
  24. select * from push_log
  25. left join sys_user su on (push_log.uid = su.id)
  26. where 1=1
  27. <if test="params.nickname!=null and params.nickname!=''">
  28. and su.nickname = #{params.nickname}
  29. </if>
  30. <if test="params.pushTime!=null and params.pushTime!=''">
  31. and date(push_time) = #{params.pushTime}
  32. </if>
  33. <if test="params.type!=null and params.type!=''">
  34. and push_log.type = #{params.type}
  35. </if>
  36. </select>
  37. </mapper>