123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- <?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.zhyc.xps.goaf.mapper.GoafCheckDefMapper">
- <resultMap id="GoafCheckDefMapper" type="com.zhyc.xps.goaf.entity.GoafCheckDef">
- <id column="check_def_id" property="checkDefId" jdbcType="BIGINT"/>
- <result column="oc_id" property="ocId" jdbcType="BIGINT"/>
- <result column="goaf_id" property="goafId" jdbcType="BIGINT"/>
- <result column="check_title" property="checkTitle" jdbcType="VARCHAR"/>
- <result column="check_type_id" property="checkTypeId" jdbcType="BIGINT"/>
- <result column="group_id" property="groupId" jdbcType="BIGINT"/>
- <result column="position_id" property="positionId" jdbcType="BIGINT"/>
- <result column="account_id" property="accountId" jdbcType="BIGINT"/>
- <result column="account_name" property="accountName" jdbcType="VARCHAR"/>
- <result column="position_name" property="positionName" jdbcType="VARCHAR"/>
- <result column="group_name" property="groupName" jdbcType="VARCHAR"/>
- <result column="checklist_id" property="checklistId" jdbcType="BIGINT"/>
- <result column="checklist_title" property="checklistTitle" jdbcType="VARCHAR"/>
- <result column="def_start_date" property="defStartDate" jdbcType="DATE"/>
- <result column="def_end_date" property="defEndDate" jdbcType="DATE"/>
- <result column="check_count" property="checkCount" jdbcType="BIGINT"/>
- <result column="check_cycle_unit" property="checkCycleUnit" jdbcType="BIGINT"/>
- <result column="job_id" property="jobId" jdbcType="BIGINT"/>
- <result column="check_desc" property="checkDesc" jdbcType="VARCHAR"/>
- <result column="status" property="status" jdbcType="BIGINT"/>
- </resultMap>
- <select id="getByList" parameterType="java.util.Map" resultMap="GoafCheckDefMapper">
- SELECT *
- FROM goaf_check_def
- WHERE 1=1
- <if test="ocId !=null">
- AND oc_id = #{ocId ,jdbcType=BIGINT}
- </if>
- <if test="goafId !=null">
- AND goaf_id = #{goafId ,jdbcType=BIGINT}
- </if>
- <if test="groupId !=null">
- AND group_id = #{groupId ,jdbcType=BIGINT}
- </if>
- <if test="accountId !=null">
- AND account_id = #{accountId ,jdbcType=BIGINT}
- </if>
- <if test="jobId !=null">
- AND job_id = #{jobId ,jdbcType=BIGINT}
- </if>
- <if test="status !=null">
- AND status = #{status ,jdbcType=BIGINT}
- </if>
- </select>
- <!--分页查询-->
- <select id="getByPage" parameterType="java.util.Map" resultMap="GoafCheckDefMapper">
- SELECT *
- FROM goaf_check_def
- WHERE 1=1
- <if test="ocId !=null">
- AND oc_id = #{ocId ,jdbcType=BIGINT}
- </if>
- <if test="goafId !=null">
- AND goaf_id = #{goafId ,jdbcType=BIGINT}
- </if>
- <if test="groupId !=null">
- AND group_id = #{groupId ,jdbcType=BIGINT}
- </if>
- <if test="accountId !=null">
- AND account_id = #{accountId ,jdbcType=BIGINT}
- </if>
- <if test="jobId !=null">
- AND job_id = #{jobId ,jdbcType=BIGINT}
- </if>
- <if test="status !=null">
- AND status = #{status ,jdbcType=BIGINT}
- </if>
- </select>
- <select id="getByjobId" resultMap="GoafCheckDefMapper">
- SELECT *
- FROM goaf_check_def
- WHERE WHERE oc_id = #{ocId ,jdbcType=BIGINT} AND goaf_id = #{goafId, jdbcType=BIGINT}
- </select>
- <select id="getBycheckDefId" resultMap="GoafCheckDefMapper">
- SELECT *
- FROM goaf_check_def
- WHERE check_def_id = #{checkDefId, jdbcType=BIGINT}
- </select>
- <insert id="create" parameterType="com.zhyc.xps.goaf.entity.GoafCheckDef">
- insert into goaf_check_def
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="checkDefId != null">
- check_def_id,
- </if>
- <if test="ocId != null">
- oc_id,
- </if>
- <if test="goafId != null">
- goaf_id,
- </if>
- <if test="checkTitle != null and checkTitle != ''">
- check_title,
- </if>
- <if test="checkTypeId != null">
- check_type_id,
- </if>
- <if test="groupId != null">
- group_id,
- </if>
- <if test="positionId != null">
- position_id,
- </if>
- <if test="accountId != null">
- account_id,
- </if>
- <if test="accountName != null and accountName != ''">
- account_name,
- </if>
- <if test="positionName != null and positionName != ''">
- position_name,
- </if>
- <if test="groupName != null and groupName != ''">
- group_name,
- </if>
- <if test="checklistId != null">
- checklist_id,
- </if>
- <if test="checklistTitle != null and checklistTitle != ''">
- checklist_title,
- </if>
- <if test="defStartDate != null">
- def_start_date,
- </if>
- <if test="defEndDate != null">
- def_end_date,
- </if>
- <if test="checkCount != null">
- check_count,
- </if>
- <if test="checkCycleUnit != null">
- check_cycle_unit,
- </if>
- <if test="jobId != null">
- job_id,
- </if>
- <if test="checkDesc != null and checkDesc != ''">
- check_desc,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="createdBy != null">
- created_by,
- </if>
- <if test="createdAt != null">
- created_at,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="checkDefId != null">
- #{checkDefId, jdbcType=BIGINT},
- </if>
- <if test="ocId != null">
- #{ocId, jdbcType=BIGINT},
- </if>
- <if test="goafId != null">
- #{goafId, jdbcType=BIGINT},
- </if>
- <if test="checkTitle != null and checkTitle != ''">
- #{checkTitle, jdbcType=VARCHAR},
- </if>
- <if test="checkTypeId != null">
- #{checkTypeId, jdbcType=BIGINT},
- </if>
- <if test="groupId != null">
- #{groupId, jdbcType=BIGINT},
- </if>
- <if test="positionId != null">
- #{positionId, jdbcType=BIGINT},
- </if>
- <if test="accountId != null">
- #{accountId, jdbcType=BIGINT},
- </if>
- <if test="accountName != null and accountName != ''">
- #{accountName, jdbcType=VARCHAR},
- </if>
- <if test="positionName != null and positionName != ''">
- #{positionName, jdbcType=VARCHAR},
- </if>
- <if test="groupName != null and groupName != ''">
- #{groupName, jdbcType=VARCHAR},
- </if>
- <if test="checklistId != null">
- #{checklistId, jdbcType=BIGINT},
- </if>
- <if test="checklistTitle != null and checklistTitle != ''">
- #{checklistTitle, jdbcType=VARCHAR},
- </if>
- <if test="defStartDate != null">
- #{defStartDate, jdbcType=DATE},
- </if>
- <if test="defEndDate != null">
- #{defEndDate, jdbcType=DATE},
- </if>
- <if test="checkCount != null">
- #{checkCount, jdbcType=BIGINT},
- </if>
- <if test="checkCycleUnit != null">
- #{checkCycleUnit, jdbcType=BIGINT},
- </if>
- <if test="jobId != null">
- #{jobId, jdbcType=BIGINT},
- </if>
- <if test="checkDesc != null and checkDesc != ''">
- #{checkDesc, jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status, jdbcType=BIGINT},
- </if>
- <if test="createdBy != null">
- #{createdBy ,jdbcType=BIGINT},
- </if>
- <if test="createdAt != null">
- #{createdAt ,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <!--Update更新-->
- <update id="update" parameterType="com.zhyc.xps.goaf.entity.GoafCheckDef">
- UPDATE goaf_check_def
- <trim suffixOverrides=",">
- <set>
- <if test="checkTitle != null">
- check_title =#{checkTitle ,jdbcType=VARCHAR},
- </if>
- <if test="checkDesc != null and checkDesc != ''">
- check_desc = #{checkDesc ,jdbcType=VARCHAR},
- </if>
- <if test="groupId != null">
- group_id = #{groupId ,jdbcType=BIGINT},
- </if>
- <if test="groupName != null and groupName!=''">
- group_name = #{groupName, jdbcType=VARCHAR},
- </if>
- <if test="accountId != null">
- account_id = #{accountId ,jdbcType=BIGINT},
- </if>
- <if test="accountName != null and accountName!=''">
- account_name = #{accountName, jdbcType=VARCHAR},
- </if>
- <if test="checkCount != null">
- check_count = #{checkCount ,jdbcType=INTEGER},
- </if>
- <if test="defStartDate != null">
- def_start_date = #{defStartDate ,jdbcType=DATE},
- </if>
- <if test="defEndDate != null">
- def_end_date = #{defEndDate ,jdbcType=DATE},
- </if>
- <if test="jobId != null">
- job_id = #{jobId ,jdbcType=BIGINT},
- </if>
- <if test="checkCycleUnit != null">
- check_cycle_unit = #{checkCycleUnit, jdbcType=BIGINT},
- </if>
- <if test="status != null">
- status = #{status, jdbcType=BIGINT},
- </if>
- <if test="checklistId != null">
- checklist_id = #{checklistId, jdbcType=BIGINT},
- </if>
- <if test="checklistTitle != null and checklistTitle!=''">
- checklist_title = #{checklistTitle, jdbcType=VARCHAR},
- </if>
- <if test="updatedBy != null">
- updated_by = #{updatedBy ,jdbcType=BIGINT},
- </if>
- <if test="updatedAt != null">
- updated_at = #{updatedAt ,jdbcType=TIMESTAMP},
- </if>
- </set>
- </trim>
- WHERE check_def_id = #{checkDefId ,jdbcType=BIGINT}
- </update>
- <delete id="delete" >
- DELETE FROM goaf_check_def
- WHERE check_def_id = #{checkDefId, jdbcType=BIGINT}
- </delete>
- <!-- <update id="delete" parameterType="java.util.Map">-->
- <!-- UPDATE goaf_check_def-->
- <!-- <trim suffixOverrides=",">-->
- <!-- <set>-->
- <!-- <if test="deletedBy != null">-->
- <!-- deleted_by = #{deletedBy ,jdbcType=BIGINT},-->
- <!-- </if>-->
- <!-- <if test="deletedAt != null">-->
- <!-- deleted_at = #{deletedAt ,jdbcType=DATE},-->
- <!-- </if>-->
- <!-- <if test="deletedFlag != null">-->
- <!-- deleted_flag = #{deletedFlag ,jdbcType=BIGINT},-->
- <!-- </if>-->
- <!-- </set>-->
- <!-- </trim>-->
- <!-- WHERE deleted_flag = 0-->
- <!-- <if test="ocId != null">-->
- <!-- AND oc_id = #{ocId,jdbcType=BIGINT}-->
- <!-- </if>-->
- <!-- <if test="goafId != null">-->
- <!-- AND goaf_id = #{goafId ,jdbcType=BIGINT}-->
- <!-- </if>-->
- <!-- <if test="checkDefId != null ">-->
- <!-- AND check_def_id = #{checkDefId ,jdbcType=BIGINT}-->
- <!-- </if>-->
- <!-- </update>-->
- </mapper>
|