| | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay"> |
| | | <id column="id" property="id"/> |
| | | <result column="name" property="name"/> |
| | | <result column="nameUser" property="nameUser"/> |
| | | <result column="number" property="number"/> |
| | | <result column="auxiliary_project" property="auxiliaryProject"/> |
| | | <result column="approved_working_hour" property="approvedWorkingHour"/> |
| | |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="state" property="state"/> |
| | | </resultMap> |
| | | <select id="selectAuxiliaryWorkingHoursDay" resultType="com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay"> |
| | | <select id="selectAuxiliaryWorkingHoursDay" resultType="com.yuanchu.mom.dto.AuxiliaryWorkingHoursDayDto"> |
| | | select data.* |
| | | from ( |
| | | select * |
| | | FROM auxiliary_working_hours_day |
| | | select awhd.*,name |
| | | FROM auxiliary_working_hours_day awhd |
| | | left join user on name_user=user.id |
| | | <if test="ids !=null and ids != ''"> |
| | | WHERE name_user in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </if> |
| | | ) data |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | </select> |
| | | <select id="selectDataByUser" resultType="com.yuanchu.mom.dto.AuxiliaryWorkingHoursDayDto"> |
| | | select awhd.*,name |
| | | FROM auxiliary_working_hours_day awhd |
| | | left join user on name_user=user.id |
| | | <if test="ids !=null and ids != ''"> |
| | | WHERE name_user in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | <select id="selectListByIds" resultType="com.yuanchu.mom.pojo.AuxiliaryWorkingHoursDay"> |
| | | select * from auxiliary_working_hours_day |
| | | where 1=1 |
| | | <if test="ids !=null and ids != ''"> |
| | | and name_user in |
| | | <foreach collection="ids" index="index" open="(" separator="," close=")" item="val"> |
| | | #{val} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |