SelfCarApplMapper.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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.jkcredit.invoice.mapper.binvoce.SelfCarApplMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.jkcredit.invoice.model.entity.invoice.SelfCarAppl">
  6. <id column="id" property="id"/>
  7. <result column="customId" property="customId"/>
  8. <result column="companyNum" property="companyNum"/>
  9. <result column="cardId" property="cardId"/>
  10. <result column="applId" property="applId"/>
  11. <result column="invoiceCount" property="invoiceCount"/>
  12. <result column="invoiceAmount" property="invoiceAmount"/>
  13. <result column="invoiceTaxAmount" property="invoiceTaxAmount"/>
  14. <result column="applTime" property="applTime"/>
  15. <result column="voiceFlag" property="voiceFlag"/>
  16. </resultMap>
  17. <sql id="baseSql">
  18. id,
  19. customId,
  20. companyNum,
  21. cardId,
  22. applId,
  23. invoiceCount,
  24. invoiceAmount,
  25. invoiceTaxAmount,
  26. applTime,
  27. voiceFlag
  28. </sql>
  29. <select id="selectAllByPage" resultMap="BaseResultMap">
  30. select
  31. <include refid="baseSql" />
  32. from t_SelfCarAppl ORDER by id desc;
  33. </select>
  34. <select id="selectAllNoRec" resultMap="BaseResultMap">
  35. select
  36. <include refid="baseSql" />
  37. from t_SelfCarAppl where voiceFlag = 0
  38. </select>
  39. <insert id="insert" parameterType="com.jkcredit.invoice.model.entity.invoice.SelfCarAppl" >
  40. insert into t_SelfCarAppl (
  41. customId,
  42. companyNum,
  43. cardId,
  44. applId,
  45. invoiceCount,
  46. invoiceAmount,
  47. invoiceTaxAmount,
  48. applTime,
  49. voiceFlag
  50. )
  51. values ( #{customId,jdbcType=VARCHAR}, #{companyNum,jdbcType=VARCHAR},
  52. #{cardId,jdbcType=VARCHAR},#{applId,jdbcType=VARCHAR}, #{invoiceCount,jdbcType=INTEGER},
  53. #{invoiceAmount,jdbcType=INTEGER},#{invoiceTaxAmount,jdbcType=INTEGER}, #{applTime,jdbcType=VARCHAR},
  54. #{voiceFlag,jdbcType=INTEGER}
  55. )
  56. </insert>
  57. </mapper>