"jshERP-web/vscode:/vscode.git/clone" did not exist on "d6ce65700a7404a866abbcbb2513de963b0757ef"
Commit 70f0dae4 authored by 季圣华's avatar 季圣华
Browse files

优化表结构

parent 13932441
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
FROM jsh_unit FROM jsh_unit
where 1=1 where 1=1
<if test="name != null"> <if test="name != null">
and UName like '%${name}%' and name like '%${name}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
FROM jsh_unit FROM jsh_unit
WHERE 1=1 WHERE 1=1
<if test="name != null"> <if test="name != null">
and UName like '%${name}%' and name like '%${name}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<update id="batchDeleteUnitByIds"> <update id="batchDeleteUnitByIds">
update jsh_unit update jsh_unit
set delete_Flag='1' set delete_flag='1'
where 1=1 where 1=1
and id in ( and id in (
<foreach collection="ids" item="id" separator=","> <foreach collection="ids" item="id" separator=",">
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.UserBusinessMapper"> <mapper namespace="com.jsh.erp.datasource.mappers.UserBusinessMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.UserBusiness"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.UserBusiness">
<!-- <id column="id" jdbcType="BIGINT" property="id" />
WARNING - @mbggenerated <result column="type" jdbcType="VARCHAR" property="type" />
This element is automatically generated by MyBatis Generator, do not modify. <result column="key_id" jdbcType="VARCHAR" property="keyId" />
--> <result column="value" jdbcType="VARCHAR" property="value" />
<id column="Id" jdbcType="BIGINT" property="id" /> <result column="btn_str" jdbcType="VARCHAR" property="btnStr" />
<result column="Type" jdbcType="VARCHAR" property="type" /> <result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
<result column="KeyId" jdbcType="VARCHAR" property="keyid" /> </resultMap>
<result column="Value" jdbcType="VARCHAR" property="value" /> <sql id="Example_Where_Clause">
<result column="BtnStr" jdbcType="VARCHAR" property="btnstr" /> <where>
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" /> <foreach collection="oredCriteria" item="criteria" separator="or">
</resultMap> <if test="criteria.valid">
<sql id="Example_Where_Clause"> <trim prefix="(" prefixOverrides="and" suffix=")">
<!-- <foreach collection="criteria.criteria" item="criterion">
WARNING - @mbggenerated <choose>
This element is automatically generated by MyBatis Generator, do not modify. <when test="criterion.noValue">
--> and ${criterion.condition}
<where> </when>
<foreach collection="oredCriteria" item="criteria" separator="or"> <when test="criterion.singleValue">
<if test="criteria.valid"> and ${criterion.condition} #{criterion.value}
<trim prefix="(" prefixOverrides="and" suffix=")"> </when>
<foreach collection="criteria.criteria" item="criterion"> <when test="criterion.betweenValue">
<choose> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
<when test="criterion.noValue"> </when>
and ${criterion.condition} <when test="criterion.listValue">
</when> and ${criterion.condition}
<when test="criterion.singleValue"> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
and ${criterion.condition} #{criterion.value} #{listItem}
</when> </foreach>
<when test="criterion.betweenValue"> </when>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </choose>
</when> </foreach>
<when test="criterion.listValue"> </trim>
and ${criterion.condition} </if>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> </foreach>
#{listItem} </where>
</foreach> </sql>
</when> <sql id="Update_By_Example_Where_Clause">
</choose> <where>
</foreach> <foreach collection="example.oredCriteria" item="criteria" separator="or">
</trim> <if test="criteria.valid">
</if> <trim prefix="(" prefixOverrides="and" suffix=")">
</foreach> <foreach collection="criteria.criteria" item="criterion">
</where> <choose>
</sql> <when test="criterion.noValue">
<sql id="Update_By_Example_Where_Clause"> and ${criterion.condition}
<!-- </when>
WARNING - @mbggenerated <when test="criterion.singleValue">
This element is automatically generated by MyBatis Generator, do not modify. and ${criterion.condition} #{criterion.value}
--> </when>
<where> <when test="criterion.betweenValue">
<foreach collection="example.oredCriteria" item="criteria" separator="or"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
<if test="criteria.valid"> </when>
<trim prefix="(" prefixOverrides="and" suffix=")"> <when test="criterion.listValue">
<foreach collection="criteria.criteria" item="criterion"> and ${criterion.condition}
<choose> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
<when test="criterion.noValue"> #{listItem}
and ${criterion.condition} </foreach>
</when> </when>
<when test="criterion.singleValue"> </choose>
and ${criterion.condition} #{criterion.value} </foreach>
</when> </trim>
<when test="criterion.betweenValue"> </if>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </foreach>
</when> </where>
<when test="criterion.listValue"> </sql>
and ${criterion.condition} <sql id="Base_Column_List">
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> id, type, key_id, value, btn_str, delete_flag
#{listItem} </sql>
</foreach> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultMap="BaseResultMap">
</when> select
</choose> <if test="distinct">
</foreach> distinct
</trim> </if>
</if> <include refid="Base_Column_List" />
</foreach> from jsh_user_business
</where> <if test="_parameter != null">
</sql> <include refid="Example_Where_Clause" />
<sql id="Base_Column_List"> </if>
<!-- <if test="orderByClause != null">
WARNING - @mbggenerated order by ${orderByClause}
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> </select>
Id, Type, KeyId, Value, BtnStr, delete_Flag <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
</sql> select
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultMap="BaseResultMap"> <include refid="Base_Column_List" />
<!-- from jsh_user_business
WARNING - @mbggenerated where id = #{id,jdbcType=BIGINT}
This element is automatically generated by MyBatis Generator, do not modify. </select>
--> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
select delete from jsh_user_business
<if test="distinct"> where id = #{id,jdbcType=BIGINT}
distinct </delete>
</if> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample">
<include refid="Base_Column_List" /> delete from jsh_user_business
from jsh_userbusiness <if test="_parameter != null">
<if test="_parameter != null"> <include refid="Example_Where_Clause" />
<include refid="Example_Where_Clause" /> </if>
</if> </delete>
<if test="orderByClause != null"> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
order by ${orderByClause} insert into jsh_user_business (id, type, key_id,
</if> value, btn_str, delete_flag
</select> )
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{keyId,jdbcType=VARCHAR},
<!-- #{value,jdbcType=VARCHAR}, #{btnStr,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}
WARNING - @mbggenerated )
This element is automatically generated by MyBatis Generator, do not modify. </insert>
--> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
select insert into jsh_user_business
<include refid="Base_Column_List" /> <trim prefix="(" suffix=")" suffixOverrides=",">
from jsh_userbusiness <if test="id != null">
where Id = #{id,jdbcType=BIGINT} id,
</select> </if>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <if test="type != null">
<!-- type,
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. <if test="keyId != null">
--> key_id,
delete from jsh_userbusiness </if>
where Id = #{id,jdbcType=BIGINT} <if test="value != null">
</delete> value,
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample"> </if>
<!-- <if test="btnStr != null">
WARNING - @mbggenerated btn_str,
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> <if test="deleteFlag != null">
delete from jsh_userbusiness delete_flag,
<if test="_parameter != null"> </if>
<include refid="Example_Where_Clause" /> </trim>
</if> <trim prefix="values (" suffix=")" suffixOverrides=",">
</delete> <if test="id != null">
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.UserBusiness"> #{id,jdbcType=BIGINT},
<!-- </if>
WARNING - @mbggenerated <if test="type != null">
This element is automatically generated by MyBatis Generator, do not modify. #{type,jdbcType=VARCHAR},
--> </if>
insert into jsh_userbusiness (Id, Type, KeyId, <if test="keyId != null">
Value, BtnStr, delete_Flag #{keyId,jdbcType=VARCHAR},
) </if>
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{keyid,jdbcType=VARCHAR}, <if test="value != null">
#{value,jdbcType=VARCHAR}, #{btnstr,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR} #{value,jdbcType=VARCHAR},
) </if>
</insert> <if test="btnStr != null">
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness"> #{btnStr,jdbcType=VARCHAR},
<!-- </if>
WARNING - @mbggenerated <if test="deleteFlag != null">
This element is automatically generated by MyBatis Generator, do not modify. #{deleteFlag,jdbcType=VARCHAR},
--> </if>
insert into jsh_userbusiness </trim>
<trim prefix="(" suffix=")" suffixOverrides=","> </insert>
<if test="id != null"> <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultType="java.lang.Long">
Id, select count(*) from jsh_user_business
</if> <if test="_parameter != null">
<if test="type != null"> <include refid="Example_Where_Clause" />
Type, </if>
</if> </select>
<if test="keyid != null"> <update id="updateByExampleSelective" parameterType="map">
KeyId, update jsh_user_business
</if> <set>
<if test="value != null"> <if test="record.id != null">
Value, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="btnstr != null"> <if test="record.type != null">
BtnStr, type = #{record.type,jdbcType=VARCHAR},
</if> </if>
<if test="deleteFlag != null"> <if test="record.keyId != null">
delete_Flag, key_id = #{record.keyId,jdbcType=VARCHAR},
</if> </if>
</trim> <if test="record.value != null">
<trim prefix="values (" suffix=")" suffixOverrides=","> value = #{record.value,jdbcType=VARCHAR},
<if test="id != null"> </if>
#{id,jdbcType=BIGINT}, <if test="record.btnStr != null">
</if> btn_str = #{record.btnStr,jdbcType=VARCHAR},
<if test="type != null"> </if>
#{type,jdbcType=VARCHAR}, <if test="record.deleteFlag != null">
</if> delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
<if test="keyid != null"> </if>
#{keyid,jdbcType=VARCHAR}, </set>
</if> <if test="_parameter != null">
<if test="value != null"> <include refid="Update_By_Example_Where_Clause" />
#{value,jdbcType=VARCHAR}, </if>
</if> </update>
<if test="btnstr != null"> <update id="updateByExample" parameterType="map">
#{btnstr,jdbcType=VARCHAR}, update jsh_user_business
</if> set id = #{record.id,jdbcType=BIGINT},
<if test="deleteFlag != null"> type = #{record.type,jdbcType=VARCHAR},
#{deleteFlag,jdbcType=VARCHAR}, key_id = #{record.keyId,jdbcType=VARCHAR},
</if> value = #{record.value,jdbcType=VARCHAR},
</trim> btn_str = #{record.btnStr,jdbcType=VARCHAR},
</insert> delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultType="java.lang.Integer"> <if test="_parameter != null">
<!-- <include refid="Update_By_Example_Where_Clause" />
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. </update>
--> <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
select count(*) from jsh_userbusiness update jsh_user_business
<if test="_parameter != null"> <set>
<include refid="Example_Where_Clause" /> <if test="type != null">
</if> type = #{type,jdbcType=VARCHAR},
</select> </if>
<update id="updateByExampleSelective" parameterType="map"> <if test="keyId != null">
<!-- key_id = #{keyId,jdbcType=VARCHAR},
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. <if test="value != null">
--> value = #{value,jdbcType=VARCHAR},
update jsh_userbusiness </if>
<set> <if test="btnStr != null">
<if test="record.id != null"> btn_str = #{btnStr,jdbcType=VARCHAR},
Id = #{record.id,jdbcType=BIGINT}, </if>
</if> <if test="deleteFlag != null">
<if test="record.type != null"> delete_flag = #{deleteFlag,jdbcType=VARCHAR},
Type = #{record.type,jdbcType=VARCHAR}, </if>
</if> </set>
<if test="record.keyid != null"> where id = #{id,jdbcType=BIGINT}
KeyId = #{record.keyid,jdbcType=VARCHAR}, </update>
</if> <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<if test="record.value != null"> update jsh_user_business
Value = #{record.value,jdbcType=VARCHAR}, set type = #{type,jdbcType=VARCHAR},
</if> key_id = #{keyId,jdbcType=VARCHAR},
<if test="record.btnstr != null"> value = #{value,jdbcType=VARCHAR},
BtnStr = #{record.btnstr,jdbcType=VARCHAR}, btn_str = #{btnStr,jdbcType=VARCHAR},
</if> delete_flag = #{deleteFlag,jdbcType=VARCHAR}
<if test="record.deleteFlag != null"> where id = #{id,jdbcType=BIGINT}
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, </update>
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
set Id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR},
KeyId = #{record.keyid,jdbcType=VARCHAR},
Value = #{record.value,jdbcType=VARCHAR},
BtnStr = #{record.btnstr,jdbcType=VARCHAR},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
<set>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="keyid != null">
KeyId = #{keyid,jdbcType=VARCHAR},
</if>
<if test="value != null">
Value = #{value,jdbcType=VARCHAR},
</if>
<if test="btnstr != null">
BtnStr = #{btnstr,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
set Type = #{type,jdbcType=VARCHAR},
KeyId = #{keyid,jdbcType=VARCHAR},
Value = #{value,jdbcType=VARCHAR},
BtnStr = #{btnstr,jdbcType=VARCHAR},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.UserBusinessMapperEx"> <mapper namespace="com.jsh.erp.datasource.mappers.UserBusinessMapperEx">
<update id="batchDeleteUserBusinessByIds"> <update id="batchDeleteUserBusinessByIds">
update jsh_serial_number update jsh_user_business
set delete_Flag='1' set delete_flag='1'
where 1=1 where 1=1
and id in ( and id in (
<foreach collection="ids" item="id" separator=","> <foreach collection="ids" item="id" separator=",">
......
...@@ -47,22 +47,22 @@ ...@@ -47,22 +47,22 @@
<table tableName="jsh_depot" domainObjectName="Depot"></table> <table tableName="jsh_depot" domainObjectName="Depot"></table>
<table tableName="jsh_depothead" domainObjectName="DepotHead"></table> <table tableName="jsh_depothead" domainObjectName="DepotHead"></table>
<table tableName="jsh_depotitem" domainObjectName="DepotItem"></table> <table tableName="jsh_depotitem" domainObjectName="DepotItem"></table>
<table tableName="jsh_functions" domainObjectName="Functions"></table> <table tableName="jsh_function" domainObjectName="Functions"></table>
<table tableName="jsh_inoutitem" domainObjectName="InOutItem"></table> <table tableName="jsh_inoutitem" domainObjectName="InOutItem"></table>
<table tableName="jsh_log" domainObjectName="Log"></table> <table tableName="jsh_log" domainObjectName="Log"></table>
<table tableName="jsh_material" domainObjectName="Material"></table> <table tableName="jsh_material" domainObjectName="Material"></table>
<table tableName="jsh_material_extend" domainObjectName="MaterialExtend"></table> <table tableName="jsh_material_extend" domainObjectName="MaterialExtend"></table>
<table tableName="jsh_material_current_stock" domainObjectName="MaterialCurrentStock"></table> <table tableName="jsh_material_current_stock" domainObjectName="MaterialCurrentStock"></table>
<table tableName="jsh_material_initial_stock" domainObjectName="MaterialInitialStock"></table> <table tableName="jsh_material_initial_stock" domainObjectName="MaterialInitialStock"></table>
<table tableName="jsh_materialcategory" domainObjectName="MaterialCategory"></table> <table tableName="jsh_material_category" domainObjectName="MaterialCategory"></table>
<table tableName="jsh_materialproperty" domainObjectName="MaterialProperty"></table> <table tableName="jsh_material_property" domainObjectName="MaterialProperty"></table>
<table tableName="jsh_person" domainObjectName="Person"></table> <table tableName="jsh_person" domainObjectName="Person"></table>
<table tableName="jsh_role" domainObjectName="Role"></table> <table tableName="jsh_role" domainObjectName="Role"></table>
<table tableName="jsh_supplier" domainObjectName="Supplier"></table> <table tableName="jsh_supplier" domainObjectName="Supplier"></table>
<table tableName="jsh_systemconfig" domainObjectName="SystemConfig"></table> <table tableName="jsh_system_config" domainObjectName="SystemConfig"></table>
<table tableName="jsh_unit" domainObjectName="Unit"></table> <table tableName="jsh_unit" domainObjectName="Unit"></table>
<table tableName="jsh_user" domainObjectName="User"></table> <table tableName="jsh_user" domainObjectName="User"></table>
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table> <table tableName="jsh_user_business" domainObjectName="UserBusiness"></table>
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table> <table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>
<table tableName="jsh_organization" domainObjectName="Organization"></table> <table tableName="jsh_organization" domainObjectName="Organization"></table>
<table tableName="jsh_orga_user_rel" domainObjectName="OrgaUserRel"></table> <table tableName="jsh_orga_user_rel" domainObjectName="OrgaUserRel"></table>
......
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