1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?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="cn.com.ty.lift.business.capital.dao.mapper.SignInMapper" >
- <resultMap id="BaseResultMap" type="cn.com.ty.lift.business.capital.dao.entity.SignIn" >
- <id column="id" property="id" jdbcType="BIGINT" />
- <result column="mt_company_id" property="mtCompanyId" jdbcType="BIGINT" />
- <result column="project_id" property="projectId" jdbcType="BIGINT" />
- <result column="user_id" property="userId" jdbcType="BIGINT" />
- <result column="coordinate" property="coordinate" jdbcType="VARCHAR" />
- <result column="address" property="address" jdbcType="VARCHAR" />
- <result column="approach_time" property="approachTime" jdbcType="DATE" />
- <result column="leaving_time" property="leavingTime" jdbcType="DATE" />
- <result column="creator_id" property="creatorId" jdbcType="BIGINT" />
- <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
- <result column="update_id" property="updateId" jdbcType="TIMESTAMP" />
- <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, mt_company_id, project_id, user_id, coordinate, address, approach_time, leaving_time,
- creator_id, create_date, update_id, update_date, region_id
- </sql>
- <select id="findByCondition" resultType="cn.com.ty.lift.business.capital.dao.entity.model.response.SignRecord"
- parameterType="cn.com.ty.lift.business.capital.dao.entity.model.request.SignInRequest" >
- SELECT
- sign_date AS signDate,
- approach_time AS approachTime,
- leaving_time AS leavingTime,
- ui.name AS userName
- FROM sign_in si
- LEFT JOIN user_info ui ON si.user_id = ui.user_id
- WHERE si.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
- <if test="request.signDate!=null and request.signDate!=''">
- AND si.sign_date = #{request.signDate,jdbcType=DATE}
- </if>
- <if test="request.userId!=null and request.userId!=''">
- AND si.user_id = #{request.userId,jdbcType=BIGINT}
- </if>
- </select>
- </mapper>
|