优化表结构

This commit is contained in:
季圣华
2020-07-21 01:36:26 +08:00
parent 1393244160
commit 70f0dae473
104 changed files with 5005 additions and 9006 deletions

View File

@@ -1,335 +1,276 @@
<?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.jsh.erp.datasource.mappers.AccountMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="SerialNo" jdbcType="VARCHAR" property="serialno" />
<result column="InitialAmount" jdbcType="DECIMAL" property="initialamount" />
<result column="CurrentAmount" jdbcType="DECIMAL" property="currentamount" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="IsDefault" jdbcType="BIT" property="isdefault" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, SerialNo, InitialAmount, CurrentAmount, Remark, IsDefault, tenant_id, delete_Flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_account
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_account
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_account (Id, Name, SerialNo,
InitialAmount, CurrentAmount, Remark,
IsDefault, tenant_id, delete_Flag
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{serialno,jdbcType=VARCHAR},
#{initialamount,jdbcType=DECIMAL}, #{currentamount,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR},
#{isdefault,jdbcType=BIT}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="serialno != null">
SerialNo,
</if>
<if test="initialamount != null">
InitialAmount,
</if>
<if test="currentamount != null">
CurrentAmount,
</if>
<if test="remark != null">
Remark,
</if>
<if test="isdefault != null">
IsDefault,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="serialno != null">
#{serialno,jdbcType=VARCHAR},
</if>
<if test="initialamount != null">
#{initialamount,jdbcType=DECIMAL},
</if>
<if test="currentamount != null">
#{currentamount,jdbcType=DECIMAL},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="isdefault != null">
#{isdefault,jdbcType=BIT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.serialno != null">
SerialNo = #{record.serialno,jdbcType=VARCHAR},
</if>
<if test="record.initialamount != null">
InitialAmount = #{record.initialamount,jdbcType=DECIMAL},
</if>
<if test="record.currentamount != null">
CurrentAmount = #{record.currentamount,jdbcType=DECIMAL},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.isdefault != null">
IsDefault = #{record.isdefault,jdbcType=BIT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
SerialNo = #{record.serialno,jdbcType=VARCHAR},
InitialAmount = #{record.initialamount,jdbcType=DECIMAL},
CurrentAmount = #{record.currentamount,jdbcType=DECIMAL},
Remark = #{record.remark,jdbcType=VARCHAR},
IsDefault = #{record.isdefault,jdbcType=BIT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="serialno != null">
SerialNo = #{serialno,jdbcType=VARCHAR},
</if>
<if test="initialamount != null">
InitialAmount = #{initialamount,jdbcType=DECIMAL},
</if>
<if test="currentamount != null">
CurrentAmount = #{currentamount,jdbcType=DECIMAL},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="isdefault != null">
IsDefault = #{isdefault,jdbcType=BIT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
set Name = #{name,jdbcType=VARCHAR},
SerialNo = #{serialno,jdbcType=VARCHAR},
InitialAmount = #{initialamount,jdbcType=DECIMAL},
CurrentAmount = #{currentamount,jdbcType=DECIMAL},
Remark = #{remark,jdbcType=VARCHAR},
IsDefault = #{isdefault,jdbcType=BIT},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
<mapper namespace="com.jsh.erp.datasource.mappers.AccountMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Account">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="serial_no" jdbcType="VARCHAR" property="serialNo" />
<result column="initial_amount" jdbcType="DECIMAL" property="initialAmount" />
<result column="current_amount" jdbcType="DECIMAL" property="currentAmount" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="is_default" jdbcType="BIT" property="isDefault" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</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">
id, name, serial_no, initial_amount, current_amount, remark, is_default, tenant_id,
delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jsh_account
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_account
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample">
delete from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Account">
insert into jsh_account (id, name, serial_no,
initial_amount, current_amount, remark,
is_default, tenant_id, delete_flag
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{serialNo,jdbcType=VARCHAR},
#{initialAmount,jdbcType=DECIMAL}, #{currentAmount,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR},
#{isDefault,jdbcType=BIT}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Account">
insert into jsh_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="serialNo != null">
serial_no,
</if>
<if test="initialAmount != null">
initial_amount,
</if>
<if test="currentAmount != null">
current_amount,
</if>
<if test="remark != null">
remark,
</if>
<if test="isDefault != null">
is_default,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="serialNo != null">
#{serialNo,jdbcType=VARCHAR},
</if>
<if test="initialAmount != null">
#{initialAmount,jdbcType=DECIMAL},
</if>
<if test="currentAmount != null">
#{currentAmount,jdbcType=DECIMAL},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="isDefault != null">
#{isDefault,jdbcType=BIT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultType="java.lang.Long">
select count(*) from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update jsh_account
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.serialNo != null">
serial_no = #{record.serialNo,jdbcType=VARCHAR},
</if>
<if test="record.initialAmount != null">
initial_amount = #{record.initialAmount,jdbcType=DECIMAL},
</if>
<if test="record.currentAmount != null">
current_amount = #{record.currentAmount,jdbcType=DECIMAL},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.isDefault != null">
is_default = #{record.isDefault,jdbcType=BIT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update jsh_account
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
serial_no = #{record.serialNo,jdbcType=VARCHAR},
initial_amount = #{record.initialAmount,jdbcType=DECIMAL},
current_amount = #{record.currentAmount,jdbcType=DECIMAL},
remark = #{record.remark,jdbcType=VARCHAR},
is_default = #{record.isDefault,jdbcType=BIT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Account">
update jsh_account
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="serialNo != null">
serial_no = #{serialNo,jdbcType=VARCHAR},
</if>
<if test="initialAmount != null">
initial_amount = #{initialAmount,jdbcType=DECIMAL},
</if>
<if test="currentAmount != null">
current_amount = #{currentAmount,jdbcType=DECIMAL},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="isDefault != null">
is_default = #{isDefault,jdbcType=BIT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Account">
update jsh_account
set name = #{name,jdbcType=VARCHAR},
serial_no = #{serialNo,jdbcType=VARCHAR},
initial_amount = #{initialAmount,jdbcType=DECIMAL},
current_amount = #{currentAmount,jdbcType=DECIMAL},
remark = #{remark,jdbcType=VARCHAR},
is_default = #{isDefault,jdbcType=BIT},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.AccountMapperEx">
<resultMap extends="com.jsh.erp.datasource.mappers.AccountMapper.BaseResultMap" id="ResultListMap" type="com.jsh.erp.datasource.vo.AccountVo4List">
<result column="thismonthamount" jdbcType="VARCHAR" property="thismonthamount" />
<result column="thisMonthAmount" jdbcType="VARCHAR" property="thisMonthAmount" />
</resultMap>
<resultMap id="ResultInOutList" type="com.jsh.erp.datasource.vo.AccountVo4InOutList">
@@ -23,12 +23,12 @@
and name like '%${name}%'
</if>
<if test="serialNo != null">
and SerialNo like '%${serialNo}%'
and serial_no like '%${serialNo}%'
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
@@ -43,12 +43,12 @@
and name like '%${name}%'
</if>
<if test="serialNo != null">
and SerialNo like '%${serialNo}%'
and serial_no like '%${serialNo}%'
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
</select>
<select id="findAccountInOutList" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="ResultInOutList">
@@ -175,7 +175,7 @@
</select>
<update id="batchDeleteAccountByIds">
update jsh_account
set delete_Flag='1'
set delete_flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">

View File

@@ -207,9 +207,9 @@
) priceSum
from jsh_depothead dh
INNER JOIN jsh_depotitem di on dh.id=di.HeaderId and ifnull(di.delete_Flag,'0') !='1'
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_material_category.`Name` categoryName
from jsh_material
LEFT JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id and ifnull(jsh_materialcategory.status,'0') !='2'
LEFT JOIN jsh_material_category on jsh_material.CategoryId=jsh_material_category.Id and ifnull(jsh_material_category.status,'0') !='2'
where ifnull(jsh_material.delete_Flag,'0') !='1'
) m
on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
@@ -233,9 +233,9 @@
select count(1) from
(select di.MaterialId, m.mName,m.Model,m.categoryName from jsh_depothead dh
INNER JOIN jsh_depotitem di on dh.id=di.HeaderId and ifnull(di.delete_Flag,'0') !='1'
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_material_category.`Name` categoryName
from jsh_material
LEFT JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id and ifnull(jsh_materialcategory.status,'0') !='2'
LEFT JOIN jsh_material_category on jsh_material.CategoryId=jsh_material_category.Id and ifnull(jsh_material_category.status,'0') !='2'
where ifnull(jsh_material.delete_Flag,'0') !='1'
) m on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="oId != null">

View File

@@ -28,16 +28,17 @@
<result column="DepotName" jdbcType="VARCHAR" property="DepotName" />
<result column="AnotherDepotName" jdbcType="VARCHAR" property="AnotherDepotName" />
<result column="UnitId" jdbcType="BIGINT" property="UnitId" />
<result column="UName" jdbcType="VARCHAR" property="UName" />
<result column="unit_name" jdbcType="VARCHAR" property="unitName" />
<result column="barCode" jdbcType="VARCHAR" property="barCode" />
</resultMap>
<resultMap extends="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap" id="ResultByMaterial" type="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
<result column="MId" jdbcType="VARCHAR" property="MId" />
<result column="MName" jdbcType="VARCHAR" property="MName" />
<result column="MMfrs" jdbcType="VARCHAR" property="MMfrs" />
<result column="MModel" jdbcType="VARCHAR" property="MModel" />
<result column="MaterialUnit" jdbcType="VARCHAR" property="MaterialUnit" />
<result column="UName" jdbcType="VARCHAR" property="UName" />
<result column="unit_name" jdbcType="VARCHAR" property="unitName" />
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
<result column="purchase_decimal" jdbcType="DECIMAL" property="purchaseDecimal" />
</resultMap>
@@ -139,7 +140,7 @@
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select di.*,m.Name MName,m.Model MModel,m.Unit MaterialUnit,m.Color MColor,m.Standard MStandard,m.Mfrs MMfrs,
m.OtherField1 MOtherField1,m.OtherField2 MOtherField2,m.OtherField3 MOtherField3,
dp1.name DepotName,dp2.name AnotherDepotName, u.id UnitId, u.UName, me.bar_code barCode
dp1.name DepotName,dp2.name AnotherDepotName, u.id UnitId, u.name unit_name, me.bar_code barCode
from jsh_depotitem di
left join jsh_material m on di.MaterialId=m.id and ifnull(m.delete_Flag,'0') !='1'
left join jsh_material_extend me on me.id=di.material_extend_id and ifnull(me.delete_Flag,'0') !='1'
@@ -152,8 +153,8 @@
</select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
select m.id MId, m.Name MName, m.Model MModel, m.Unit MaterialUnit, m.Color MColor,
me.purchase_decimal, u.UName UName
select m.id MId, m.Name MName, m.Mfrs MMfrs, m.Model MModel, m.Unit MaterialUnit, m.Color MColor,
me.purchase_decimal, u.name unit_name
from jsh_material m
left join jsh_depotitem di on di.MaterialId=m.id and ifnull(m.delete_Flag,'0') !='1'
left join jsh_depothead dh on di.HeaderId=dh.id and ifnull(dh.delete_Flag,'0') !='1'
@@ -171,7 +172,7 @@
and dh.OperTime &lt;= '${endTime}'
</if>
and ifnull(di.delete_Flag,'0') !='1'
group by m.id,m.Name, m.Model, m.Unit, m.Color, me.purchase_decimal, u.UName
group by m.id,m.Name, m.Model, m.Unit, m.Color, me.purchase_decimal, u.name
order by m.Name, m.Model asc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
@@ -381,7 +382,7 @@
(IFNULL(intype.BasicInNumber ,0) - IFNULL(outtype.BasicOutNumber ,0) - ifnull(m.safetystock,0)) BasicLinjieNumber
FROM
jsh_material m
LEFT JOIN jsh_materialcategory mc ON mc.Id = m.CategoryId
LEFT JOIN jsh_material_category mc ON mc.Id = m.CategoryId
LEFT JOIN (
SELECT
di.MaterialId,

View File

@@ -1,380 +1,321 @@
<?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.jsh.erp.datasource.mappers.FunctionsMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Number" jdbcType="VARCHAR" property="number" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="PNumber" jdbcType="VARCHAR" property="pnumber" />
<result column="URL" jdbcType="VARCHAR" property="url" />
<result column="State" jdbcType="BIT" property="state" />
<result column="Sort" jdbcType="VARCHAR" property="sort" />
<result column="Enabled" jdbcType="BIT" property="enabled" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="PushBtn" jdbcType="VARCHAR" property="pushbtn" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Number, Name, PNumber, URL, State, Sort, Enabled, Type, PushBtn, icon, delete_Flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.FunctionsExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_functions
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_functions
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_functions
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.FunctionsExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_functions
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_functions (Id, Number, Name,
PNumber, URL, State, Sort,
Enabled, Type, PushBtn,
icon, delete_Flag)
values (#{id,jdbcType=BIGINT}, #{number,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{pnumber,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{state,jdbcType=BIT}, #{sort,jdbcType=VARCHAR},
#{enabled,jdbcType=BIT}, #{type,jdbcType=VARCHAR}, #{pushbtn,jdbcType=VARCHAR},
#{icon,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_functions
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="number != null">
Number,
</if>
<if test="name != null">
Name,
</if>
<if test="pnumber != null">
PNumber,
</if>
<if test="url != null">
URL,
</if>
<if test="state != null">
State,
</if>
<if test="sort != null">
Sort,
</if>
<if test="enabled != null">
Enabled,
</if>
<if test="type != null">
Type,
</if>
<if test="pushbtn != null">
PushBtn,
</if>
<if test="icon != null">
icon,
</if>
<if test="deleteFlag != null">
delete_Flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="number != null">
#{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="pnumber != null">
#{pnumber,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="state != null">
#{state,jdbcType=BIT},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="pushbtn != null">
#{pushbtn,jdbcType=VARCHAR},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.FunctionsExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_functions
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.number != null">
Number = #{record.number,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.pnumber != null">
PNumber = #{record.pnumber,jdbcType=VARCHAR},
</if>
<if test="record.url != null">
URL = #{record.url,jdbcType=VARCHAR},
</if>
<if test="record.state != null">
State = #{record.state,jdbcType=BIT},
</if>
<if test="record.sort != null">
Sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
Enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.pushbtn != null">
PushBtn = #{record.pushbtn,jdbcType=VARCHAR},
</if>
<if test="record.icon != null">
icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
set Id = #{record.id,jdbcType=BIGINT},
Number = #{record.number,jdbcType=VARCHAR},
Name = #{record.name,jdbcType=VARCHAR},
PNumber = #{record.pnumber,jdbcType=VARCHAR},
URL = #{record.url,jdbcType=VARCHAR},
State = #{record.state,jdbcType=BIT},
Sort = #{record.sort,jdbcType=VARCHAR},
Enabled = #{record.enabled,jdbcType=BIT},
Type = #{record.type,jdbcType=VARCHAR},
PushBtn = #{record.pushbtn,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
<set>
<if test="number != null">
Number = #{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="pnumber != null">
PNumber = #{pnumber,jdbcType=VARCHAR},
</if>
<if test="url != null">
URL = #{url,jdbcType=VARCHAR},
</if>
<if test="state != null">
State = #{state,jdbcType=BIT},
</if>
<if test="sort != null">
Sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
Enabled = #{enabled,jdbcType=BIT},
</if>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="pushbtn != null">
PushBtn = #{pushbtn,jdbcType=VARCHAR},
</if>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
set Number = #{number,jdbcType=VARCHAR},
Name = #{name,jdbcType=VARCHAR},
PNumber = #{pnumber,jdbcType=VARCHAR},
URL = #{url,jdbcType=VARCHAR},
State = #{state,jdbcType=BIT},
Sort = #{sort,jdbcType=VARCHAR},
Enabled = #{enabled,jdbcType=BIT},
Type = #{type,jdbcType=VARCHAR},
PushBtn = #{pushbtn,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
<?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.jsh.erp.datasource.mappers.FunctionMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Function">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="number" jdbcType="VARCHAR" property="number" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="parent_number" jdbcType="VARCHAR" property="parentNumber" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="state" jdbcType="BIT" property="state" />
<result column="sort" jdbcType="VARCHAR" property="sort" />
<result column="enabled" jdbcType="BIT" property="enabled" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="push_btn" jdbcType="VARCHAR" property="pushBtn" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</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">
id, number, name, parent_number, url, state, sort, enabled, type, push_btn, icon,
delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.FunctionExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_function
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jsh_function
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_function
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.FunctionExample">
delete from jsh_function
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Function">
insert into jsh_function (id, number, name,
parent_number, url, state,
sort, enabled, type, push_btn,
icon, delete_flag)
values (#{id,jdbcType=BIGINT}, #{number,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{parentNumber,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{state,jdbcType=BIT},
#{sort,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT}, #{type,jdbcType=VARCHAR}, #{pushBtn,jdbcType=VARCHAR},
#{icon,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Function">
insert into jsh_function
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="number != null">
number,
</if>
<if test="name != null">
name,
</if>
<if test="parentNumber != null">
parent_number,
</if>
<if test="url != null">
url,
</if>
<if test="state != null">
state,
</if>
<if test="sort != null">
sort,
</if>
<if test="enabled != null">
enabled,
</if>
<if test="type != null">
type,
</if>
<if test="pushBtn != null">
push_btn,
</if>
<if test="icon != null">
icon,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="number != null">
#{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="parentNumber != null">
#{parentNumber,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="state != null">
#{state,jdbcType=BIT},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="pushBtn != null">
#{pushBtn,jdbcType=VARCHAR},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.FunctionExample" resultType="java.lang.Long">
select count(*) from jsh_function
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update jsh_function
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.number != null">
number = #{record.number,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.parentNumber != null">
parent_number = #{record.parentNumber,jdbcType=VARCHAR},
</if>
<if test="record.url != null">
url = #{record.url,jdbcType=VARCHAR},
</if>
<if test="record.state != null">
state = #{record.state,jdbcType=BIT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.pushBtn != null">
push_btn = #{record.pushBtn,jdbcType=VARCHAR},
</if>
<if test="record.icon != null">
icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if test="record.deleteFlag != null">
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update jsh_function
set id = #{record.id,jdbcType=BIGINT},
number = #{record.number,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
parent_number = #{record.parentNumber,jdbcType=VARCHAR},
url = #{record.url,jdbcType=VARCHAR},
state = #{record.state,jdbcType=BIT},
sort = #{record.sort,jdbcType=VARCHAR},
enabled = #{record.enabled,jdbcType=BIT},
type = #{record.type,jdbcType=VARCHAR},
push_btn = #{record.pushBtn,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Function">
update jsh_function
<set>
<if test="number != null">
number = #{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="parentNumber != null">
parent_number = #{parentNumber,jdbcType=VARCHAR},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="state != null">
state = #{state,jdbcType=BIT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="pushBtn != null">
push_btn = #{pushBtn,jdbcType=VARCHAR},
</if>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Function">
update jsh_function
set number = #{number,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
parent_number = #{parentNumber,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
state = #{state,jdbcType=BIT},
sort = #{sort,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
type = #{type,jdbcType=VARCHAR},
push_btn = #{pushBtn,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -1,9 +1,9 @@
<?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.jsh.erp.datasource.mappers.FunctionsMapperEx">
<select id="selectByConditionFunctions" parameterType="com.jsh.erp.datasource.entities.FunctionsExample" resultMap="com.jsh.erp.datasource.mappers.FunctionsMapper.BaseResultMap">
<mapper namespace="com.jsh.erp.datasource.mappers.FunctionMapperEx">
<select id="selectByConditionFunction" parameterType="com.jsh.erp.datasource.entities.FunctionExample" resultMap="com.jsh.erp.datasource.mappers.FunctionMapper.BaseResultMap">
select *
FROM jsh_functions
FROM jsh_function
where 1=1
<if test="name != null">
and name like '%${name}%'
@@ -11,16 +11,16 @@
<if test="type != null">
and type='${type}'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
order by sort asc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByFunctions" resultType="java.lang.Long">
<select id="countsByFunction" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_functions
FROM jsh_function
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
@@ -28,11 +28,11 @@
<if test="type != null">
and type='${type}'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
</select>
<update id="batchDeleteFunctionsByIds">
update jsh_functions
set delete_Flag='1'
<update id="batchDeleteFunctionByIds">
update jsh_function
set delete_flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">

View File

@@ -1,288 +1,228 @@
<?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.jsh.erp.datasource.mappers.InOutItemMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, Type, Remark, tenant_id, delete_Flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_inoutitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_inoutitem
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_inoutitem
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_inoutitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_inoutitem (Id, Name, Type,
Remark, tenant_id, delete_Flag
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_inoutitem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="type != null">
Type,
</if>
<if test="remark != null">
Remark,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_inoutitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
Type = #{record.type,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
set Name = #{name,jdbcType=VARCHAR},
Type = #{type,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
<mapper namespace="com.jsh.erp.datasource.mappers.InOutItemMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.InOutItem">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</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">
id, name, type, remark, tenant_id, delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_in_out_item
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jsh_in_out_item
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_in_out_item
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample">
delete from jsh_in_out_item
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.InOutItem">
insert into jsh_in_out_item (id, name, type,
remark, tenant_id, delete_flag
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.InOutItem">
insert into jsh_in_out_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="type != null">
type,
</if>
<if test="remark != null">
remark,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample" resultType="java.lang.Long">
select count(*) from jsh_in_out_item
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update jsh_in_out_item
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update jsh_in_out_item
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.InOutItem">
update jsh_in_out_item
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.InOutItem">
update jsh_in_out_item
set name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -3,7 +3,7 @@
<mapper namespace="com.jsh.erp.datasource.mappers.InOutItemMapperEx">
<select id="selectByConditionInOutItem" parameterType="com.jsh.erp.datasource.entities.InOutItemExample" resultMap="com.jsh.erp.datasource.mappers.InOutItemMapper.BaseResultMap">
select *
FROM jsh_inoutitem
FROM jsh_in_out_item
where 1=1
<if test="name != null">
and name like '%${name}%'
@@ -14,7 +14,7 @@
<if test="remark != null">
and remark like '%${remark}%'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
@@ -22,7 +22,7 @@
<select id="countsByInOutItem" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_inoutitem
FROM jsh_in_out_item
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
@@ -33,11 +33,11 @@
<if test="remark != null">
and remark like '%${remark}%'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
</select>
<update id="batchDeleteInOutItemByIds">
update jsh_inoutitem
set delete_Flag='1'
update jsh_in_out_item
set delete_flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">

View File

@@ -1,335 +1,258 @@
<?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.jsh.erp.datasource.mappers.LogMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="userID" jdbcType="BIGINT" property="userid" />
<result column="operation" jdbcType="VARCHAR" property="operation" />
<result column="clientIP" jdbcType="VARCHAR" property="clientip" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="contentdetails" jdbcType="VARCHAR" property="contentdetails" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, userID, operation, clientIP, createtime, status, contentdetails, remark, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.LogExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_log
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.LogExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_log (id, userID, operation,
clientIP, createtime, status,
contentdetails, remark, tenant_id
)
values (#{id,jdbcType=BIGINT}, #{userid,jdbcType=BIGINT}, #{operation,jdbcType=VARCHAR},
#{clientip,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{status,jdbcType=TINYINT},
#{contentdetails,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userid != null">
userID,
</if>
<if test="operation != null">
operation,
</if>
<if test="clientip != null">
clientIP,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="status != null">
status,
</if>
<if test="contentdetails != null">
contentdetails,
</if>
<if test="remark != null">
remark,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="userid != null">
#{userid,jdbcType=BIGINT},
</if>
<if test="operation != null">
#{operation,jdbcType=VARCHAR},
</if>
<if test="clientip != null">
#{clientip,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="contentdetails != null">
#{contentdetails,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.LogExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userid != null">
userID = #{record.userid,jdbcType=BIGINT},
</if>
<if test="record.operation != null">
operation = #{record.operation,jdbcType=VARCHAR},
</if>
<if test="record.clientip != null">
clientIP = #{record.clientip,jdbcType=VARCHAR},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.contentdetails != null">
contentdetails = #{record.contentdetails,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
set id = #{record.id,jdbcType=BIGINT},
userID = #{record.userid,jdbcType=BIGINT},
operation = #{record.operation,jdbcType=VARCHAR},
clientIP = #{record.clientip,jdbcType=VARCHAR},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
status = #{record.status,jdbcType=TINYINT},
contentdetails = #{record.contentdetails,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
<set>
<if test="userid != null">
userID = #{userid,jdbcType=BIGINT},
</if>
<if test="operation != null">
operation = #{operation,jdbcType=VARCHAR},
</if>
<if test="clientip != null">
clientIP = #{clientip,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="contentdetails != null">
contentdetails = #{contentdetails,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
set userID = #{userid,jdbcType=BIGINT},
operation = #{operation,jdbcType=VARCHAR},
clientIP = #{clientip,jdbcType=VARCHAR},
createtime = #{createtime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=TINYINT},
contentdetails = #{contentdetails,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<mapper namespace="com.jsh.erp.datasource.mappers.LogMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Log">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="operation" jdbcType="VARCHAR" property="operation" />
<result column="client_ip" jdbcType="VARCHAR" property="clientIp" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</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">
id, user_id, operation, client_ip, create_time, status, content, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.LogExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jsh_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_log
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.LogExample">
delete from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Log">
insert into jsh_log (id, user_id, operation,
client_ip, create_time, status,
content, tenant_id)
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{operation,jdbcType=VARCHAR},
#{clientIp,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=TINYINT},
#{content,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Log">
insert into jsh_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="operation != null">
operation,
</if>
<if test="clientIp != null">
client_ip,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="status != null">
status,
</if>
<if test="content != null">
content,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="operation != null">
#{operation,jdbcType=VARCHAR},
</if>
<if test="clientIp != null">
#{clientIp,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.LogExample" resultType="java.lang.Long">
select count(*) from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update jsh_log
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.operation != null">
operation = #{record.operation,jdbcType=VARCHAR},
</if>
<if test="record.clientIp != null">
client_ip = #{record.clientIp,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=VARCHAR},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update jsh_log
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
operation = #{record.operation,jdbcType=VARCHAR},
client_ip = #{record.clientIp,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
status = #{record.status,jdbcType=TINYINT},
content = #{record.content,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Log">
update jsh_log
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="operation != null">
operation = #{operation,jdbcType=VARCHAR},
</if>
<if test="clientIp != null">
client_ip = #{clientIp,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Log">
update jsh_log
set user_id = #{userId,jdbcType=BIGINT},
operation = #{operation,jdbcType=VARCHAR},
client_ip = #{clientIp,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=TINYINT},
content = #{content,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -2,36 +2,36 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.LogMapperEx">
<resultMap extends="com.jsh.erp.datasource.mappers.LogMapper.BaseResultMap" id="ResultExMap" type="com.jsh.erp.datasource.vo.LogVo4List">
<result column="userName" jdbcType="VARCHAR" property="username" />
<result column="userName" jdbcType="VARCHAR" property="userName" />
</resultMap>
<select id="selectByConditionLog" parameterType="com.jsh.erp.datasource.entities.LogExample" resultMap="ResultExMap">
select l.*,u.username userName
FROM jsh_log l
left join jsh_user u on l.userID = u.id and ifnull(u.status,'0') not in('1','2')
left join jsh_user u on l.user_id = u.id and ifnull(u.status,'0') not in('1','2')
where 1=1
<if test="operation != null">
and l.operation like '%${operation}%'
</if>
<if test="usernameID != null">
and l.userID=${usernameID}
<if test="userId != null">
and l.user_id=${userId}
</if>
<if test="clientIp != null">
and l.clientIp like '%${clientIp}%'
and l.client_ip like '%${clientIp}%'
</if>
<if test="status != null">
and l.status=${status}
</if>
<if test="beginTime != null">
and l.createtime &gt;= '${beginTime}'
and l.create_time &gt;= '${beginTime}'
</if>
<if test="endTime != null">
and l.createtime &lt;= '${endTime}'
and l.create_time &lt;= '${endTime}'
</if>
<if test="contentdetails != null">
and l.contentdetails like '%${contentdetails}%'
<if test="content != null">
and l.content like '%${content}%'
</if>
order by l.createtime desc
order by l.create_time desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
@@ -44,23 +44,23 @@
<if test="operation != null">
and operation like '%${operation}%'
</if>
<if test="usernameID != null">
and userID=${usernameID}
<if test="userId != null">
and user_id=${userId}
</if>
<if test="clientIp != null">
and clientIp like '%${clientIp}%'
and client_ip like '%${clientIp}%'
</if>
<if test="status != null">
and status = ${status}
</if>
<if test="beginTime != null"><![CDATA[
and createtime >= '${beginTime}'
]]></if>
<if test="endTime != null"><![CDATA[
and createtime <= '${endTime}'
]]></if>
<if test="contentdetails != null">
and contentdetails like '%${contentdetails}%'
<if test="beginTime != null">
and l.create_time &gt;= '${beginTime}'
</if>
<if test="endTime != null">
and l.create_time &lt;= '${endTime}'
</if>
<if test="content != null">
and content like '%${content}%'
</if>
</select>
</mapper>

View File

@@ -1,398 +1,338 @@
<?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.jsh.erp.datasource.mappers.MaterialCategoryMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="CategoryLevel" jdbcType="SMALLINT" property="categorylevel" />
<result column="ParentId" jdbcType="BIGINT" property="parentid" />
<result column="sort" jdbcType="VARCHAR" property="sort" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="serial_no" jdbcType="VARCHAR" property="serialNo" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="creator" jdbcType="BIGINT" property="creator" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="updater" jdbcType="BIGINT" property="updater" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, CategoryLevel, ParentId, sort, status, serial_no, remark, create_time,
creator, update_time, updater, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_materialcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_materialcategory
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialcategory
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialcategory (Id, Name, CategoryLevel,
ParentId, sort, status,
serial_no, remark, create_time,
creator, update_time, updater,
tenant_id)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{categorylevel,jdbcType=SMALLINT},
#{parentid,jdbcType=BIGINT}, #{sort,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{serialNo,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{creator,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{updater,jdbcType=BIGINT},
#{tenantId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialcategory
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="categorylevel != null">
CategoryLevel,
</if>
<if test="parentid != null">
ParentId,
</if>
<if test="sort != null">
sort,
</if>
<if test="status != null">
status,
</if>
<if test="serialNo != null">
serial_no,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="creator != null">
creator,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="updater != null">
updater,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="categorylevel != null">
#{categorylevel,jdbcType=SMALLINT},
</if>
<if test="parentid != null">
#{parentid,jdbcType=BIGINT},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="serialNo != null">
#{serialNo,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
#{creator,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null">
#{updater,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_materialcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.categorylevel != null">
CategoryLevel = #{record.categorylevel,jdbcType=SMALLINT},
</if>
<if test="record.parentid != null">
ParentId = #{record.parentid,jdbcType=BIGINT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.serialNo != null">
serial_no = #{record.serialNo,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updater != null">
updater = #{record.updater,jdbcType=BIGINT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
CategoryLevel = #{record.categorylevel,jdbcType=SMALLINT},
ParentId = #{record.parentid,jdbcType=BIGINT},
sort = #{record.sort,jdbcType=VARCHAR},
status = #{record.status,jdbcType=VARCHAR},
serial_no = #{record.serialNo,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
updater = #{record.updater,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="categorylevel != null">
CategoryLevel = #{categorylevel,jdbcType=SMALLINT},
</if>
<if test="parentid != null">
ParentId = #{parentid,jdbcType=BIGINT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="serialNo != null">
serial_no = #{serialNo,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
creator = #{creator,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null">
updater = #{updater,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
set Name = #{name,jdbcType=VARCHAR},
CategoryLevel = #{categorylevel,jdbcType=SMALLINT},
ParentId = #{parentid,jdbcType=BIGINT},
sort = #{sort,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
serial_no = #{serialNo,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=TIMESTAMP},
updater = #{updater,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT}
where Id = #{id,jdbcType=BIGINT}
</update>
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialCategoryMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.MaterialCategory">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="category_level" jdbcType="SMALLINT" property="categoryLevel" />
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
<result column="sort" jdbcType="VARCHAR" property="sort" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="serial_no" jdbcType="VARCHAR" property="serialNo" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="creator" jdbcType="BIGINT" property="creator" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="updater" jdbcType="BIGINT" property="updater" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</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">
id, name, category_level, parent_id, sort, status, serial_no, remark, create_time,
creator, update_time, updater, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_material_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jsh_material_category
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_material_category
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample">
delete from jsh_material_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
insert into jsh_material_category (id, name, category_level,
parent_id, sort, status,
serial_no, remark, create_time,
creator, update_time, updater,
tenant_id)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{categoryLevel,jdbcType=SMALLINT},
#{parentId,jdbcType=BIGINT}, #{sort,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{serialNo,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{creator,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{updater,jdbcType=BIGINT},
#{tenantId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
insert into jsh_material_category
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="categoryLevel != null">
category_level,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="sort != null">
sort,
</if>
<if test="status != null">
status,
</if>
<if test="serialNo != null">
serial_no,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="creator != null">
creator,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="updater != null">
updater,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="categoryLevel != null">
#{categoryLevel,jdbcType=SMALLINT},
</if>
<if test="parentId != null">
#{parentId,jdbcType=BIGINT},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="serialNo != null">
#{serialNo,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
#{creator,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null">
#{updater,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample" resultType="java.lang.Long">
select count(*) from jsh_material_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update jsh_material_category
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.categoryLevel != null">
category_level = #{record.categoryLevel,jdbcType=SMALLINT},
</if>
<if test="record.parentId != null">
parent_id = #{record.parentId,jdbcType=BIGINT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.serialNo != null">
serial_no = #{record.serialNo,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updater != null">
updater = #{record.updater,jdbcType=BIGINT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update jsh_material_category
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
category_level = #{record.categoryLevel,jdbcType=SMALLINT},
parent_id = #{record.parentId,jdbcType=BIGINT},
sort = #{record.sort,jdbcType=VARCHAR},
status = #{record.status,jdbcType=VARCHAR},
serial_no = #{record.serialNo,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
updater = #{record.updater,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
update jsh_material_category
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="categoryLevel != null">
category_level = #{categoryLevel,jdbcType=SMALLINT},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=BIGINT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="serialNo != null">
serial_no = #{serialNo,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
creator = #{creator,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null">
updater = #{updater,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
update jsh_material_category
set name = #{name,jdbcType=VARCHAR},
category_level = #{categoryLevel,jdbcType=SMALLINT},
parent_id = #{parentId,jdbcType=BIGINT},
sort = #{sort,jdbcType=VARCHAR},
status = #{status,jdbcType=VARCHAR},
serial_no = #{serialNo,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=TIMESTAMP},
updater = #{updater,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -3,14 +3,14 @@
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialCategoryMapperEx">
<select id="selectByConditionMaterialCategory" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample" resultMap="com.jsh.erp.datasource.mappers.MaterialCategoryMapper.BaseResultMap">
select *
FROM jsh_materialcategory
FROM jsh_material_category
where 1=1
and ifnull(status,'0') !='2'
<if test="name != null">
and name like '%${name}%'
</if>
<if test="parentId != null">
and parentId = ${parentId}
and parent_id = ${parentId}
</if>
and Id !=1
<if test="offset != null and rows != null">
@@ -20,14 +20,14 @@
<select id="countsByMaterialCategory" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_materialcategory
FROM jsh_material_category
WHERE 1=1
and ifnull(status,'0') !='2'
<if test="name != null">
and name like '%${name}%'
</if>
<if test="parentId != null">
and parentId = ${parentId}
and parent_id = ${parentId}
</if>
and Id !=1
</select>
@@ -53,8 +53,8 @@
<select id="getNextNodeTree" resultMap="NextTreeResultMap">
SELECT
<include refid="Base_Column_List"/>,#{currentId} as currentId
FROM jsh_materialcategory
WHERE ParentId = #{id}
FROM jsh_material_category
WHERE parent_id = #{id}
<if test="currentId != null">
and id !=#{currentId}
</if>
@@ -65,8 +65,8 @@
<select id="getNodeTree" resultMap="BaseTreeResultMap">
SELECT
<include refid="Base_Column_List"/>,#{currentId} as currentId
FROM jsh_materialcategory
WHERE ParentId = -1
FROM jsh_material_category
WHERE parent_id = -1
and ifnull(status,'0') !='2'
<if test="currentId != null">
and id !=#{currentId}
@@ -75,17 +75,17 @@
</select>
<insert id="addMaterialCategory" parameterType="com.jsh.erp.datasource.entities.MaterialCategory"
useGeneratedKeys="true" keyProperty="id" keyColumn="id">
insert into jsh_materialcategory
(Name, CategoryLevel, ParentId, sort,status,serial_no,remark,
create_Time, creator,update_Time, updater)
insert into jsh_material_category
(name, category_level, parent_id, sort,status,serial_no,remark,
create_time, creator,update_time, updater)
values
(#{name},#{categorylevel},#{parentid},#{sort},#{status},#{serialNo},#{remark},
(#{name},#{categoryLevel},#{parentId},#{sort},#{status},#{serialNo},#{remark},
#{createTime},#{creator},#{updateTime},#{updater}
)
</insert>
<update id="batchDeleteMaterialCategoryByIds">
update jsh_materialcategory
set update_Time=#{updateTime},updater=#{updater},status='2'
update jsh_material_category
set update_time=#{updateTime},updater=#{updater},status='2'
where id in (
<foreach collection="ids" item="id" separator=",">
#{id}
@@ -93,16 +93,16 @@
)
</update>
<update id="editMaterialCategory">
update jsh_materialcategory
set update_Time=#{updateTime},updater=#{updater},
ParentId=#{parentid},sort=#{sort},serial_no=#{serialNo},
update jsh_material_category
set update_time=#{updateTime},updater=#{updater},
parent_id=#{parentId},sort=#{sort},serial_no=#{serialNo},
name=#{name},remark=#{remark}
where id =#{id}
</update>
<select id="getMaterialCategoryBySerialNo" resultMap="com.jsh.erp.datasource.mappers.MaterialCategoryMapper.BaseResultMap">
select
<include refid="com.jsh.erp.datasource.mappers.MaterialCategoryMapper.Base_Column_List"/>
FROM jsh_materialcategory
FROM jsh_material_category
where 1=1
and serial_no=#{serialNo}
and ifnull(status,'0') !='2'
@@ -110,9 +110,9 @@
<select id="getMaterialCategoryListByCategoryIds" resultMap="com.jsh.erp.datasource.mappers.MaterialCategoryMapper.BaseResultMap">
select
<include refid="com.jsh.erp.datasource.mappers.MaterialCategoryMapper.Base_Column_List" />
from jsh_materialcategory
from jsh_material_category
where 1=1
and parentId in (
and parent_id in (
<foreach collection="parentIds" item="parentId" separator=",">
#{parentId}
</foreach>

View File

@@ -13,16 +13,16 @@
</resultMap>
<resultMap extends="com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap" id="ResultAndUnitMap" type="com.jsh.erp.datasource.entities.MaterialVo4Unit">
<result column="UName" jdbcType="VARCHAR" property="unitName" />
<result column="unit_name" jdbcType="VARCHAR" property="unitName" />
</resultMap>
<select id="selectByConditionMaterial" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultMapList">
select m.*,u.uname unitName, mc.name categoryName, me.bar_code,
select m.*,u.name unitName, mc.name categoryName, me.bar_code,
me.purchase_decimal, me.commodity_decimal, me.wholesale_decimal,me.low_decimal
FROM jsh_material m
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
left JOIN jsh_material_category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
where 1=1
and me.default_flag=1
<if test="barCode != null">
@@ -53,7 +53,7 @@
FROM jsh_material m
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
left JOIN jsh_material_category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
WHERE 1=1
and me.default_flag=1
<if test="barCode != null">
@@ -75,21 +75,21 @@
</select>
<select id="findUnitName" resultType="java.lang.String">
select u.UName from jsh_unit u
select u.name from jsh_unit u
left join jsh_material m on m.UnitId=u.id and ifnull(m.delete_Flag,'0') !='1'
where m.id = ${mId}
and ifnull(u.delete_Flag,'0') !='1'
</select>
<select id="findById" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
select m.*,u.UName from jsh_material m
select m.*,u.name unit_name from jsh_material m
left join jsh_unit u on m.UnitId=u.id and ifnull(u.delete_Flag,'0') !='1'
where m.id = ${id}
and ifnull(m.delete_Flag,'0') !='1'
</select>
<select id="findByIdWithBarCode" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
select m.*,u.UName,me.bar_code m_bar_code, me.commodity_unit, me.purchase_decimal, me.commodity_decimal,
select m.*,u.name unit_name,me.bar_code m_bar_code, me.commodity_unit, me.purchase_decimal, me.commodity_decimal,
me.wholesale_decimal, me.low_decimal
from jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
@@ -99,7 +99,7 @@
</select>
<select id="findBySelectWithBarCode" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
select m.*,u.UName,me.bar_code m_bar_code,me.id meId,me.commodity_unit from jsh_material m
select m.*,u.name unit_name,me.bar_code m_bar_code,me.id meId,me.commodity_unit from jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left join jsh_unit u on m.UnitId=u.id and ifnull(u.delete_Flag,'0') !='1'
where m.enabled=1 and me.id is not null
@@ -125,12 +125,12 @@
</select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultMapList">
select m.*,u.uname unitName, mc.name categoryName,me.commodity_unit,me.purchase_decimal, me.commodity_decimal,
select m.*,u.name unitName, mc.name categoryName,me.commodity_unit,me.purchase_decimal, me.commodity_decimal,
me.wholesale_decimal, me.low_decimal
FROM jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
left JOIN jsh_material_category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
where 1=1
and me.default_flag=1
<if test="name != null">
@@ -236,11 +236,11 @@
</select>
<select id="getMaterialByMeId" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultMapList">
select m.*,me.bar_code m_bar_code,u.uname unitName, mc.name categoryName
select m.*,me.bar_code m_bar_code,u.name unitName, mc.name categoryName
FROM jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_flag,'0') !='1'
left JOIN jsh_material_category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
where 1=1
<if test="meId != null">
and me.id = ${meId}

View File

@@ -1,288 +1,228 @@
<?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.jsh.erp.datasource.mappers.MaterialPropertyMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="nativeName" jdbcType="VARCHAR" property="nativename" />
<result column="enabled" jdbcType="BIT" property="enabled" />
<result column="sort" jdbcType="VARCHAR" property="sort" />
<result column="anotherName" jdbcType="VARCHAR" property="anothername" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, nativeName, enabled, sort, anotherName, delete_Flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_materialproperty
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_materialproperty
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialproperty
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialproperty
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialproperty (id, nativeName, enabled,
sort, anotherName, delete_Flag
)
values (#{id,jdbcType=BIGINT}, #{nativename,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT},
#{sort,jdbcType=VARCHAR}, #{anothername,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialproperty
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="nativename != null">
nativeName,
</if>
<if test="enabled != null">
enabled,
</if>
<if test="sort != null">
sort,
</if>
<if test="anothername != null">
anotherName,
</if>
<if test="deleteFlag != null">
delete_Flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="nativename != null">
#{nativename,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="anothername != null">
#{anothername,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_materialproperty
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.nativename != null">
nativeName = #{record.nativename,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.anothername != null">
anotherName = #{record.anothername,jdbcType=VARCHAR},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
set id = #{record.id,jdbcType=BIGINT},
nativeName = #{record.nativename,jdbcType=VARCHAR},
enabled = #{record.enabled,jdbcType=BIT},
sort = #{record.sort,jdbcType=VARCHAR},
anotherName = #{record.anothername,jdbcType=VARCHAR},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
<set>
<if test="nativename != null">
nativeName = #{nativename,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="anothername != null">
anotherName = #{anothername,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
set nativeName = #{nativename,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
sort = #{sort,jdbcType=VARCHAR},
anotherName = #{anothername,jdbcType=VARCHAR},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialPropertyMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.MaterialProperty">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="native_name" jdbcType="VARCHAR" property="nativeName" />
<result column="enabled" jdbcType="BIT" property="enabled" />
<result column="sort" jdbcType="VARCHAR" property="sort" />
<result column="another_name" jdbcType="VARCHAR" property="anotherName" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</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">
id, native_name, enabled, sort, another_name, delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_material_property
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jsh_material_property
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_material_property
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample">
delete from jsh_material_property
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
insert into jsh_material_property (id, native_name, enabled,
sort, another_name, delete_flag
)
values (#{id,jdbcType=BIGINT}, #{nativeName,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT},
#{sort,jdbcType=VARCHAR}, #{anotherName,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
insert into jsh_material_property
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="nativeName != null">
native_name,
</if>
<if test="enabled != null">
enabled,
</if>
<if test="sort != null">
sort,
</if>
<if test="anotherName != null">
another_name,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="nativeName != null">
#{nativeName,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="anotherName != null">
#{anotherName,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultType="java.lang.Long">
select count(*) from jsh_material_property
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update jsh_material_property
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.nativeName != null">
native_name = #{record.nativeName,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.anotherName != null">
another_name = #{record.anotherName,jdbcType=VARCHAR},
</if>
<if test="record.deleteFlag != null">
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update jsh_material_property
set id = #{record.id,jdbcType=BIGINT},
native_name = #{record.nativeName,jdbcType=VARCHAR},
enabled = #{record.enabled,jdbcType=BIT},
sort = #{record.sort,jdbcType=VARCHAR},
another_name = #{record.anotherName,jdbcType=VARCHAR},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
update jsh_material_property
<set>
<if test="nativeName != null">
native_name = #{nativeName,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="anotherName != null">
another_name = #{anotherName,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
update jsh_material_property
set native_name = #{nativeName,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
sort = #{sort,jdbcType=VARCHAR},
another_name = #{anotherName,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -3,12 +3,12 @@
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialPropertyMapperEx">
<select id="selectByConditionMaterialProperty" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultMap="com.jsh.erp.datasource.mappers.MaterialPropertyMapper.BaseResultMap">
select *
FROM jsh_materialproperty
FROM jsh_material_property
where 1=1
<if test="name != null">
and nativeName like '%${name}%'
and native_name like '%${name}%'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
@@ -16,16 +16,16 @@
<select id="countsByMaterialProperty" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_materialproperty
FROM jsh_material_property
WHERE 1=1
<if test="name != null">
and nativeName like '%${name}%'
and native_name like '%${name}%'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
</select>
<update id="batchDeleteMaterialPropertyByIds">
update jsh_materialproperty
set delete_Flag='1'
update jsh_material_property
set delete_flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">

View File

@@ -1,271 +1,211 @@
<?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.jsh.erp.datasource.mappers.PersonMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, Name, tenant_id, delete_Flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_person
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_person
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_person (Id, Type, Name,
tenant_id, delete_Flag)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_person
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="type != null">
Type,
</if>
<if test="name != null">
Name,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
set Id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR},
Name = #{record.name,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
<set>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
set Type = #{type,jdbcType=VARCHAR},
Name = #{name,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
<mapper namespace="com.jsh.erp.datasource.mappers.PersonMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Person">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</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">
id, type, name, tenant_id, delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jsh_person
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_person
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample">
delete from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Person">
insert into jsh_person (id, type, name,
tenant_id, delete_flag)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Person">
insert into jsh_person
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="name != null">
name,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultType="java.lang.Long">
select count(*) from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update jsh_person
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update jsh_person
set id = #{record.id,jdbcType=BIGINT},
type = #{record.type,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Person">
update jsh_person
<set>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Person">
update jsh_person
set type = #{type,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -11,7 +11,7 @@
<if test="type != null">
and type='${type}'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
@@ -27,11 +27,11 @@
<if test="type != null">
and type='${type}'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
</select>
<update id="batchDeletePersonByIds">
update jsh_person
set delete_Flag='1'
set delete_flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">

View File

@@ -1,303 +1,243 @@
<?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.jsh.erp.datasource.mappers.RoleMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, type, value, description, tenant_id, delete_Flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_role
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_role
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_role (Id, Name, type,
value, description, tenant_id,
delete_Flag)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_role
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="type != null">
type,
</if>
<if test="value != null">
value,
</if>
<if test="description != null">
description,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
set Name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
<mapper namespace="com.jsh.erp.datasource.mappers.RoleMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Role">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</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">
id, name, type, value, description, tenant_id, delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jsh_role
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_role
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample">
delete from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Role">
insert into jsh_role (id, name, type,
value, description, tenant_id,
delete_flag)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Role">
insert into jsh_role
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="type != null">
type,
</if>
<if test="value != null">
value,
</if>
<if test="description != null">
description,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample" resultType="java.lang.Long">
select count(*) from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update jsh_role
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update jsh_role
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Role">
update jsh_role
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Role">
update jsh_role
set name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -5,7 +5,7 @@
SELECT *
FROM jsh_role
WHERE 1=1
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
<if test="name != null">
and name like '%${name}%'
</if>
@@ -18,14 +18,14 @@
COUNT(id)
FROM jsh_role
WHERE 1=1
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
<if test="name != null">
and name like '%${name}%'
</if>
</select>
<update id="batchDeleteRoleByIds">
update jsh_role
set delete_Flag='1'
set delete_flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">

View File

@@ -1,383 +1,323 @@
<?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.jsh.erp.datasource.mappers.SerialNumberMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.SerialNumber">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="material_Id" jdbcType="BIGINT" property="materialId" />
<result column="serial_Number" jdbcType="VARCHAR" property="serialNumber" />
<result column="is_Sell" jdbcType="VARCHAR" property="isSell" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
<result column="create_Time" jdbcType="TIMESTAMP" property="createTime" />
<result column="creator" jdbcType="BIGINT" property="creator" />
<result column="update_Time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="updater" jdbcType="BIGINT" property="updater" />
<result column="depothead_Id" jdbcType="BIGINT" property="depotheadId" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, material_Id, serial_Number, is_Sell, remark, delete_Flag, create_Time, creator,
update_Time, updater, depothead_Id, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_serial_number
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_serial_number
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_serial_number
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_serial_number
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_serial_number (id, material_Id, serial_Number,
is_Sell, remark, delete_Flag,
create_Time, creator, update_Time,
updater, depothead_Id, tenant_id
)
values (#{id,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT}, #{serialNumber,jdbcType=VARCHAR},
#{isSell,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
#{updater,jdbcType=BIGINT}, #{depotheadId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_serial_number
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="materialId != null">
material_Id,
</if>
<if test="serialNumber != null">
serial_Number,
</if>
<if test="isSell != null">
is_Sell,
</if>
<if test="remark != null">
remark,
</if>
<if test="deleteFlag != null">
delete_Flag,
</if>
<if test="createTime != null">
create_Time,
</if>
<if test="creator != null">
creator,
</if>
<if test="updateTime != null">
update_Time,
</if>
<if test="updater != null">
updater,
</if>
<if test="depotheadId != null">
depothead_Id,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="materialId != null">
#{materialId,jdbcType=BIGINT},
</if>
<if test="serialNumber != null">
#{serialNumber,jdbcType=VARCHAR},
</if>
<if test="isSell != null">
#{isSell,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
#{creator,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null">
#{updater,jdbcType=BIGINT},
</if>
<if test="depotheadId != null">
#{depotheadId,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_serial_number
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_serial_number
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.materialId != null">
material_Id = #{record.materialId,jdbcType=BIGINT},
</if>
<if test="record.serialNumber != null">
serial_Number = #{record.serialNumber,jdbcType=VARCHAR},
</if>
<if test="record.isSell != null">
is_Sell = #{record.isSell,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_Time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_Time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updater != null">
updater = #{record.updater,jdbcType=BIGINT},
</if>
<if test="record.depotheadId != null">
depothead_Id = #{record.depotheadId,jdbcType=BIGINT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_serial_number
set id = #{record.id,jdbcType=BIGINT},
material_Id = #{record.materialId,jdbcType=BIGINT},
serial_Number = #{record.serialNumber,jdbcType=VARCHAR},
is_Sell = #{record.isSell,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
create_Time = #{record.createTime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
update_Time = #{record.updateTime,jdbcType=TIMESTAMP},
updater = #{record.updater,jdbcType=BIGINT},
depothead_Id = #{record.depotheadId,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_serial_number
<set>
<if test="materialId != null">
material_Id = #{materialId,jdbcType=BIGINT},
</if>
<if test="serialNumber != null">
serial_Number = #{serialNumber,jdbcType=VARCHAR},
</if>
<if test="isSell != null">
is_Sell = #{isSell,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_Time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
creator = #{creator,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_Time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null">
updater = #{updater,jdbcType=BIGINT},
</if>
<if test="depotheadId != null">
depothead_Id = #{depotheadId,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_serial_number
set material_Id = #{materialId,jdbcType=BIGINT},
serial_Number = #{serialNumber,jdbcType=VARCHAR},
is_Sell = #{isSell,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
create_Time = #{createTime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
update_Time = #{updateTime,jdbcType=TIMESTAMP},
updater = #{updater,jdbcType=BIGINT},
depothead_Id = #{depotheadId,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<mapper namespace="com.jsh.erp.datasource.mappers.SerialNumberMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.SerialNumber">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="material_id" jdbcType="BIGINT" property="materialId" />
<result column="serial_number" jdbcType="VARCHAR" property="serialNumber" />
<result column="is_sell" jdbcType="VARCHAR" property="isSell" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="creator" jdbcType="BIGINT" property="creator" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="updater" jdbcType="BIGINT" property="updater" />
<result column="depot_head_id" jdbcType="BIGINT" property="depotHeadId" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</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">
id, material_id, serial_number, is_sell, remark, delete_flag, create_time, creator,
update_time, updater, depot_head_id, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_serial_number
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jsh_serial_number
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_serial_number
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample">
delete from jsh_serial_number
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
insert into jsh_serial_number (id, material_id, serial_number,
is_sell, remark, delete_flag,
create_time, creator, update_time,
updater, depot_head_id, tenant_id
)
values (#{id,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT}, #{serialNumber,jdbcType=VARCHAR},
#{isSell,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
#{updater,jdbcType=BIGINT}, #{depotHeadId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
insert into jsh_serial_number
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="materialId != null">
material_id,
</if>
<if test="serialNumber != null">
serial_number,
</if>
<if test="isSell != null">
is_sell,
</if>
<if test="remark != null">
remark,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="creator != null">
creator,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="updater != null">
updater,
</if>
<if test="depotHeadId != null">
depot_head_id,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="materialId != null">
#{materialId,jdbcType=BIGINT},
</if>
<if test="serialNumber != null">
#{serialNumber,jdbcType=VARCHAR},
</if>
<if test="isSell != null">
#{isSell,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
#{creator,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null">
#{updater,jdbcType=BIGINT},
</if>
<if test="depotHeadId != null">
#{depotHeadId,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SerialNumberExample" resultType="java.lang.Long">
select count(*) from jsh_serial_number
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update jsh_serial_number
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.materialId != null">
material_id = #{record.materialId,jdbcType=BIGINT},
</if>
<if test="record.serialNumber != null">
serial_number = #{record.serialNumber,jdbcType=VARCHAR},
</if>
<if test="record.isSell != null">
is_sell = #{record.isSell,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.deleteFlag != null">
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updater != null">
updater = #{record.updater,jdbcType=BIGINT},
</if>
<if test="record.depotHeadId != null">
depot_head_id = #{record.depotHeadId,jdbcType=BIGINT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update jsh_serial_number
set id = #{record.id,jdbcType=BIGINT},
material_id = #{record.materialId,jdbcType=BIGINT},
serial_number = #{record.serialNumber,jdbcType=VARCHAR},
is_sell = #{record.isSell,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
updater = #{record.updater,jdbcType=BIGINT},
depot_head_id = #{record.depotHeadId,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
update jsh_serial_number
<set>
<if test="materialId != null">
material_id = #{materialId,jdbcType=BIGINT},
</if>
<if test="serialNumber != null">
serial_number = #{serialNumber,jdbcType=VARCHAR},
</if>
<if test="isSell != null">
is_sell = #{isSell,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
creator = #{creator,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null">
updater = #{updater,jdbcType=BIGINT},
</if>
<if test="depotHeadId != null">
depot_head_id = #{depotHeadId,jdbcType=BIGINT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.SerialNumber">
update jsh_serial_number
set material_id = #{materialId,jdbcType=BIGINT},
serial_number = #{serialNumber,jdbcType=VARCHAR},
is_sell = #{isSell,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=TIMESTAMP},
updater = #{updater,jdbcType=BIGINT},
depot_head_id = #{depotHeadId,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -11,22 +11,22 @@
</resultMap>
<select id="selectByConditionSerialNumber" resultMap="SerialNumberExBaseResultMap">
select
ser.id, ser.material_Id, ser.serial_Number, ser.is_Sell, ser.remark, ser.delete_Flag, ser.create_Time,
ser.update_Time,mat.name as materialName,null as creator,null as updater,null as creatorName,
null as updaterName,ser.depothead_Id, dh.number as depotHeadNumber,concat(dh.SubType,dh.Type) as depotHeadType
ser.id, ser.material_id, ser.serial_number, ser.is_sell, ser.remark, ser.delete_flag, ser.create_time,
ser.update_time,mat.name as materialName,null as creator,null as updater,null as creatorName,
null as updaterName,ser.depot_head_id, dh.number as depotHeadNumber,concat(dh.SubType,dh.Type) as depotHeadType
FROM jsh_serial_number ser
left join jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_Flag,'0') !='1'
left join jsh_depothead dh on dh.id= ser.depothead_Id and ifnull(dh.delete_Flag,'0') !='1'
left join jsh_depothead dh on dh.id= ser.depot_head_id and ifnull(dh.delete_Flag,'0') !='1'
where 1=1
<if test="serialNumber != null">
<bind name="serialNumber" value="'%' + _parameter.serialNumber + '%'" />
and ser.serial_Number like #{serialNumber}
and ser.serial_number like #{serialNumber}
</if>
<if test="materialName != null">
<bind name="materialName" value="'%' + _parameter.materialName + '%'" />
and mat.name like #{materialName}
</if>
and ifnull(ser.delete_Flag,'0') !='1'
and ifnull(ser.delete_flag,'0') !='1'
order by ser.id desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
@@ -36,7 +36,7 @@
SELECT
COUNT(ser.id)
FROM jsh_serial_number ser
left JOIN jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_Flag,'0') !='1'
left JOIN jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_flag,'0') !='1'
where 1=1
<if test="serialNumber != null">
<bind name="serialNumber" value="'%' + _parameter.serialNumber + '%'" />
@@ -46,71 +46,71 @@
<bind name="materialName" value="'%' + _parameter.materialName + '%'" />
and mat.name like #{materialName}
</if>
and ifnull(ser.delete_Flag,'0') !='1'
and ifnull(ser.delete_flag,'0') !='1'
order by ser.id desc
</select>
<select id="findById" resultMap="SerialNumberExBaseResultMap">
SELECT
ser.id, ser.material_Id, ser.serial_Number, ser.is_Sell, ser.remark, ser.delete_Flag, ser.create_Time,
ser.update_Time,ser.creator,ser.updater,mat.name as materialName,cr.username as creatorName,
ur.username as updaterName,ser.depothead_Id
ser.id, ser.material_id, ser.serial_number, ser.is_sell, ser.remark, ser.delete_flag, ser.create_time,
ser.update_time,ser.creator,ser.updater,mat.name as materialName,cr.username as creatorName,
ur.username as updaterName,ser.depot_head_id
FROM jsh_serial_number ser
left JOIN jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_Flag,'0') !='1'
left join jsh_user cr on ser.creator=cr.id and ifnull(cr.status,'0') not in('1','2')
left join jsh_user ur on ser.updater=ur.id and ifnull(ur.status,'0') not in('1','2')
where 1=1
and ser.id=#{id}
and ifnull(ser.delete_Flag,'0') !='1'
and ifnull(ser.delete_flag,'0') !='1'
order by ser.id desc
</select>
<select id="findBySerialNumber" resultMap="SerialNumberExBaseResultMap">
SELECT
ser.id, ser.material_Id, ser.serial_Number, ser.is_Sell, ser.remark, ser.delete_Flag, ser.create_Time,
ser.update_Time,ser.creator,ser.updater,ser.depothead_Id
ser.id, ser.material_id, ser.serial_number, ser.is_sell, ser.remark, ser.delete_flag, ser.create_time,
ser.update_time,ser.creator,ser.updater,ser.depot_head_id
FROM jsh_serial_number ser
where 1=1
<if test="serialNumber != null">
and ser.serial_Number=#{serialNumber}
and ser.serial_number=#{serialNumber}
</if>
and ifnull(ser.delete_Flag,'0') !='1'
and ifnull(ser.delete_flag,'0') !='1'
order by ser.id desc
</select>
<insert id="addSerialNumber" parameterType="com.jsh.erp.datasource.entities.SerialNumberEx"
useGeneratedKeys="true" keyProperty="id" keyColumn="id">
insert into jsh_serial_number
(material_Id, serial_Number, is_Sell, remark,delete_Flag,
create_Time, creator,update_Time, updater,depothead_Id)
(material_id, serial_number, is_sell, remark,delete_flag,
create_time, creator,update_time, updater,depot_head_id)
values
(#{materialId},#{serialNumber},#{isSell},#{remark},#{deleteFlag},
#{createTime},#{creator},#{updateTime},#{updater},#{depotheadId}
#{createTime},#{creator},#{updateTime},#{updater},#{depotHeadId}
)
</insert>
<update id="updateSerialNumber" parameterType="com.jsh.erp.datasource.entities.SerialNumberEx">
update jsh_serial_number
<set>
<if test="materialId != null">
material_Id = #{materialId,jdbcType=BIGINT},
material_id = #{materialId,jdbcType=BIGINT},
</if>
<if test="serialNumber != null">
serial_Number = #{serialNumber,jdbcType=VARCHAR},
serial_number = #{serialNumber,jdbcType=VARCHAR},
</if>
<if test="isSell != null">
is_Sell = #{isSell,jdbcType=VARCHAR},
is_sell = #{isSell,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_Time = #{updateTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updater != null">
updater = #{updater,jdbcType=BIGINT},
</if>
<if test="depotheadId != null">
depothead_Id = #{depotheadId,jdbcType=BIGINT},
<if test="depotHeadId != null">
depot_head_id = #{depotHeadId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
@@ -124,8 +124,8 @@
<if test="materialId != null">
and ser.material_Id=#{materialId}
</if>
and ifnull(ser.delete_Flag,'0') !='1'
and ser.is_Sell !='1'
and ifnull(ser.delete_flag,'0') !='1'
and ser.is_sell !='1'
</select>
<select id="countSerialNumberByMaterialIdAndDepotheadId" resultType="java.lang.Integer">
SELECT
@@ -133,23 +133,23 @@
FROM jsh_serial_number ser
where 1=1
<if test="materialId != null">
and ser.material_Id=#{materialId}
and ser.material_id=#{materialId}
</if>
<if test="depotheadId != null">
and ser.depothead_Id=#{depotheadId}
<if test="depotHeadId != null">
and ser.depot_head_id=#{depotHeadId}
</if>
and ser.is_Sell =#{isSell,jdbcType=VARCHAR}
and ifnull(ser.delete_Flag,'0') !='1'
and ser.is_sell =#{isSell,jdbcType=VARCHAR}
and ifnull(ser.delete_flag,'0') !='1'
</select>
<update id="sellSerialNumber">
update jsh_serial_number
<set>
is_Sell = '1',
<if test="depotheadId !=null ">
depothead_Id = #{depotheadId},
is_sell = '1',
<if test="depotHeadId !=null ">
depot_head_id = #{depotHeadId},
</if>
<if test="updateTime !=null ">
update_Time = #{updateTime},
update_time = #{updateTime},
</if>
<if test="updater != null">
updater = #{updater},
@@ -157,10 +157,10 @@
</set>
where 1=1
<if test="materialId != null">
and material_Id = #{materialId}
and material_id = #{materialId}
</if>
and is_Sell != '1'
and ifnull(delete_Flag,'0') !='1'
and is_sell != '1'
and ifnull(delete_flag,'0') !='1'
<if test="count != null">
and id in
( select batchSN.id from
@@ -169,8 +169,8 @@
<if test="materialId != null">
and selFrom.material_Id = #{materialId}
</if>
and selFrom.is_Sell != '1'
and ifnull(selFrom.delete_Flag,'0') !='1'
and selFrom.is_sell != '1'
and ifnull(selFrom.delete_flag,'0') !='1'
limit 0,#{count}
) batchSN
)
@@ -180,9 +180,9 @@
<update id="cancelSerialNumber">
update jsh_serial_number
<set>
is_Sell = '0',
is_sell = '0',
<if test="updateTime !=null ">
update_Time = #{updateTime},
update_time = #{updateTime},
</if>
<if test="updater != null">
updater = #{updater},
@@ -190,26 +190,26 @@
</set>
where 1=1
<if test="materialId != null">
and material_Id = #{materialId}
and material_id = #{materialId}
</if>
<if test="depotheadId !=null ">
and depothead_Id = #{depotheadId,jdbcType=BIGINT}
<if test="depotHeadId !=null ">
and depot_head_id = #{depotHeadId,jdbcType=BIGINT}
</if>
and is_Sell != '0'
and ifnull(delete_Flag,'0') !='1'
and is_sell != '0'
and ifnull(delete_flag,'0') !='1'
<if test="count != null">
and id in
( select batchSN.id from
( select selFrom.id from jsh_serial_number selFrom
where 1=1
<if test="materialId != null">
and selFrom.material_Id = #{materialId}
and selFrom.material_id = #{materialId}
</if>
<if test="depotheadId !=null ">
and selFrom.depothead_Id = #{depotheadId,jdbcType=BIGINT}
<if test="depotHeadId !=null ">
and selFrom.depot_head_id = #{depotHeadId,jdbcType=BIGINT}
</if>
and selFrom.is_Sell !='0'
and ifnull(selFrom.delete_Flag,'0') !='1'
and selFrom.is_sell !='0'
and ifnull(selFrom.delete_flag,'0') !='1'
limit 0,#{count}
) batchSN
)
@@ -218,8 +218,8 @@
<insert id="batAddSerialNumber"
useGeneratedKeys="true" keyProperty="id" keyColumn="id">
insert into jsh_serial_number
(material_Id, serial_Number, is_Sell, remark,delete_Flag,
create_Time, creator,update_Time, updater)
(material_id, serial_number, is_sell, remark,delete_flag,
create_time, creator,update_time, updater)
values
<foreach collection='list' item='each' separator=','>
(#{each.materialId},#{each.serialNumber},'0',#{each.remark},'0',
@@ -229,7 +229,7 @@
</insert>
<update id="batchDeleteSerialNumberByIds">
update jsh_serial_number
set update_Time=#{updateTime},updater=#{updater},delete_Flag='1'
set update_time=#{updateTime},updater=#{updater},delete_flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">

View File

@@ -13,7 +13,7 @@
<result column="customer_flag" jdbcType="VARCHAR" property="customerFlag" />
<result column="minus_stock_flag" jdbcType="VARCHAR" property="minusStockFlag" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@@ -75,7 +75,7 @@
</sql>
<sql id="Base_Column_List">
id, company_name, company_contacts, company_address, company_tel, company_fax, company_post_code,
depot_flag, customer_flag, minus_stock_flag, tenant_id, delete_Flag
depot_flag, customer_flag, minus_stock_flag, tenant_id, delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultMap="BaseResultMap">
select
@@ -83,7 +83,7 @@
distinct
</if>
<include refid="Base_Column_List" />
from jsh_systemconfig
from jsh_system_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
@@ -94,24 +94,24 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jsh_systemconfig
from jsh_system_config
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_systemconfig
delete from jsh_system_config
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample">
delete from jsh_systemconfig
delete from jsh_system_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
insert into jsh_systemconfig (id, company_name, company_contacts,
insert into jsh_system_config (id, company_name, company_contacts,
company_address, company_tel, company_fax,
company_post_code, depot_flag, customer_flag,
minus_stock_flag, tenant_id, delete_Flag
minus_stock_flag, tenant_id, delete_flag
)
values (#{id,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{companyContacts,jdbcType=VARCHAR},
#{companyAddress,jdbcType=VARCHAR}, #{companyTel,jdbcType=VARCHAR}, #{companyFax,jdbcType=VARCHAR},
@@ -120,7 +120,7 @@
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
insert into jsh_systemconfig
insert into jsh_system_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
@@ -156,7 +156,7 @@
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -199,13 +199,13 @@
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultType="java.lang.Long">
select count(*) from jsh_systemconfig
select count(*) from jsh_system_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update jsh_systemconfig
update jsh_system_config
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
@@ -241,7 +241,7 @@
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
@@ -249,7 +249,7 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
update jsh_systemconfig
update jsh_system_config
set id = #{record.id,jdbcType=BIGINT},
company_name = #{record.companyName,jdbcType=VARCHAR},
company_contacts = #{record.companyContacts,jdbcType=VARCHAR},
@@ -261,13 +261,13 @@
customer_flag = #{record.customerFlag,jdbcType=VARCHAR},
minus_stock_flag = #{record.minusStockFlag,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
update jsh_systemconfig
update jsh_system_config
<set>
<if test="companyName != null">
company_name = #{companyName,jdbcType=VARCHAR},
@@ -300,13 +300,13 @@
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
update jsh_systemconfig
update jsh_system_config
set company_name = #{companyName,jdbcType=VARCHAR},
company_contacts = #{companyContacts,jdbcType=VARCHAR},
company_address = #{companyAddress,jdbcType=VARCHAR},
@@ -317,7 +317,7 @@
customer_flag = #{customerFlag,jdbcType=VARCHAR},
minus_stock_flag = #{minusStockFlag,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -3,12 +3,12 @@
<mapper namespace="com.jsh.erp.datasource.mappers.SystemConfigMapperEx">
<select id="selectByConditionSystemConfig" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultMap="com.jsh.erp.datasource.mappers.SystemConfigMapper.BaseResultMap">
select *
FROM jsh_systemconfig
FROM jsh_system_config
where 1=1
<if test="companyName != null">
and company_name like '%${companyName}%'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
@@ -16,16 +16,16 @@
<select id="countsBySystemConfig" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_systemconfig
FROM jsh_system_config
WHERE 1=1
<if test="companyName != null">
and company_name like '%${companyName}%'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
</select>
<update id="batchDeleteSystemConfigByIds">
update jsh_systemconfig
set delete_Flag='1'
update jsh_system_config
set delete_flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">

View File

@@ -3,12 +3,12 @@
<mapper namespace="com.jsh.erp.datasource.mappers.UnitMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Unit">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="UName" jdbcType="VARCHAR" property="uname" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="basic_unit" jdbcType="VARCHAR" property="basicUnit" />
<result column="other_unit" jdbcType="VARCHAR" property="otherUnit" />
<result column="ratio" jdbcType="INTEGER" property="ratio" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@@ -69,7 +69,7 @@
</where>
</sql>
<sql id="Base_Column_List">
id, UName, basic_unit, other_unit, ratio, tenant_id, delete_Flag
id, name, basic_unit, other_unit, ratio, tenant_id, delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultMap="BaseResultMap">
select
@@ -102,10 +102,10 @@
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Unit">
insert into jsh_unit (id, UName, basic_unit,
insert into jsh_unit (id, name, basic_unit,
other_unit, ratio, tenant_id,
delete_Flag)
values (#{id,jdbcType=BIGINT}, #{uname,jdbcType=VARCHAR}, #{basicUnit,jdbcType=VARCHAR},
delete_flag)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{basicUnit,jdbcType=VARCHAR},
#{otherUnit,jdbcType=VARCHAR}, #{ratio,jdbcType=INTEGER}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR})
</insert>
@@ -115,8 +115,8 @@
<if test="id != null">
id,
</if>
<if test="uname != null">
UName,
<if test="name != null">
name,
</if>
<if test="basicUnit != null">
basic_unit,
@@ -131,15 +131,15 @@
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="uname != null">
#{uname,jdbcType=VARCHAR},
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="basicUnit != null">
#{basicUnit,jdbcType=VARCHAR},
@@ -170,8 +170,8 @@
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.uname != null">
UName = #{record.uname,jdbcType=VARCHAR},
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.basicUnit != null">
basic_unit = #{record.basicUnit,jdbcType=VARCHAR},
@@ -186,7 +186,7 @@
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
@@ -196,12 +196,12 @@
<update id="updateByExample" parameterType="map">
update jsh_unit
set id = #{record.id,jdbcType=BIGINT},
UName = #{record.uname,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
basic_unit = #{record.basicUnit,jdbcType=VARCHAR},
other_unit = #{record.otherUnit,jdbcType=VARCHAR},
ratio = #{record.ratio,jdbcType=INTEGER},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@@ -209,8 +209,8 @@
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Unit">
update jsh_unit
<set>
<if test="uname != null">
UName = #{uname,jdbcType=VARCHAR},
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="basicUnit != null">
basic_unit = #{basicUnit,jdbcType=VARCHAR},
@@ -225,19 +225,19 @@
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Unit">
update jsh_unit
set UName = #{uname,jdbcType=VARCHAR},
set name = #{name,jdbcType=VARCHAR},
basic_unit = #{basicUnit,jdbcType=VARCHAR},
other_unit = #{otherUnit,jdbcType=VARCHAR},
ratio = #{ratio,jdbcType=INTEGER},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -6,9 +6,9 @@
FROM jsh_unit
where 1=1
<if test="name != null">
and UName like '%${name}%'
and name like '%${name}%'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
@@ -19,13 +19,13 @@
FROM jsh_unit
WHERE 1=1
<if test="name != null">
and UName like '%${name}%'
and name like '%${name}%'
</if>
and ifnull(delete_Flag,'0') !='1'
and ifnull(delete_flag,'0') !='1'
</select>
<update id="batchDeleteUnitByIds">
update jsh_unit
set delete_Flag='1'
set delete_flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">

View File

@@ -1,288 +1,228 @@
<?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.jsh.erp.datasource.mappers.UserBusinessMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="KeyId" jdbcType="VARCHAR" property="keyid" />
<result column="Value" jdbcType="VARCHAR" property="value" />
<result column="BtnStr" jdbcType="VARCHAR" property="btnstr" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, KeyId, Value, BtnStr, delete_Flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_userbusiness
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_userbusiness
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_userbusiness
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_userbusiness
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_userbusiness (Id, Type, KeyId,
Value, BtnStr, delete_Flag
)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{keyid,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{btnstr,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_userbusiness
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="type != null">
Type,
</if>
<if test="keyid != null">
KeyId,
</if>
<if test="value != null">
Value,
</if>
<if test="btnstr != null">
BtnStr,
</if>
<if test="deleteFlag != null">
delete_Flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="keyid != null">
#{keyid,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="btnstr != null">
#{btnstr,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_userbusiness
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.keyid != null">
KeyId = #{record.keyid,jdbcType=VARCHAR},
</if>
<if test="record.value != null">
Value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.btnstr != null">
BtnStr = #{record.btnstr,jdbcType=VARCHAR},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
set Id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR},
KeyId = #{record.keyid,jdbcType=VARCHAR},
Value = #{record.value,jdbcType=VARCHAR},
BtnStr = #{record.btnstr,jdbcType=VARCHAR},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
<set>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="keyid != null">
KeyId = #{keyid,jdbcType=VARCHAR},
</if>
<if test="value != null">
Value = #{value,jdbcType=VARCHAR},
</if>
<if test="btnstr != null">
BtnStr = #{btnstr,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
set Type = #{type,jdbcType=VARCHAR},
KeyId = #{keyid,jdbcType=VARCHAR},
Value = #{value,jdbcType=VARCHAR},
BtnStr = #{btnstr,jdbcType=VARCHAR},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
<mapper namespace="com.jsh.erp.datasource.mappers.UserBusinessMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.UserBusiness">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="key_id" jdbcType="VARCHAR" property="keyId" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="btn_str" jdbcType="VARCHAR" property="btnStr" />
<result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
</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">
id, type, key_id, value, btn_str, delete_flag
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_user_business
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jsh_user_business
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_user_business
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample">
delete from jsh_user_business
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
insert into jsh_user_business (id, type, key_id,
value, btn_str, delete_flag
)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{keyId,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{btnStr,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
insert into jsh_user_business
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="keyId != null">
key_id,
</if>
<if test="value != null">
value,
</if>
<if test="btnStr != null">
btn_str,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="keyId != null">
#{keyId,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="btnStr != null">
#{btnStr,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultType="java.lang.Long">
select count(*) from jsh_user_business
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update jsh_user_business
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.keyId != null">
key_id = #{record.keyId,jdbcType=VARCHAR},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.btnStr != null">
btn_str = #{record.btnStr,jdbcType=VARCHAR},
</if>
<if test="record.deleteFlag != null">
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update jsh_user_business
set id = #{record.id,jdbcType=BIGINT},
type = #{record.type,jdbcType=VARCHAR},
key_id = #{record.keyId,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
btn_str = #{record.btnStr,jdbcType=VARCHAR},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
update jsh_user_business
<set>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="keyId != null">
key_id = #{keyId,jdbcType=VARCHAR},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="btnStr != null">
btn_str = #{btnStr,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
update jsh_user_business
set type = #{type,jdbcType=VARCHAR},
key_id = #{keyId,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
btn_str = #{btnStr,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -2,8 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.UserBusinessMapperEx">
<update id="batchDeleteUserBusinessByIds">
update jsh_serial_number
set delete_Flag='1'
update jsh_user_business
set delete_flag='1'
where 1=1
and id in (
<foreach collection="ids" item="id" separator=",">