ImportAsyncMapper.xml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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.ydtech.modules.fnc.dao.ImportAsyncMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.ydtech.modules.fnc.entity.ImportResult">
  6. <id column="id" property="id"/>
  7. <result column="create_time" property="createTime"/>
  8. <result column="created_at" property="createdAt"/>
  9. <result column="completed_at" property="completedAt"/>
  10. <result column="status" property="status"/>
  11. <result column="total_amount" property="totalAmount"/>
  12. <result column="upload_url" property="uploadUrl"/>
  13. <result column="company_id" property="companyId"/>
  14. <result column="partner_companies_id" property="partnerCompaniesId"/>
  15. <result column="agreement_id" property="agreementId"/>
  16. <result column="ids" property="ids"/>
  17. <result column="hand_status" property="handStatus"/>
  18. <result column="income_id" property="incomeId"/>
  19. </resultMap>
  20. <select id="queryNew" resultType="com.ydtech.modules.fnc.entity.ImportResult">
  21. select
  22. a.id as "id",
  23. a.create_time as "createTime",
  24. a.created_at as "createdAt",
  25. a.completed_at as "completedAt",
  26. a.status as "status",
  27. a.total_amount as "totalAmount",
  28. a.upload_url as "uploadUrl",
  29. a.company_id as "companyId",
  30. a.partner_companies_id as "partnerCompaniesId",
  31. a.agreement_id as "agreementId",
  32. a.ids as "ids",
  33. a.hand_status as "handStatus",
  34. a.hand_status as "handStatus",
  35. a.income_id as "incomeId",
  36. eic.namesimple as "partnerCompaniesName"
  37. from
  38. import_task a
  39. LEFT JOIN esm_ins_company eic on eic.id = a.partner_companies_id
  40. <where>
  41. <if test="handStatus !=null and handStatus !=''">
  42. a.hand_status =#{handStatus}
  43. </if>
  44. <if test="createTime !=null and createTime !=''">
  45. AND DATE(a.create_time) =#{createTime}
  46. </if>
  47. </where>
  48. order by a.create_time desc
  49. </select>
  50. </mapper>