@ -1,10 +1,46 @@
|
|||||||
package com.engine.organization.entity.personnelcard.po;
|
package com.engine.organization.entity.personnelcard.po;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author weaver_cl
|
* @Author weaver_cl
|
||||||
* @Description:
|
* @Description:
|
||||||
* @Date 2022/11/1
|
* @Date 2022/11/1
|
||||||
* @Version V1.0
|
* @Version V1.0
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
public class CardAccessPO {
|
public class CardAccessPO {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private Integer typeId;
|
||||||
|
|
||||||
|
private Integer typeName;
|
||||||
|
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private Integer allPeople;
|
||||||
|
|
||||||
|
private Integer superior;
|
||||||
|
|
||||||
|
private String allSuperior;
|
||||||
|
|
||||||
|
private String custom;
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
|
||||||
|
private int deleteType;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Date updateTime;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.engine.organization.mapper.personnelcard;
|
||||||
|
|
||||||
|
import com.engine.organization.entity.detach.po.ManagerDetachPO;
|
||||||
|
import com.engine.organization.entity.personnelcard.po.CardAccessPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description:
|
||||||
|
* @Date 2022/10/24
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public interface CardAccessMapper {
|
||||||
|
|
||||||
|
int insertIgnoreNull(CardAccessPO cardAccessPO);
|
||||||
|
|
||||||
|
int updateCardAccess(CardAccessPO cardAccessPO);
|
||||||
|
|
||||||
|
int deleteByIds(@Param("ids") Collection<Long> ids);
|
||||||
|
|
||||||
|
ManagerDetachPO selectById(@Param("id") Integer id);
|
||||||
|
}
|
@ -0,0 +1,225 @@
|
|||||||
|
<?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.engine.organization.mapper.personnelcard.CardAccessMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.engine.organization.entity.personnelcard.po.CardAccessPO">
|
||||||
|
<result column="id" property="id"/>
|
||||||
|
<result column="type_id" property="typeId"/>
|
||||||
|
<result column="type_name" property="typeName"/>
|
||||||
|
<result column="status" property="status"/>
|
||||||
|
<result column="all_people" property="allPeople"/>
|
||||||
|
<result column="superior" property="superior"/>
|
||||||
|
<result column="all_superior" property="allSuperior"/>
|
||||||
|
<result column="custom" property="custom"/>
|
||||||
|
<result column="creator" property="creator"/>
|
||||||
|
<result column="delete_type" property="deleteType"/>
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 表字段 -->
|
||||||
|
<sql id="baseColumns">
|
||||||
|
t.id
|
||||||
|
, t.type_id
|
||||||
|
, t.type_name
|
||||||
|
, t.status
|
||||||
|
, t.all_people
|
||||||
|
, t.superior
|
||||||
|
, t.all_superior
|
||||||
|
, t.custom
|
||||||
|
, t.creator
|
||||||
|
, t.delete_type
|
||||||
|
, t.create_time
|
||||||
|
, t.update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.personnelcard.po.CardAccessPO" keyProperty="id"
|
||||||
|
keyColumn="id" useGeneratedKeys="true">
|
||||||
|
INSERT INTO jcl_org_cardaccess
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="typeId != null ">
|
||||||
|
type_id,
|
||||||
|
</if>
|
||||||
|
<if test="typeName != null ">
|
||||||
|
type_name,
|
||||||
|
</if>
|
||||||
|
<if test="status != null ">
|
||||||
|
status,
|
||||||
|
</if>
|
||||||
|
<if test="allPeople != null ">
|
||||||
|
all_people,
|
||||||
|
</if>
|
||||||
|
<if test="superior != null ">
|
||||||
|
superior,
|
||||||
|
</if>
|
||||||
|
<if test="allSuperior != null ">
|
||||||
|
all_superior,
|
||||||
|
</if>
|
||||||
|
<if test="custom != null">
|
||||||
|
custom,
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
creator,
|
||||||
|
</if>
|
||||||
|
<if test="deleteType != null">
|
||||||
|
delete_type,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="typeId != null ">
|
||||||
|
#{typeId},
|
||||||
|
</if>
|
||||||
|
<if test="typeName != null ">
|
||||||
|
#{typeName},
|
||||||
|
</if>
|
||||||
|
<if test="status != null ">
|
||||||
|
#{status},
|
||||||
|
</if>
|
||||||
|
<if test="allPeople != null ">
|
||||||
|
#{allPeople},
|
||||||
|
</if>
|
||||||
|
<if test="superior != null ">
|
||||||
|
#{superior},
|
||||||
|
</if>
|
||||||
|
<if test="allSuperior != null ">
|
||||||
|
#{allSuperior},
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
#{creator},
|
||||||
|
</if>
|
||||||
|
<if test="custom != null">
|
||||||
|
#{custom},
|
||||||
|
</if>
|
||||||
|
<if test="deleteType != null">
|
||||||
|
#{deleteType},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.personnelcard.po.CardAccessPO" databaseId="oracle">
|
||||||
|
<selectKey keyProperty="id" resultType="long" order="AFTER">
|
||||||
|
select JCL_ORG_CARDACCESS_ID.currval from dual
|
||||||
|
</selectKey>
|
||||||
|
INSERT INTO jcl_org_cardaccess
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="typeId != null ">
|
||||||
|
type_id,
|
||||||
|
</if>
|
||||||
|
<if test="typeName != null ">
|
||||||
|
type_name,
|
||||||
|
</if>
|
||||||
|
<if test="status != null ">
|
||||||
|
status,
|
||||||
|
</if>
|
||||||
|
<if test="allPeople != null ">
|
||||||
|
all_people,
|
||||||
|
</if>
|
||||||
|
<if test="superior != null ">
|
||||||
|
superior,
|
||||||
|
</if>
|
||||||
|
<if test="allSuperior != null ">
|
||||||
|
all_superior,
|
||||||
|
</if>
|
||||||
|
<if test="custom != null">
|
||||||
|
custom,
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
creator,
|
||||||
|
</if>
|
||||||
|
<if test="deleteType != null">
|
||||||
|
delete_type,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="typeId != null ">
|
||||||
|
#{typeId},
|
||||||
|
</if>
|
||||||
|
<if test="typeName != null ">
|
||||||
|
#{typeName},
|
||||||
|
</if>
|
||||||
|
<if test="status != null ">
|
||||||
|
#{status},
|
||||||
|
</if>
|
||||||
|
<if test="allPeople != null ">
|
||||||
|
#{allPeople},
|
||||||
|
</if>
|
||||||
|
<if test="superior != null ">
|
||||||
|
#{superior},
|
||||||
|
</if>
|
||||||
|
<if test="allSuperior != null ">
|
||||||
|
#{allSuperior},
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
#{creator},
|
||||||
|
</if>
|
||||||
|
<if test="custom != null">
|
||||||
|
#{custom},
|
||||||
|
</if>
|
||||||
|
<if test="deleteType != null">
|
||||||
|
#{deleteType},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateCardAccess" parameterType="com.engine.organization.entity.personnelcard.po.CardAccessPO">
|
||||||
|
update jcl_org_cardaccess
|
||||||
|
<set>
|
||||||
|
type_id=#{typeId},
|
||||||
|
type_name=#{typeName},
|
||||||
|
status=#{status},
|
||||||
|
all_people=#{allPeople},
|
||||||
|
all_superior=#{allSuperior},
|
||||||
|
custom=#{custom},
|
||||||
|
update_time=#{updateTime},
|
||||||
|
</set>
|
||||||
|
WHERE id = #{id} AND delete_type = 0
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="deleteByIds">
|
||||||
|
UPDATE jcl_org_cardaccess
|
||||||
|
SET delete_type = 1
|
||||||
|
WHERE delete_type = 0
|
||||||
|
AND id IN
|
||||||
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectById" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="baseColumns"/>
|
||||||
|
from jcl_org_cardaccess t
|
||||||
|
WHERE delete_type = 0
|
||||||
|
AND id = #{id}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue