TCmsVoteLogMapper.xml 1.1 KB

1234567891011121314151617181920212223
  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.sooka.mybatis.mapper.TCmsVoteLogMapper">
  4. <resultMap id="BaseResultMap" type="com.sooka.mybatis.model.TCmsVoteLog">
  5. <id column="log_id" jdbcType="INTEGER" property="log_id" />
  6. <result column="vote_id" jdbcType="INTEGER" property="vote_id" />
  7. <result column="IP" jdbcType="VARCHAR" property="IP" />
  8. <result column="votetime" jdbcType="TIMESTAMP" property="votetime" />
  9. </resultMap>
  10. <select id="checkIP" parameterType="java.lang.String" resultMap="BaseResultMap">
  11. select * from t_cms_vote_log where IP = #{IP,jdbcType=VARCHAR}
  12. </select>
  13. <select id="checkContent" parameterType="java.lang.String" resultMap="BaseResultMap">
  14. select * from t_cms_vote_log where vote_id = #{vote_id,jdbcType=INTEGER}
  15. and IP = #{IP,jdbcType=VARCHAR}
  16. </select>
  17. <select id="findByIP" parameterType="java.lang.String" resultMap="BaseResultMap">
  18. select * from t_cms_vote_log where IP = #{IP,jdbcType=VARCHAR}
  19. </select>
  20. </mapper>