<?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">
|
<!-- namespace:该mapper.xml映射文件的 唯一标识 -->
|
<mapper namespace="com.hx.phip.dao.mapper.DeductionJoinMapper">
|
|
<!-- 整个实体类修改,表字段=实体类字段-->
|
<sql id="Update_Column_All">
|
<trim prefixOverrides=",">
|
,roleId = #{roleId},roleName = #{roleName},employeeId = #{employeeId},employeeName = #{employeeName},useDuration = #{useDuration},deductionProjectId = #{deductionProjectId},deductionSingleId = #{deductionSingleId},isDel = #{isDel},createTime = #{createTime}
|
</trim>
|
</sql>
|
|
<!-- 后续通过 namespace.id-->
|
<!--parameterType:输入参数的类型
|
resultType:查询返回结果值的类型 ,返回类型 -->
|
<insert id="insert" parameterType="com.hx.phiappt.model.deduction.DeductionJoin">
|
<selectKey keyProperty="id" resultType="String" order="BEFORE">
|
select replace(uuid(),'-','') from dual
|
</selectKey>
|
insert into deduction_join (id,roleId,roleName,employeeId,employeeName,useDuration,deductionProjectId,deductionSingleId,isDel,createTime) values (#{id},#{roleId},#{roleName},#{employeeId},#{employeeName},#{useDuration},#{deductionProjectId},#{deductionSingleId},#{isDel},#{createTime})
|
</insert>
|
|
<select id="selectList" resultType="com.hx.phiappt.model.deduction.DeductionJoin" parameterType="com.hx.mybatisTool.SqlSentence" >
|
${sqlSentence}
|
</select>
|
|
<select id="selectListByDeductionSingleId" resultType="com.hx.phiappt.model.deduction.DeductionJoin">
|
select
|
*
|
from deduction_join
|
WHERE isDel =0 AND deductionProjectId = #{deductionProjectId} AND deductionSingleId = #{deductionSingleId}
|
</select>
|
|
<select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
|
${sqlSentence}
|
</select>
|
|
<select id="selectOne" resultType="com.hx.phiappt.model.deduction.DeductionJoin" parameterType="com.hx.mybatisTool.SqlSentence" >
|
${sqlSentence}
|
</select>
|
|
<select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" >
|
${sqlSentence}
|
</select>
|
|
<select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
|
select
|
COUNT(*)
|
from deduction_join
|
WHERE ${sqlSentence}
|
</select>
|
|
<select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" >
|
${sqlSentence}
|
</select>
|
|
<select id="selectOneByKey" resultType="com.hx.phiappt.model.deduction.DeductionJoin" parameterType="java.lang.Object" >
|
select
|
id,roleId,roleName,employeeId,employeeName,useDuration,deductionProjectId,deductionSingleId,isDel,createTime
|
from deduction_join
|
WHERE id = #{value}
|
</select>
|
|
<select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.deduction.DeductionJoin" parameterType="java.lang.Object" >
|
select
|
id,roleId,roleName,employeeId,employeeName,useDuration,deductionProjectId,deductionSingleId,isDel,createTime
|
from deduction_join
|
WHERE id = #{value}
|
</select>
|
|
<update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence">
|
update
|
deduction_join
|
SET ${sqlSentence}
|
</update>
|
|
<update id="updateAll" parameterType="com.hx.phiappt.model.deduction.DeductionJoin">
|
update deduction_join
|
SET <include refid="Update_Column_All"/>
|
WHERE id = #{id}
|
</update>
|
|
<delete id="deleteWhere" parameterType="com.hx.mybatisTool.SqlSentence">
|
delete from deduction_join WHERE ${sqlSentence}
|
</delete>
|
|
<delete id="deleteById" parameterType="java.lang.Object">
|
delete from deduction_join WHERE id = #{value}
|
</delete>
|
|
<delete id="deleteByDeductionSingleId" >
|
delete from deduction_join WHERE deductionProjectId = #{deductionProjectId} AND deductionSingleId = #{deductionSingleId}
|
</delete>
|
|
</mapper>
|