新增 用户鉴权卡实体

This commit is contained in:
Lemon
2023-03-16 13:19:27 +08:00
parent e8f425221b
commit 6d5850abee
5 changed files with 358 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
<?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.jsowell.pile.mapper.PileAuthCardMapper">
<resultMap type="com.jsowell.pile.domain.PileAuthCard" id="PileAuthCardResult">
<result property="id" column="id" />
<result property="logicCard" column="logic_card" />
<result property="physicsCard" column="physics_card" />
<result property="memberId" column="member_id" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectPileAuthCardVo">
select id, logic_card, physics_card, member_id, create_time, create_by, update_time, update_by, del_flag from pile_auth_card
</sql>
<select id="selectPileAuthCardList" parameterType="com.jsowell.pile.domain.PileAuthCard" resultMap="PileAuthCardResult">
<include refid="selectPileAuthCardVo"/>
<where>
<if test="logicCard != null and logicCard != ''"> and logic_card = #{logicCard}</if>
<if test="physicsCard != null and physicsCard != ''"> and physics_card = #{physicsCard}</if>
<if test="memberId != null and memberId != ''"> and member_id = #{memberId}</if>
</where>
</select>
<select id="selectPileAuthCardById" parameterType="Long" resultMap="PileAuthCardResult">
<include refid="selectPileAuthCardVo"/>
where id = #{id}
</select>
<insert id="insertPileAuthCard" parameterType="com.jsowell.pile.domain.PileAuthCard" useGeneratedKeys="true" keyProperty="id">
insert into pile_auth_card
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="logicCard != null">logic_card,</if>
<if test="physicsCard != null">physics_card,</if>
<if test="memberId != null">member_id,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="logicCard != null">#{logicCard},</if>
<if test="physicsCard != null">#{physicsCard},</if>
<if test="memberId != null">#{memberId},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updatePileAuthCard" parameterType="com.jsowell.pile.domain.PileAuthCard">
update pile_auth_card
<trim prefix="SET" suffixOverrides=",">
<if test="logicCard != null">logic_card = #{logicCard},</if>
<if test="physicsCard != null">physics_card = #{physicsCard},</if>
<if test="memberId != null">member_id = #{memberId},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deletePileAuthCardById" parameterType="Long">
delete from pile_auth_card where id = #{id}
</delete>
<delete id="deletePileAuthCardByIds" parameterType="String">
delete from pile_auth_card where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>