ganzi-api/inventory-dao/src/main/resources/mapper/SysLogOptMapper.xml
2022-09-16 15:07:17 +08:00

471 lines
18 KiB
XML

<?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.rzyc.mapper.SysLogOptMapper">
<resultMap id="BaseResultMap" type="com.rzyc.model.SysLogOpt">
<id column="SysLogOptId" jdbcType="VARCHAR" property="syslogoptid" />
<result column="ObjName" jdbcType="VARCHAR" property="objname" />
<result column="ObjChinaName" jdbcType="VARCHAR" property="objchinaname" />
<result column="ObjectId" jdbcType="VARCHAR" property="objectid" />
<result column="ObjectText" jdbcType="VARCHAR" property="objecttext" />
<result column="OptId" jdbcType="VARCHAR" property="optid" />
<result column="OptUserName" jdbcType="VARCHAR" property="optusername" />
<result column="OptChinaName" jdbcType="VARCHAR" property="optchinaname" />
<result column="OptType" jdbcType="VARCHAR" property="opttype" />
<result column="OptTime" jdbcType="TIMESTAMP" property="opttime" />
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
<result column="ModifiedBy" jdbcType="VARCHAR" property="modifiedby" />
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
<result column="SysEnterpriseId" jdbcType="VARCHAR" property="sysenterpriseid" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.rzyc.model.SysLogOptWithBLOBs">
<result column="ObjCnt1" jdbcType="LONGVARCHAR" property="objcnt1" />
<result column="ObjCnt2" jdbcType="LONGVARCHAR" property="objcnt2" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
SysLogOptId, ObjName, ObjChinaName, ObjectId, ObjectText, OptId, OptUserName, OptChinaName,
OptType, OptTime, CreatedBy, CreatedOn, ModifiedBy, ModifiedOn, SysEnterpriseId
</sql>
<sql id="Blob_Column_List">
ObjCnt1, ObjCnt2
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.rzyc.model.SysLogOptExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from SysLogOpt
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.rzyc.model.SysLogOptExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from SysLogOpt
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from SysLogOpt
where SysLogOptId = #{syslogoptid,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from SysLogOpt
where SysLogOptId = #{syslogoptid,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.rzyc.model.SysLogOptExample">
delete from SysLogOpt
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.rzyc.model.SysLogOptWithBLOBs">
insert into SysLogOpt (SysLogOptId, ObjName, ObjChinaName,
ObjectId, ObjectText, OptId,
OptUserName, OptChinaName, OptType,
OptTime, CreatedBy, CreatedOn,
ModifiedBy, ModifiedOn, SysEnterpriseId,
ObjCnt1, ObjCnt2)
values (#{syslogoptid,jdbcType=VARCHAR}, #{objname,jdbcType=VARCHAR}, #{objchinaname,jdbcType=VARCHAR},
#{objectid,jdbcType=VARCHAR}, #{objecttext,jdbcType=VARCHAR}, #{optid,jdbcType=VARCHAR},
#{optusername,jdbcType=VARCHAR}, #{optchinaname,jdbcType=VARCHAR}, #{opttype,jdbcType=VARCHAR},
#{opttime,jdbcType=TIMESTAMP}, #{createdby,jdbcType=VARCHAR}, #{createdon,jdbcType=TIMESTAMP},
#{modifiedby,jdbcType=VARCHAR}, #{modifiedon,jdbcType=TIMESTAMP}, #{sysenterpriseid,jdbcType=VARCHAR},
#{objcnt1,jdbcType=LONGVARCHAR}, #{objcnt2,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.rzyc.model.SysLogOptWithBLOBs">
insert into SysLogOpt
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="syslogoptid != null">
SysLogOptId,
</if>
<if test="objname != null">
ObjName,
</if>
<if test="objchinaname != null">
ObjChinaName,
</if>
<if test="objectid != null">
ObjectId,
</if>
<if test="objecttext != null">
ObjectText,
</if>
<if test="optid != null">
OptId,
</if>
<if test="optusername != null">
OptUserName,
</if>
<if test="optchinaname != null">
OptChinaName,
</if>
<if test="opttype != null">
OptType,
</if>
<if test="opttime != null">
OptTime,
</if>
<if test="createdby != null">
CreatedBy,
</if>
<if test="createdon != null">
CreatedOn,
</if>
<if test="modifiedby != null">
ModifiedBy,
</if>
<if test="modifiedon != null">
ModifiedOn,
</if>
<if test="sysenterpriseid != null">
SysEnterpriseId,
</if>
<if test="objcnt1 != null">
ObjCnt1,
</if>
<if test="objcnt2 != null">
ObjCnt2,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="syslogoptid != null">
#{syslogoptid,jdbcType=VARCHAR},
</if>
<if test="objname != null">
#{objname,jdbcType=VARCHAR},
</if>
<if test="objchinaname != null">
#{objchinaname,jdbcType=VARCHAR},
</if>
<if test="objectid != null">
#{objectid,jdbcType=VARCHAR},
</if>
<if test="objecttext != null">
#{objecttext,jdbcType=VARCHAR},
</if>
<if test="optid != null">
#{optid,jdbcType=VARCHAR},
</if>
<if test="optusername != null">
#{optusername,jdbcType=VARCHAR},
</if>
<if test="optchinaname != null">
#{optchinaname,jdbcType=VARCHAR},
</if>
<if test="opttype != null">
#{opttype,jdbcType=VARCHAR},
</if>
<if test="opttime != null">
#{opttime,jdbcType=TIMESTAMP},
</if>
<if test="createdby != null">
#{createdby,jdbcType=VARCHAR},
</if>
<if test="createdon != null">
#{createdon,jdbcType=TIMESTAMP},
</if>
<if test="modifiedby != null">
#{modifiedby,jdbcType=VARCHAR},
</if>
<if test="modifiedon != null">
#{modifiedon,jdbcType=TIMESTAMP},
</if>
<if test="sysenterpriseid != null">
#{sysenterpriseid,jdbcType=VARCHAR},
</if>
<if test="objcnt1 != null">
#{objcnt1,jdbcType=LONGVARCHAR},
</if>
<if test="objcnt2 != null">
#{objcnt2,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.rzyc.model.SysLogOptExample" resultType="java.lang.Long">
select count(*) from SysLogOpt
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update SysLogOpt
<set>
<if test="record.syslogoptid != null">
SysLogOptId = #{record.syslogoptid,jdbcType=VARCHAR},
</if>
<if test="record.objname != null">
ObjName = #{record.objname,jdbcType=VARCHAR},
</if>
<if test="record.objchinaname != null">
ObjChinaName = #{record.objchinaname,jdbcType=VARCHAR},
</if>
<if test="record.objectid != null">
ObjectId = #{record.objectid,jdbcType=VARCHAR},
</if>
<if test="record.objecttext != null">
ObjectText = #{record.objecttext,jdbcType=VARCHAR},
</if>
<if test="record.optid != null">
OptId = #{record.optid,jdbcType=VARCHAR},
</if>
<if test="record.optusername != null">
OptUserName = #{record.optusername,jdbcType=VARCHAR},
</if>
<if test="record.optchinaname != null">
OptChinaName = #{record.optchinaname,jdbcType=VARCHAR},
</if>
<if test="record.opttype != null">
OptType = #{record.opttype,jdbcType=VARCHAR},
</if>
<if test="record.opttime != null">
OptTime = #{record.opttime,jdbcType=TIMESTAMP},
</if>
<if test="record.createdby != null">
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
</if>
<if test="record.createdon != null">
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
</if>
<if test="record.modifiedby != null">
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
</if>
<if test="record.modifiedon != null">
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
</if>
<if test="record.sysenterpriseid != null">
SysEnterpriseId = #{record.sysenterpriseid,jdbcType=VARCHAR},
</if>
<if test="record.objcnt1 != null">
ObjCnt1 = #{record.objcnt1,jdbcType=LONGVARCHAR},
</if>
<if test="record.objcnt2 != null">
ObjCnt2 = #{record.objcnt2,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update SysLogOpt
set SysLogOptId = #{record.syslogoptid,jdbcType=VARCHAR},
ObjName = #{record.objname,jdbcType=VARCHAR},
ObjChinaName = #{record.objchinaname,jdbcType=VARCHAR},
ObjectId = #{record.objectid,jdbcType=VARCHAR},
ObjectText = #{record.objecttext,jdbcType=VARCHAR},
OptId = #{record.optid,jdbcType=VARCHAR},
OptUserName = #{record.optusername,jdbcType=VARCHAR},
OptChinaName = #{record.optchinaname,jdbcType=VARCHAR},
OptType = #{record.opttype,jdbcType=VARCHAR},
OptTime = #{record.opttime,jdbcType=TIMESTAMP},
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
SysEnterpriseId = #{record.sysenterpriseid,jdbcType=VARCHAR},
ObjCnt1 = #{record.objcnt1,jdbcType=LONGVARCHAR},
ObjCnt2 = #{record.objcnt2,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update SysLogOpt
set SysLogOptId = #{record.syslogoptid,jdbcType=VARCHAR},
ObjName = #{record.objname,jdbcType=VARCHAR},
ObjChinaName = #{record.objchinaname,jdbcType=VARCHAR},
ObjectId = #{record.objectid,jdbcType=VARCHAR},
ObjectText = #{record.objecttext,jdbcType=VARCHAR},
OptId = #{record.optid,jdbcType=VARCHAR},
OptUserName = #{record.optusername,jdbcType=VARCHAR},
OptChinaName = #{record.optchinaname,jdbcType=VARCHAR},
OptType = #{record.opttype,jdbcType=VARCHAR},
OptTime = #{record.opttime,jdbcType=TIMESTAMP},
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
SysEnterpriseId = #{record.sysenterpriseid,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.rzyc.model.SysLogOptWithBLOBs">
update SysLogOpt
<set>
<if test="objname != null">
ObjName = #{objname,jdbcType=VARCHAR},
</if>
<if test="objchinaname != null">
ObjChinaName = #{objchinaname,jdbcType=VARCHAR},
</if>
<if test="objectid != null">
ObjectId = #{objectid,jdbcType=VARCHAR},
</if>
<if test="objecttext != null">
ObjectText = #{objecttext,jdbcType=VARCHAR},
</if>
<if test="optid != null">
OptId = #{optid,jdbcType=VARCHAR},
</if>
<if test="optusername != null">
OptUserName = #{optusername,jdbcType=VARCHAR},
</if>
<if test="optchinaname != null">
OptChinaName = #{optchinaname,jdbcType=VARCHAR},
</if>
<if test="opttype != null">
OptType = #{opttype,jdbcType=VARCHAR},
</if>
<if test="opttime != null">
OptTime = #{opttime,jdbcType=TIMESTAMP},
</if>
<if test="createdby != null">
CreatedBy = #{createdby,jdbcType=VARCHAR},
</if>
<if test="createdon != null">
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
</if>
<if test="modifiedby != null">
ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
</if>
<if test="modifiedon != null">
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
</if>
<if test="sysenterpriseid != null">
SysEnterpriseId = #{sysenterpriseid,jdbcType=VARCHAR},
</if>
<if test="objcnt1 != null">
ObjCnt1 = #{objcnt1,jdbcType=LONGVARCHAR},
</if>
<if test="objcnt2 != null">
ObjCnt2 = #{objcnt2,jdbcType=LONGVARCHAR},
</if>
</set>
where SysLogOptId = #{syslogoptid,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.rzyc.model.SysLogOptWithBLOBs">
update SysLogOpt
set ObjName = #{objname,jdbcType=VARCHAR},
ObjChinaName = #{objchinaname,jdbcType=VARCHAR},
ObjectId = #{objectid,jdbcType=VARCHAR},
ObjectText = #{objecttext,jdbcType=VARCHAR},
OptId = #{optid,jdbcType=VARCHAR},
OptUserName = #{optusername,jdbcType=VARCHAR},
OptChinaName = #{optchinaname,jdbcType=VARCHAR},
OptType = #{opttype,jdbcType=VARCHAR},
OptTime = #{opttime,jdbcType=TIMESTAMP},
CreatedBy = #{createdby,jdbcType=VARCHAR},
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
SysEnterpriseId = #{sysenterpriseid,jdbcType=VARCHAR},
ObjCnt1 = #{objcnt1,jdbcType=LONGVARCHAR},
ObjCnt2 = #{objcnt2,jdbcType=LONGVARCHAR}
where SysLogOptId = #{syslogoptid,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.rzyc.model.SysLogOpt">
update SysLogOpt
set ObjName = #{objname,jdbcType=VARCHAR},
ObjChinaName = #{objchinaname,jdbcType=VARCHAR},
ObjectId = #{objectid,jdbcType=VARCHAR},
ObjectText = #{objecttext,jdbcType=VARCHAR},
OptId = #{optid,jdbcType=VARCHAR},
OptUserName = #{optusername,jdbcType=VARCHAR},
OptChinaName = #{optchinaname,jdbcType=VARCHAR},
OptType = #{opttype,jdbcType=VARCHAR},
OptTime = #{opttime,jdbcType=TIMESTAMP},
CreatedBy = #{createdby,jdbcType=VARCHAR},
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
SysEnterpriseId = #{sysenterpriseid,jdbcType=VARCHAR}
where SysLogOptId = #{syslogoptid,jdbcType=VARCHAR}
</update>
</mapper>