Commit 70f0dae4 authored by 季圣华's avatar 季圣华
Browse files

优化表结构

parent 13932441
<?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" />
<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" />
<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">
......@@ -53,10 +45,6 @@
</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">
......@@ -86,23 +74,16 @@
</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
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.FunctionsExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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_functions
from jsh_function
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -111,89 +92,69 @@
</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}
from jsh_function
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 from jsh_function
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
<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.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)
<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},
#{pnumber,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{state,jdbcType=BIT}, #{sort,jdbcType=VARCHAR},
#{enabled,jdbcType=BIT}, #{type,jdbcType=VARCHAR}, #{pushbtn,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.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_functions
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Function">
insert into jsh_function
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
id,
</if>
<if test="number != null">
Number,
number,
</if>
<if test="name != null">
Name,
name,
</if>
<if test="pnumber != null">
PNumber,
<if test="parentNumber != null">
parent_number,
</if>
<if test="url != null">
URL,
url,
</if>
<if test="state != null">
State,
state,
</if>
<if test="sort != null">
Sort,
sort,
</if>
<if test="enabled != null">
Enabled,
enabled,
</if>
<if test="type != null">
Type,
type,
</if>
<if test="pushbtn != null">
PushBtn,
<if test="pushBtn != null">
push_btn,
</if>
<if test="icon != null">
icon,
</if>
<if test="deleteFlag != null">
delete_Flag,
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -206,8 +167,8 @@
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="pnumber != null">
#{pnumber,jdbcType=VARCHAR},
<if test="parentNumber != null">
#{parentNumber,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
......@@ -224,8 +185,8 @@
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="pushbtn != null">
#{pushbtn,jdbcType=VARCHAR},
<if test="pushBtn != null">
#{pushBtn,jdbcType=VARCHAR},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
......@@ -235,58 +196,50 @@
</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
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
update jsh_function
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.number != null">
Number = #{record.number,jdbcType=VARCHAR},
number = #{record.number,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.pnumber != null">
PNumber = #{record.pnumber,jdbcType=VARCHAR},
<if test="record.parentNumber != null">
parent_number = #{record.parentNumber,jdbcType=VARCHAR},
</if>
<if test="record.url != null">
URL = #{record.url,jdbcType=VARCHAR},
url = #{record.url,jdbcType=VARCHAR},
</if>
<if test="record.state != null">
State = #{record.state,jdbcType=BIT},
state = #{record.state,jdbcType=BIT},
</if>
<if test="record.sort != null">
Sort = #{record.sort,jdbcType=VARCHAR},
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
Enabled = #{record.enabled,jdbcType=BIT},
enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.pushbtn != null">
PushBtn = #{record.pushbtn,jdbcType=VARCHAR},
<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},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
......@@ -294,87 +247,75 @@
</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},
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}
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
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Function">
update jsh_function
<set>
<if test="number != null">
Number = #{number,jdbcType=VARCHAR},
number = #{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
</if>
<if test="pnumber != null">
PNumber = #{pnumber,jdbcType=VARCHAR},
<if test="parentNumber != null">
parent_number = #{parentNumber,jdbcType=VARCHAR},
</if>
<if test="url != null">
URL = #{url,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
</if>
<if test="state != null">
State = #{state,jdbcType=BIT},
state = #{state,jdbcType=BIT},
</if>
<if test="sort != null">
Sort = #{sort,jdbcType=VARCHAR},
sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
Enabled = #{enabled,jdbcType=BIT},
enabled = #{enabled,jdbcType=BIT},
</if>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
</if>
<if test="pushbtn != null">
PushBtn = #{pushbtn,jdbcType=VARCHAR},
<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},
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
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},
<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}
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?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=",">
......
......@@ -2,22 +2,14 @@
<!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" />
<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" />
<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">
......@@ -47,10 +39,6 @@
</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">
......@@ -80,23 +68,15 @@
</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
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
from jsh_in_out_item
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -105,69 +85,49 @@
</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}
from jsh_in_out_item
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 from jsh_in_out_item
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
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">
<!--
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
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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_inoutitem
insert into jsh_in_out_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
id,
</if>
<if test="name != null">
Name,
name,
</if>
<if test="type != null">
Type,
type,
</if>
<if test="remark != null">
Remark,
remark,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -191,40 +151,32 @@
</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
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
update jsh_in_out_item
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
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},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
......@@ -232,57 +184,45 @@
</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},
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}
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
update jsh_in_out_item
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
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}
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},
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}
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of 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=",">
......
......@@ -2,25 +2,16 @@
<!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="user_id" 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="client_ip" jdbcType="VARCHAR" property="clientIp" />
<result column="create_time" 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="content" jdbcType="VARCHAR" property="content" />
<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">
......@@ -50,10 +41,6 @@
</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">
......@@ -83,17 +70,9 @@
</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
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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
......@@ -108,77 +87,52 @@
</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 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">
<!--
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 test="userId != null">
user_id,
</if>
<if test="operation != null">
operation,
</if>
<if test="clientip != null">
clientIP,
<if test="clientIp != null">
client_ip,
</if>
<if test="createtime != null">
createtime,
<if test="createTime != null">
create_time,
</if>
<if test="status != null">
status,
</if>
<if test="contentdetails != null">
contentdetails,
</if>
<if test="remark != null">
remark,
<if test="content != null">
content,
</if>
<if test="tenantId != null">
tenant_id,
......@@ -188,72 +142,58 @@
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="userid != null">
#{userid,jdbcType=BIGINT},
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="operation != null">
#{operation,jdbcType=VARCHAR},
</if>
<if test="clientip != null">
#{clientip,jdbcType=VARCHAR},
<if test="clientIp != null">
#{clientIp,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
<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 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.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<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">
<!--
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 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">
clientIP = #{record.clientip,jdbcType=VARCHAR},
<if test="record.clientIp != null">
client_ip = #{record.clientIp,jdbcType=VARCHAR},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
<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.contentdetails != null">
contentdetails = #{record.contentdetails,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
<if test="record.content != null">
content = #{record.content,jdbcType=VARCHAR},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
......@@ -264,51 +204,39 @@
</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},
user_id = #{record.userId,jdbcType=BIGINT},
operation = #{record.operation,jdbcType=VARCHAR},
clientIP = #{record.clientip,jdbcType=VARCHAR},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
client_ip = #{record.clientIp,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
status = #{record.status,jdbcType=TINYINT},
contentdetails = #{record.contentdetails,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
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">
<!--
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 test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="operation != null">
operation = #{operation,jdbcType=VARCHAR},
</if>
<if test="clientip != null">
clientIP = #{clientip,jdbcType=VARCHAR},
<if test="clientIp != null">
client_ip = #{clientIp,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
<if test="createTime != null">
create_time = #{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 test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
......@@ -317,18 +245,13 @@
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},
set user_id = #{userId,jdbcType=BIGINT},
operation = #{operation,jdbcType=VARCHAR},
clientIP = #{clientip,jdbcType=VARCHAR},
createtime = #{createtime,jdbcType=TIMESTAMP},
client_ip = #{clientIp,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=TINYINT},
contentdetails = #{contentdetails,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
......
......@@ -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>
\ No newline at end of file
......@@ -2,14 +2,10 @@
<!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" />
<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" />
......@@ -21,10 +17,6 @@
<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">
......@@ -54,10 +46,6 @@
</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">
......@@ -87,24 +75,16 @@
</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,
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">
<!--
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
from jsh_material_category
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -113,67 +93,47 @@
</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}
from jsh_material_category
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 from jsh_material_category
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
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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialcategory (Id, Name, CategoryLevel,
ParentId, sort, status,
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},
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
insert into jsh_material_category
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
id,
</if>
<if test="name != null">
Name,
name,
</if>
<if test="categorylevel != null">
CategoryLevel,
<if test="categoryLevel != null">
category_level,
</if>
<if test="parentid != null">
ParentId,
<if test="parentId != null">
parent_id,
</if>
<if test="sort != null">
sort,
......@@ -210,11 +170,11 @@
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="categorylevel != null">
#{categorylevel,jdbcType=SMALLINT},
<if test="categoryLevel != null">
#{categoryLevel,jdbcType=SMALLINT},
</if>
<if test="parentid != null">
#{parentid,jdbcType=BIGINT},
<if test="parentId != null">
#{parentId,jdbcType=BIGINT},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
......@@ -245,34 +205,26 @@
</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
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
update jsh_material_category
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.categorylevel != null">
CategoryLevel = #{record.categorylevel,jdbcType=SMALLINT},
<if test="record.categoryLevel != null">
category_level = #{record.categoryLevel,jdbcType=SMALLINT},
</if>
<if test="record.parentid != null">
ParentId = #{record.parentid,jdbcType=BIGINT},
<if test="record.parentId != null">
parent_id = #{record.parentId,jdbcType=BIGINT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=VARCHAR},
......@@ -307,15 +259,11 @@
</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},
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},
......@@ -330,20 +278,16 @@
</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
update jsh_material_category
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
</if>
<if test="categorylevel != null">
CategoryLevel = #{categorylevel,jdbcType=SMALLINT},
<if test="categoryLevel != null">
category_level = #{categoryLevel,jdbcType=SMALLINT},
</if>
<if test="parentid != null">
ParentId = #{parentid,jdbcType=BIGINT},
<if test="parentId != null">
parent_id = #{parentId,jdbcType=BIGINT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=VARCHAR},
......@@ -373,17 +317,13 @@
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
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},
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},
......@@ -393,6 +333,6 @@
update_time = #{updateTime,jdbcType=TIMESTAMP},
updater = #{updater,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT}
where Id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of 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>
......
......@@ -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}
......
......@@ -2,22 +2,14 @@
<!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="native_name" 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" />
<result column="another_name" 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">
......@@ -47,10 +39,6 @@
</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">
......@@ -80,23 +68,15 @@
</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
id, native_name, enabled, sort, another_name, 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
from jsh_material_property
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
......@@ -105,57 +85,37 @@
</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
from jsh_material_property
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
delete from jsh_material_property
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
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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialproperty (id, nativeName, enabled,
sort, anotherName, delete_Flag
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}
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
insert into jsh_material_property
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="nativename != null">
nativeName,
<if test="nativeName != null">
native_name,
</if>
<if test="enabled != null">
enabled,
......@@ -163,19 +123,19 @@
<if test="sort != null">
sort,
</if>
<if test="anothername != null">
anotherName,
<if test="anotherName != null">
another_name,
</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="nativename != null">
#{nativename,jdbcType=VARCHAR},
<if test="nativeName != null">
#{nativeName,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
......@@ -183,36 +143,28 @@
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="anothername != null">
#{anothername,jdbcType=VARCHAR},
<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
<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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
update jsh_material_property
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.nativename != null">
nativeName = #{record.nativename,jdbcType=VARCHAR},
<if test="record.nativeName != null">
native_name = #{record.nativeName,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
enabled = #{record.enabled,jdbcType=BIT},
......@@ -220,11 +172,11 @@
<if test="record.sort != null">
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.anothername != null">
anotherName = #{record.anothername,jdbcType=VARCHAR},
<if test="record.anotherName != null">
another_name = #{record.anotherName,jdbcType=VARCHAR},
</if>
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
......@@ -232,30 +184,22 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
update jsh_material_property
set id = #{record.id,jdbcType=BIGINT},
nativeName = #{record.nativename,jdbcType=VARCHAR},
native_name = #{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}
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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
update jsh_material_property
<set>
<if test="nativename != null">
nativeName = #{nativename,jdbcType=VARCHAR},
<if test="nativeName != null">
native_name = #{nativeName,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
......@@ -263,26 +207,22 @@
<if test="sort != null">
sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="anothername != null">
anotherName = #{anothername,jdbcType=VARCHAR},
<if test="anotherName != null">
another_name = #{anotherName,jdbcType=VARCHAR},
</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.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
set nativeName = #{nativename,jdbcType=VARCHAR},
update jsh_material_property
set native_name = #{nativeName,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
sort = #{sort,jdbcType=VARCHAR},
anotherName = #{anothername,jdbcType=VARCHAR},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
another_name = #{anotherName,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of 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=",">
......
......@@ -2,21 +2,13 @@
<!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" />
<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" />
<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">
......@@ -46,10 +38,6 @@
</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">
......@@ -79,17 +67,9 @@
</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
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
......@@ -104,64 +84,44 @@
</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}
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}
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)
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,
id,
</if>
<if test="type != null">
Type,
type,
</if>
<if test="name != null">
Name,
name,
</if>
<if test="tenantId != null">
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -182,37 +142,29 @@
</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 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">
<!--
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},
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
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},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
......@@ -220,52 +172,40 @@
</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},
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}
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},
type = #{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
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}
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},
set type = #{type,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of 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=",">
......
......@@ -2,23 +2,15 @@
<!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" />
<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" />
<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">
......@@ -48,10 +40,6 @@
</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">
......@@ -81,17 +69,9 @@
</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
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
......@@ -106,57 +86,37 @@
</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}
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}
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,
insert into jsh_role (id, name, type,
value, description, tenant_id,
delete_Flag)
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,
id,
</if>
<if test="name != null">
Name,
name,
</if>
<if test="type != null">
type,
......@@ -171,7 +131,7 @@
tenant_id,
</if>
<if test="deleteFlag != null">
delete_Flag,
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -198,28 +158,20 @@
</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 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">
<!--
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},
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
......@@ -234,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">
......@@ -242,31 +194,23 @@
</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},
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}
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},
name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
......@@ -281,23 +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}
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},
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}
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of 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=",">
......
......@@ -2,28 +2,20 @@
<!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="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="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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="updater" jdbcType="BIGINT" property="updater" />
<result column="depothead_Id" jdbcType="BIGINT" property="depotheadId" />
<result column="depot_head_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">
......@@ -53,10 +45,6 @@
</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">
......@@ -86,18 +74,10 @@
</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
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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
......@@ -112,88 +92,68 @@
</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
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}
#{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,
material_id,
</if>
<if test="serialNumber != null">
serial_Number,
serial_number,
</if>
<if test="isSell != null">
is_Sell,
is_sell,
</if>
<if test="remark != null">
remark,
</if>
<if test="deleteFlag != null">
delete_Flag,
delete_flag,
</if>
<if test="createTime != null">
create_Time,
create_time,
</if>
<if test="creator != null">
creator,
</if>
<if test="updateTime != null">
update_Time,
update_time,
</if>
<if test="updater != null">
updater,
</if>
<if test="depotheadId != null">
depothead_Id,
<if test="depotHeadId != null">
depot_head_id,
</if>
<if test="tenantId != null">
tenant_id,
......@@ -230,63 +190,55 @@
<if test="updater != null">
#{updater,jdbcType=BIGINT},
</if>
<if test="depotheadId != null">
#{depotheadId,jdbcType=BIGINT},
<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 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">
<!--
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},
material_id = #{record.materialId,jdbcType=BIGINT},
</if>
<if test="record.serialNumber != null">
serial_Number = #{record.serialNumber,jdbcType=VARCHAR},
serial_number = #{record.serialNumber,jdbcType=VARCHAR},
</if>
<if test="record.isSell != null">
is_Sell = #{record.isSell,jdbcType=VARCHAR},
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},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_Time = #{record.createTime,jdbcType=TIMESTAMP},
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},
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 test="record.depotHeadId != null">
depot_head_id = #{record.depotHeadId,jdbcType=BIGINT},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
......@@ -297,63 +249,55 @@
</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},
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},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
update_Time = #{record.updateTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
updater = #{record.updater,jdbcType=BIGINT},
depothead_Id = #{record.depotheadId,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">
<!--
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},
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="createTime != null">
create_Time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
creator = #{creator,jdbcType=BIGINT},
</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>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
......@@ -362,21 +306,17 @@
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},
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},
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
update_Time = #{updateTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
updater = #{updater,jdbcType=BIGINT},
depothead_Id = #{depotheadId,jdbcType=BIGINT},
depot_head_id = #{depotHeadId,jdbcType=BIGINT},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
......
......@@ -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=",">
......
......@@ -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>
\ No newline at end of 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=",">
......
......@@ -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>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment