CreditRecordCQuery.xml 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  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.hz.employmentsite.mapper.cquery.CreditRecordCQuery">
  4. <select id="getListByCompanyID" resultType="com.hz.employmentsite.vo.companyService.CreditRecordVo">
  5. SELECT
  6. credit.*,
  7. department.`Name` AS departmentTypeName
  8. FROM
  9. pc_credit_record credit
  10. LEFT JOIN sys_dictionary_item department ON credit.DepartmentTypeID = department.`Value` AND department.DictionaryCode = 'CreditRecordDepartment'
  11. where 1=1
  12. <if test="companyID != null and companyID != ''">
  13. and companyID = #{companyID}
  14. </if>
  15. <if test="isEffective != null">
  16. and isEffective = #{isEffective}
  17. </if>
  18. order by EnterTime desc, ExpirationTime desc
  19. </select>
  20. <select id="getById" resultType="com.hz.employmentsite.model.PcCreditRecord">
  21. select * from pc_credit_record where 1=1
  22. <if test="creditRecordID != null and creditRecordID != ''">
  23. and creditRecordID = #{creditRecordID}
  24. </if>
  25. </select>
  26. <update id="updateEffective">
  27. UPDATE `pc_credit_record`
  28. SET IsEffective = 1
  29. WHERE
  30. DATE( ExpirationTime ) <![CDATA[ < ]]> DATE(#{day})
  31. AND IsEffective = 0
  32. </update>
  33. </mapper>