12345678910111213141516171819202122232425262728293031323334 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="com.hz.employmentsite.mapper.cquery.CreditRecordCQuery">
- <select id="getListByCompanyID" resultType="com.hz.employmentsite.vo.companyService.CreditRecordVo">
- SELECT
- credit.*,
- department.`Name` AS departmentTypeName
- FROM
- pc_credit_record credit
- LEFT JOIN sys_dictionary_item department ON credit.DepartmentTypeID = department.`Value` AND department.DictionaryCode = 'CreditRecordDepartment'
- where 1=1
- <if test="companyID != null and companyID != ''">
- and companyID = #{companyID}
- </if>
- <if test="isEffective != null">
- and isEffective = #{isEffective}
- </if>
- order by EnterTime desc, ExpirationTime desc
- </select>
- <select id="getById" resultType="com.hz.employmentsite.model.PcCreditRecord">
- select * from pc_credit_record where 1=1
- <if test="creditRecordID != null and creditRecordID != ''">
- and creditRecordID = #{creditRecordID}
- </if>
- </select>
- <update id="updateEffective">
- UPDATE `pc_credit_record`
- SET IsEffective = 1
- WHERE
- DATE( ExpirationTime ) <![CDATA[ < ]]> DATE(#{day})
- AND IsEffective = 0
- </update>
- </mapper>
|