123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?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.bpm.mapper.WfActivityMemberMapper">
- <resultMap id="BaseResultMap" type="com.zhyc.xps.bpm.entity.WfActivityMember">
- <result column="oc_id" property="ocId" jdbcType="BIGINT" />
- <result column="wf_def_id" property="wfDefId" jdbcType="BIGINT" />
- <result column="activity_def_id" property="activityDefId" 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" />
- </resultMap>
- <resultMap id="WfActivityMemberDtoResultMap" type="com.zhyc.xps.bpm.dto.WfActivityMemberDto" extends="BaseResultMap">
- <result column="wf_def_title" property="wfDefTitle" jdbcType="VARCHAR"/>
- <result column="activity_def_title" property="activityDefTitle" jdbcType="VARCHAR"/>
- <result column="group_name" property="groupName" jdbcType="VARCHAR"/>
- <result column="position_name" property="positionName" jdbcType="VARCHAR"/>
- <result column="account_name" property="accountName" jdbcType="VARCHAR"/>
- </resultMap>
- <sql id="Base_Column_List">
- oc_id,
- wf_def_id,
- activity_def_id,
- group_id,
- position_id,
- account_id
- </sql>
- <sql id="Ext_Column_List">
- A.oc_id,
- A.wf_def_id,
- B.wf_def_title,
- A.activity_def_id,
- C.activity_def_title,
- A.group_id,
- D.group_name,
- A.position_id,
- E.position_name,
- A.account_id,
- F.account_name
- </sql>
- <!--查询信息-->
- <select id="getByList" parameterType="java.util.Map" resultMap="WfActivityMemberDtoResultMap">
- SELECT
- <include refid="Ext_Column_List"/>
- FROM wf_activity_member AS A
- LEFT JOIN wf_def AS B ON (A.wf_def_id = B.wf_def_id)
- LEFT JOIN wf_activity_def AS C ON (A.wf_def_id = C.wf_def_id AND A.activity_def_id = C.activity_def_id)
- LEFT JOIN s_group AS D ON (A.oc_id = D.oc_id AND A.group_id = D.group_id)
- LEFT JOIN s_position AS E ON (A.oc_id = E.oc_id AND A.position_id = E.position_id)
- LEFT JOIN account AS F ON (A.oc_id = F.oc_id AND A.account_id = F.account_id)
- WHERE 1 = 1
- <if test="ocId != null">
- AND A.oc_id = #{ocId ,jdbcType=BIGINT}
- </if>
- <if test="wfDefId != null">
- AND A.wf_def_id = #{wfDefId ,jdbcType=BIGINT}
- </if>
- ORDER BY A.activity_def_id ASC
- </select>
- <!--INSERT-->
- <insert id="create" parameterType="com.zhyc.xps.bpm.entity.WfActivityMember">
- INSERT INTO wf_activity_member
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="ocId != null">
- oc_id,
- </if>
- <if test="wfDefId != null">
- wf_def_id,
- </if>
- <if test="activityDefId != null">
- activity_def_id,
- </if>
- <if test="groupId != null">
- group_id,
- </if>
- <if test="positionId != null">
- position_id,
- </if>
- <if test="accountId != null">
- account_id,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="ocId != null">
- #{ocId ,jdbcType=BIGINT},
- </if>
- <if test="wfDefId != null">
- #{wfDefId ,jdbcType=BIGINT},
- </if>
- <if test="activityDefId != null">
- #{activityDefId ,jdbcType=BIGINT},
- </if>
- <if test="groupId != null">
- #{groupId ,jdbcType=BIGINT},
- </if>
- <if test="positionId != null">
- #{positionId ,jdbcType=TIMESTAMP},
- </if>
- <if test="accountId != null">
- #{accountId ,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <!--删除-->
- <delete id="delete" parameterType="java.util.Map">
- DELETE FROM wf_activity_member
- WHERE 1 = 1
- <if test="ocId != null">
- AND oc_id = #{ocId ,jdbcType=BIGINT}
- </if>
- <if test="wfDefId != null">
- AND wf_def_id = #{wfDefId ,jdbcType=BIGINT}
- </if>
- <if test="activityDefId != null">
- AND activity_def_id = #{activityDefId ,jdbcType=BIGINT}
- </if>
- </delete>
- </mapper>
|