WayBillSplitInfoMapper.xml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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.waybill.WayBillSplitInfoMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.jkcredit.invoice.model.entity.waybill.NoCarWayBillSplitInfo">
  6. <id column="id" property="id"/>
  7. <result column="waybillNum" property="waybillNum"/>
  8. <result column="orgWaybillNum" property="orgWaybillNum"/>
  9. <result column="waybillStartTime" property="waybillStartTime"/>
  10. <result column="waybillEndTime" property="waybillEndTime"/>
  11. <result column="waybillstatus" property="waybillstatus"/>
  12. </resultMap>
  13. <sql id="baseSql">
  14. id,
  15. waybillNum,
  16. orgWaybillNum,
  17. waybillStartTime,
  18. waybillEndTime,
  19. waybillstatus
  20. </sql>
  21. <insert id="batchInsert" parameterType="java.util.List" >
  22. insert into t_waybill_split_info (
  23. waybillNum,
  24. orgWaybillNum,
  25. waybillStartTime,
  26. waybillEndTime,
  27. waybillstatus
  28. )
  29. values
  30. <foreach collection="list" separator="," item="item">
  31. ( #{item.waybillNum,jdbcType=VARCHAR}, #{item.orgWaybillNum,jdbcType=VARCHAR},
  32. #{item.waybillStartTime,jdbcType=VARCHAR}, #{item.waybillEndTime,jdbcType=VARCHAR}, #{item.waybillstatus,jdbcType=INTEGER}
  33. )
  34. </foreach>
  35. </insert>
  36. <select id="selectNoCarWayBillSplitInfosByOrgNum" parameterType="java.lang.String" resultMap="BaseResultMap">
  37. select <include refid="baseSql" /> from t_waybill_split_info where orgWaybillNum=#{wayBillNum,jdbcType=VARCHAR}
  38. </select>
  39. <update id="updateStatusById" parameterType="java.util.Map">
  40. UPDATE t_waybill_split_info set waybillstatus = #{waybillstatus} where id = #{id}
  41. </update>
  42. </mapper>