提交
This commit is contained in:
153
src/main/resources/mapper/CodeGenConfigMapper.xml
Normal file
153
src/main/resources/mapper/CodeGenConfigMapper.xml
Normal file
@@ -0,0 +1,153 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.CodeGenConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.CodeGenConfig">
|
||||
<id column="config_id" jdbcType="BIGINT" property="configId" />
|
||||
<result column="table_name" jdbcType="VARCHAR" property="tableName" />
|
||||
<result column="author" jdbcType="VARCHAR" property="author" />
|
||||
<result column="cover" jdbcType="BIT" property="cover" />
|
||||
<result column="module_name" jdbcType="VARCHAR" property="moduleName" />
|
||||
<result column="pack" jdbcType="VARCHAR" property="pack" />
|
||||
<result column="path" jdbcType="VARCHAR" property="path" />
|
||||
<result column="api_path" jdbcType="VARCHAR" property="apiPath" />
|
||||
<result column="prefix" jdbcType="VARCHAR" property="prefix" />
|
||||
<result column="api_alias" jdbcType="VARCHAR" property="apiAlias" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
config_id, table_name, author, cover, module_name, pack, path, api_path, prefix,
|
||||
api_alias
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from code_gen_config
|
||||
where config_id = #{configId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from code_gen_config
|
||||
where config_id = #{configId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeGenConfig">
|
||||
insert into code_gen_config (config_id, table_name, author,
|
||||
cover, module_name, pack,
|
||||
path, api_path, prefix,
|
||||
api_alias)
|
||||
values (#{configId,jdbcType=BIGINT}, #{tableName,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
|
||||
#{cover,jdbcType=BIT}, #{moduleName,jdbcType=VARCHAR}, #{pack,jdbcType=VARCHAR},
|
||||
#{path,jdbcType=VARCHAR}, #{apiPath,jdbcType=VARCHAR}, #{prefix,jdbcType=VARCHAR},
|
||||
#{apiAlias,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeGenConfig">
|
||||
insert into code_gen_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="configId != null">
|
||||
config_id,
|
||||
</if>
|
||||
<if test="tableName != null">
|
||||
table_name,
|
||||
</if>
|
||||
<if test="author != null">
|
||||
author,
|
||||
</if>
|
||||
<if test="cover != null">
|
||||
cover,
|
||||
</if>
|
||||
<if test="moduleName != null">
|
||||
module_name,
|
||||
</if>
|
||||
<if test="pack != null">
|
||||
pack,
|
||||
</if>
|
||||
<if test="path != null">
|
||||
path,
|
||||
</if>
|
||||
<if test="apiPath != null">
|
||||
api_path,
|
||||
</if>
|
||||
<if test="prefix != null">
|
||||
prefix,
|
||||
</if>
|
||||
<if test="apiAlias != null">
|
||||
api_alias,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="configId != null">
|
||||
#{configId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="tableName != null">
|
||||
#{tableName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="author != null">
|
||||
#{author,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cover != null">
|
||||
#{cover,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="moduleName != null">
|
||||
#{moduleName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pack != null">
|
||||
#{pack,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
#{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiPath != null">
|
||||
#{apiPath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prefix != null">
|
||||
#{prefix,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiAlias != null">
|
||||
#{apiAlias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeGenConfig">
|
||||
update code_gen_config
|
||||
<set>
|
||||
<if test="tableName != null">
|
||||
table_name = #{tableName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="author != null">
|
||||
author = #{author,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cover != null">
|
||||
cover = #{cover,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="moduleName != null">
|
||||
module_name = #{moduleName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pack != null">
|
||||
pack = #{pack,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
path = #{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiPath != null">
|
||||
api_path = #{apiPath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prefix != null">
|
||||
prefix = #{prefix,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiAlias != null">
|
||||
api_alias = #{apiAlias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where config_id = #{configId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.CodeGenConfig">
|
||||
update code_gen_config
|
||||
set table_name = #{tableName,jdbcType=VARCHAR},
|
||||
author = #{author,jdbcType=VARCHAR},
|
||||
cover = #{cover,jdbcType=BIT},
|
||||
module_name = #{moduleName,jdbcType=VARCHAR},
|
||||
pack = #{pack,jdbcType=VARCHAR},
|
||||
path = #{path,jdbcType=VARCHAR},
|
||||
api_path = #{apiPath,jdbcType=VARCHAR},
|
||||
prefix = #{prefix,jdbcType=VARCHAR},
|
||||
api_alias = #{apiAlias,jdbcType=VARCHAR}
|
||||
where config_id = #{configId,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user