更新后端,采用Springboot+mybatis

This commit is contained in:
季圣华
2018-12-19 23:54:53 +08:00
parent bb6f5528a7
commit 5cc26a22f2
1672 changed files with 52804 additions and 156085 deletions

View File

@@ -0,0 +1,351 @@
<?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.AccountHeadMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AccountHead">
<!--
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="OrganId" jdbcType="BIGINT" property="organid" />
<result column="HandsPersonId" jdbcType="BIGINT" property="handspersonid" />
<result column="ChangeAmount" jdbcType="DOUBLE" property="changeamount" />
<result column="TotalPrice" jdbcType="DOUBLE" property="totalprice" />
<result column="AccountId" jdbcType="BIGINT" property="accountid" />
<result column="BillNo" jdbcType="VARCHAR" property="billno" />
<result column="BillTime" jdbcType="TIMESTAMP" property="billtime" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, OrganId, HandsPersonId, ChangeAmount, TotalPrice, AccountId, BillNo, BillTime,
Remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" 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_accounthead
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_accounthead
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_accounthead
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_accounthead
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AccountHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_accounthead (Id, Type, OrganId,
HandsPersonId, ChangeAmount, TotalPrice,
AccountId, BillNo, BillTime,
Remark)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organid,jdbcType=BIGINT},
#{handspersonid,jdbcType=BIGINT}, #{changeamount,jdbcType=DOUBLE}, #{totalprice,jdbcType=DOUBLE},
#{accountid,jdbcType=BIGINT}, #{billno,jdbcType=VARCHAR}, #{billtime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_accounthead
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="type != null">
Type,
</if>
<if test="organid != null">
OrganId,
</if>
<if test="handspersonid != null">
HandsPersonId,
</if>
<if test="changeamount != null">
ChangeAmount,
</if>
<if test="totalprice != null">
TotalPrice,
</if>
<if test="accountid != null">
AccountId,
</if>
<if test="billno != null">
BillNo,
</if>
<if test="billtime != null">
BillTime,
</if>
<if test="remark != null">
Remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="organid != null">
#{organid,jdbcType=BIGINT},
</if>
<if test="handspersonid != null">
#{handspersonid,jdbcType=BIGINT},
</if>
<if test="changeamount != null">
#{changeamount,jdbcType=DOUBLE},
</if>
<if test="totalprice != null">
#{totalprice,jdbcType=DOUBLE},
</if>
<if test="accountid != null">
#{accountid,jdbcType=BIGINT},
</if>
<if test="billno != null">
#{billno,jdbcType=VARCHAR},
</if>
<if test="billtime != null">
#{billtime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_accounthead
<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_accounthead
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.organid != null">
OrganId = #{record.organid,jdbcType=BIGINT},
</if>
<if test="record.handspersonid != null">
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
</if>
<if test="record.changeamount != null">
ChangeAmount = #{record.changeamount,jdbcType=DOUBLE},
</if>
<if test="record.totalprice != null">
TotalPrice = #{record.totalprice,jdbcType=DOUBLE},
</if>
<if test="record.accountid != null">
AccountId = #{record.accountid,jdbcType=BIGINT},
</if>
<if test="record.billno != null">
BillNo = #{record.billno,jdbcType=VARCHAR},
</if>
<if test="record.billtime != null">
BillTime = #{record.billtime,jdbcType=TIMESTAMP},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accounthead
set Id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR},
OrganId = #{record.organid,jdbcType=BIGINT},
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
ChangeAmount = #{record.changeamount,jdbcType=DOUBLE},
TotalPrice = #{record.totalprice,jdbcType=DOUBLE},
AccountId = #{record.accountid,jdbcType=BIGINT},
BillNo = #{record.billno,jdbcType=VARCHAR},
BillTime = #{record.billtime,jdbcType=TIMESTAMP},
Remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AccountHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accounthead
<set>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="organid != null">
OrganId = #{organid,jdbcType=BIGINT},
</if>
<if test="handspersonid != null">
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
</if>
<if test="changeamount != null">
ChangeAmount = #{changeamount,jdbcType=DOUBLE},
</if>
<if test="totalprice != null">
TotalPrice = #{totalprice,jdbcType=DOUBLE},
</if>
<if test="accountid != null">
AccountId = #{accountid,jdbcType=BIGINT},
</if>
<if test="billno != null">
BillNo = #{billno,jdbcType=VARCHAR},
</if>
<if test="billtime != null">
BillTime = #{billtime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AccountHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accounthead
set Type = #{type,jdbcType=VARCHAR},
OrganId = #{organid,jdbcType=BIGINT},
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
ChangeAmount = #{changeamount,jdbcType=DOUBLE},
TotalPrice = #{totalprice,jdbcType=DOUBLE},
AccountId = #{accountid,jdbcType=BIGINT},
BillNo = #{billno,jdbcType=VARCHAR},
BillTime = #{billtime,jdbcType=TIMESTAMP},
Remark = #{remark,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,76 @@
<?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.AccountHeadMapper">
<resultMap extends="BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.entities.AccountHeadVo4ListEx">
<result column="OrganName" jdbcType="VARCHAR" property="organname" />
<result column="HandsPersonName" jdbcType="VARCHAR" property="handspersonname" />
<result column="AccountName" jdbcType="VARCHAR" property="accountname" />
</resultMap>
<select id="selectByConditionAccountHead" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="ResultMapEx">
select ah.*, s.supplier OrganName, p.Name HandsPersonName, a.Name AccountName
from jsh_accounthead ah
left join jsh_supplier s on ah.OrganId=s.id
left join jsh_person p on ah.HandsPersonId=p.id
left join jsh_account a on ah.AccountId=a.id
where 1=1
<if test="billNo != null">
and ah.BillNo like '%${billNo}%'
</if>
<if test="type != null">
and ah.Type='${type}'
</if>
<if test="beginTime != null">
and ah.BillTime gt;= '%${beginTime}%'
</if>
<if test="endTime != null">
and ah.BillTime lt;= '%${endTime}%'
</if>
order by ah.Id desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByAccountHead" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_accounthead
WHERE 1=1
<if test="billNo != null">
and BillNo like '%${billNo}%'
</if>
<if test="type != null">
and Type='${type}'
</if>
<if test="beginTime != null">
and BillTime gt;= '%${beginTime}%'
</if>
<if test="endTime != null">
and BillTime lt;= '%${endTime}%'
</if>
</select>
<select id="getMaxId" resultType="java.lang.Long">
select max(Id) as Id from jsh_accounthead
</select>
<select id="findAllMoney" resultType="java.lang.Double">
select sum(${modeName}) as allMoney from jsh_accounthead where Type='${type}'
and OrganId =${supplierId} and BillTime &lt;='${endTime}'
</select>
<select id="getDetailByNumber" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="ResultMapEx">
select ah.*, s.supplier OrganName, p.Name HandsPersonName, a.Name AccountName
from jsh_accounthead ah
left join jsh_supplier s on ah.OrganId=s.id
left join jsh_person p on ah.HandsPersonId=p.id
left join jsh_account a on ah.AccountId=a.id
where 1=1
<if test="billNo != null">
and ah.BillNo = '${billNo}'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,288 @@
<?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.AccountItemMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="HeaderId" jdbcType="BIGINT" property="headerid" />
<result column="AccountId" jdbcType="BIGINT" property="accountid" />
<result column="InOutItemId" jdbcType="BIGINT" property="inoutitemid" />
<result column="EachAmount" jdbcType="DOUBLE" property="eachamount" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, HeaderId, AccountId, InOutItemId, EachAmount, Remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" 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_accountitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_accountitem
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_accountitem
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_accountitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_accountitem (Id, HeaderId, AccountId,
InOutItemId, EachAmount, Remark
)
values (#{id,jdbcType=BIGINT}, #{headerid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT},
#{inoutitemid,jdbcType=BIGINT}, #{eachamount,jdbcType=DOUBLE}, #{remark,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_accountitem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="headerid != null">
HeaderId,
</if>
<if test="accountid != null">
AccountId,
</if>
<if test="inoutitemid != null">
InOutItemId,
</if>
<if test="eachamount != null">
EachAmount,
</if>
<if test="remark != null">
Remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="headerid != null">
#{headerid,jdbcType=BIGINT},
</if>
<if test="accountid != null">
#{accountid,jdbcType=BIGINT},
</if>
<if test="inoutitemid != null">
#{inoutitemid,jdbcType=BIGINT},
</if>
<if test="eachamount != null">
#{eachamount,jdbcType=DOUBLE},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_accountitem
<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_accountitem
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.headerid != null">
HeaderId = #{record.headerid,jdbcType=BIGINT},
</if>
<if test="record.accountid != null">
AccountId = #{record.accountid,jdbcType=BIGINT},
</if>
<if test="record.inoutitemid != null">
InOutItemId = #{record.inoutitemid,jdbcType=BIGINT},
</if>
<if test="record.eachamount != null">
EachAmount = #{record.eachamount,jdbcType=DOUBLE},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accountitem
set Id = #{record.id,jdbcType=BIGINT},
HeaderId = #{record.headerid,jdbcType=BIGINT},
AccountId = #{record.accountid,jdbcType=BIGINT},
InOutItemId = #{record.inoutitemid,jdbcType=BIGINT},
EachAmount = #{record.eachamount,jdbcType=DOUBLE},
Remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accountitem
<set>
<if test="headerid != null">
HeaderId = #{headerid,jdbcType=BIGINT},
</if>
<if test="accountid != null">
AccountId = #{accountid,jdbcType=BIGINT},
</if>
<if test="inoutitemid != null">
InOutItemId = #{inoutitemid,jdbcType=BIGINT},
</if>
<if test="eachamount != null">
EachAmount = #{eachamount,jdbcType=DOUBLE},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accountitem
set HeaderId = #{headerid,jdbcType=BIGINT},
AccountId = #{accountid,jdbcType=BIGINT},
InOutItemId = #{inoutitemid,jdbcType=BIGINT},
EachAmount = #{eachamount,jdbcType=DOUBLE},
Remark = #{remark,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,50 @@
<?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.AccountItemMapper">
<resultMap extends="BaseResultMap" id="ResultWithInfoExMap" type="com.jsh.erp.datasource.vo.AccountItemVo4List">
<result column="AccountName" jdbcType="VARCHAR" property="accountName" />
<result column="InOutItemName" jdbcType="VARCHAR" property="inOutItemName" />
</resultMap>
<select id="selectByConditionAccountItem" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="BaseResultMap">
select *
FROM jsh_accountitem
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByAccountItem" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_accountitem
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
</select>
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="ResultWithInfoExMap">
select ai.*,a.Name AccountName,ioi.Name InOutItemName
from jsh_accountitem ai left join jsh_account a on ai.AccountId=a.id
left join jsh_inoutitem ioi on ai.InOutItemId = ioi.id
where ai.HeaderId = ${headerId}
order by ai.id asc
</select>
</mapper>

View File

@@ -0,0 +1,303 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.AccountMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="SerialNo" jdbcType="VARCHAR" property="serialno" />
<result column="InitialAmount" jdbcType="DOUBLE" property="initialamount" />
<result column="CurrentAmount" jdbcType="DOUBLE" property="currentamount" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="IsDefault" jdbcType="BIT" property="isdefault" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, SerialNo, InitialAmount, CurrentAmount, Remark, IsDefault
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_account
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_account
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_account (Id, Name, SerialNo,
InitialAmount, CurrentAmount, Remark,
IsDefault)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{serialno,jdbcType=VARCHAR},
#{initialamount,jdbcType=DOUBLE}, #{currentamount,jdbcType=DOUBLE}, #{remark,jdbcType=VARCHAR},
#{isdefault,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="serialno != null">
SerialNo,
</if>
<if test="initialamount != null">
InitialAmount,
</if>
<if test="currentamount != null">
CurrentAmount,
</if>
<if test="remark != null">
Remark,
</if>
<if test="isdefault != null">
IsDefault,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="serialno != null">
#{serialno,jdbcType=VARCHAR},
</if>
<if test="initialamount != null">
#{initialamount,jdbcType=DOUBLE},
</if>
<if test="currentamount != null">
#{currentamount,jdbcType=DOUBLE},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="isdefault != null">
#{isdefault,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.serialno != null">
SerialNo = #{record.serialno,jdbcType=VARCHAR},
</if>
<if test="record.initialamount != null">
InitialAmount = #{record.initialamount,jdbcType=DOUBLE},
</if>
<if test="record.currentamount != null">
CurrentAmount = #{record.currentamount,jdbcType=DOUBLE},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.isdefault != null">
IsDefault = #{record.isdefault,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
SerialNo = #{record.serialno,jdbcType=VARCHAR},
InitialAmount = #{record.initialamount,jdbcType=DOUBLE},
CurrentAmount = #{record.currentamount,jdbcType=DOUBLE},
Remark = #{record.remark,jdbcType=VARCHAR},
IsDefault = #{record.isdefault,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="serialno != null">
SerialNo = #{serialno,jdbcType=VARCHAR},
</if>
<if test="initialamount != null">
InitialAmount = #{initialamount,jdbcType=DOUBLE},
</if>
<if test="currentamount != null">
CurrentAmount = #{currentamount,jdbcType=DOUBLE},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="isdefault != null">
IsDefault = #{isdefault,jdbcType=BIT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_account
set Name = #{name,jdbcType=VARCHAR},
SerialNo = #{serialno,jdbcType=VARCHAR},
InitialAmount = #{initialamount,jdbcType=DOUBLE},
CurrentAmount = #{currentamount,jdbcType=DOUBLE},
Remark = #{remark,jdbcType=VARCHAR},
IsDefault = #{isdefault,jdbcType=BIT}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.AccountMapper">
<resultMap extends="BaseResultMap" id="ResultListMap" type="com.jsh.erp.datasource.vo.AccountVo4List">
<result column="thismonthamount" jdbcType="VARCHAR" property="thismonthamount" />
</resultMap>
<resultMap id="ResultInOutList" type="com.jsh.erp.datasource.vo.AccountVo4InOutList">
<result column="Number" jdbcType="VARCHAR" property="number" />
<result column="newType" jdbcType="VARCHAR" property="type" />
<result column="supplier" jdbcType="VARCHAR" property="supplierName" />
<result column="ChangeAmount" jdbcType="DOUBLE" property="changeAmount" />
<result column="oTime" jdbcType="VARCHAR" property="operTime" />
<result column="AList" jdbcType="VARCHAR" property="aList" />
<result column="AMList" jdbcType="VARCHAR" property="amList" />
</resultMap>
<select id="selectByConditionAccount" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="ResultListMap">
select *
FROM jsh_account
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="serialNo != null">
and SerialNo like '%${serialNo}%'
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByAccount" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_account
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="serialNo != null">
and SerialNo like '%${serialNo}%'
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
</select>
<select id="findAccountInOutList" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="ResultInOutList">
<!--主表出入库涉及的账户 -->
select dh.Number,concat(dh.SubType,dh.Type) as newType,s.supplier,dh.ChangeAmount,date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id
where 1=1
<if test="accountId != null">
and dh.AccountId=${accountId}
</if>
<!--主表收入和支出涉及的账户 -->
UNION ALL
select ah.BillNo,ah.Type as newType,s.supplier,ah.ChangeAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id
where 1=1
<if test="accountId != null">
and ah.AccountId=${accountId}
</if>
<!--明细中涉及的账户(收款,付款,收预付款) -->
UNION ALL
select ah.BillNo,ah.Type as newType,s.supplier,ai.EachAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id
inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type in ('收款','付款','收预付款')
<if test="accountId != null">
and ai.AccountId=${accountId}
</if>
<!--主表中转出的账户 -->
UNION ALL
select ah.BillNo,ah.Type as newType, '' as sName,ah.ChangeAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type='转账'
<if test="accountId != null">
and ah.AccountId=${accountId}
</if>
<!--明细中被转入的账户 -->
UNION ALL
select ah.BillNo,ah.Type as newType, '' as sName,ai.EachAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type='转账'
<if test="accountId != null">
and ai.AccountId=${accountId}
</if>
<!--多账户的情况 -->
UNION ALL
select dh.Number,concat(dh.SubType,dh.Type) as newType,s.supplier,dh.ChangeAmount,date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime,
dh.AccountIdList as AList,dh.AccountMoneyList as AMList
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id
where 1=1
<if test="accountId != null">
and dh.AccountIdList like '%${accountId}%'
</if>
ORDER BY oTime desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findAccountInOutListCount" resultType="java.lang.Integer">
select sum(a) from
(
<!--主表出入库涉及的账户 -->
select count(1) a
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id
where 1=1
<if test="accountId != null">
and dh.AccountId=${accountId}
</if>
<!--主表收入和支出涉及的账户 -->
UNION ALL
select count(1) a
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id
where 1=1
<if test="accountId != null">
and ah.AccountId=${accountId}
</if>
<!--明细中涉及的账户(收款,付款,收预付款) -->
UNION ALL
select count(1) a
from jsh_accounthead ah inner join jsh_supplier s on ah.OrganId=s.id
inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type in ('收款','付款','收预付款')
<if test="accountId != null">
and ai.AccountId=${accountId}
</if>
<!--主表中转出的账户 -->
UNION ALL
select count(1) a
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type='转账'
<if test="accountId != null">
and ah.AccountId=${accountId}
</if>
<!--明细中被转入的账户 -->
UNION ALL
select count(1) a
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id
where ah.Type='转账'
<if test="accountId != null">
and ai.AccountId=${accountId}
</if>
<!--多账户的情况 -->
UNION ALL
select count(1) a
from jsh_depothead dh inner join jsh_supplier s on dh.OrganId = s.id
where 1=1
<if test="accountId != null">
and dh.AccountIdList like '%${accountId}%'
</if>
) cc
</select>
</mapper>

View File

@@ -0,0 +1,428 @@
<?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.AppMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.App">
<!--
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="Type" jdbcType="VARCHAR" property="type" />
<result column="Icon" jdbcType="VARCHAR" property="icon" />
<result column="URL" jdbcType="VARCHAR" property="url" />
<result column="Width" jdbcType="VARCHAR" property="width" />
<result column="Height" jdbcType="VARCHAR" property="height" />
<result column="ReSize" jdbcType="BIT" property="resize" />
<result column="OpenMax" jdbcType="BIT" property="openmax" />
<result column="Flash" jdbcType="BIT" property="flash" />
<result column="ZL" jdbcType="VARCHAR" property="zl" />
<result column="Sort" jdbcType="VARCHAR" property="sort" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="Enabled" jdbcType="BIT" property="enabled" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Number, Name, Type, Icon, URL, Width, Height, ReSize, OpenMax, Flash, ZL, Sort,
Remark, Enabled
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AppExample" 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_app
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_app
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_app
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AppExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_app
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.App">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_app (Id, Number, Name,
Type, Icon, URL, Width,
Height, ReSize, OpenMax, Flash,
ZL, Sort, Remark, Enabled
)
values (#{id,jdbcType=BIGINT}, #{number,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{width,jdbcType=VARCHAR},
#{height,jdbcType=VARCHAR}, #{resize,jdbcType=BIT}, #{openmax,jdbcType=BIT}, #{flash,jdbcType=BIT},
#{zl,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.App">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_app
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="number != null">
Number,
</if>
<if test="name != null">
Name,
</if>
<if test="type != null">
Type,
</if>
<if test="icon != null">
Icon,
</if>
<if test="url != null">
URL,
</if>
<if test="width != null">
Width,
</if>
<if test="height != null">
Height,
</if>
<if test="resize != null">
ReSize,
</if>
<if test="openmax != null">
OpenMax,
</if>
<if test="flash != null">
Flash,
</if>
<if test="zl != null">
ZL,
</if>
<if test="sort != null">
Sort,
</if>
<if test="remark != null">
Remark,
</if>
<if test="enabled != null">
Enabled,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="number != null">
#{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="width != null">
#{width,jdbcType=VARCHAR},
</if>
<if test="height != null">
#{height,jdbcType=VARCHAR},
</if>
<if test="resize != null">
#{resize,jdbcType=BIT},
</if>
<if test="openmax != null">
#{openmax,jdbcType=BIT},
</if>
<if test="flash != null">
#{flash,jdbcType=BIT},
</if>
<if test="zl != null">
#{zl,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AppExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_app
<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_app
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.number != null">
Number = #{record.number,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.icon != null">
Icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if test="record.url != null">
URL = #{record.url,jdbcType=VARCHAR},
</if>
<if test="record.width != null">
Width = #{record.width,jdbcType=VARCHAR},
</if>
<if test="record.height != null">
Height = #{record.height,jdbcType=VARCHAR},
</if>
<if test="record.resize != null">
ReSize = #{record.resize,jdbcType=BIT},
</if>
<if test="record.openmax != null">
OpenMax = #{record.openmax,jdbcType=BIT},
</if>
<if test="record.flash != null">
Flash = #{record.flash,jdbcType=BIT},
</if>
<if test="record.zl != null">
ZL = #{record.zl,jdbcType=VARCHAR},
</if>
<if test="record.sort != null">
Sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
Enabled = #{record.enabled,jdbcType=BIT},
</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_app
set Id = #{record.id,jdbcType=BIGINT},
Number = #{record.number,jdbcType=VARCHAR},
Name = #{record.name,jdbcType=VARCHAR},
Type = #{record.type,jdbcType=VARCHAR},
Icon = #{record.icon,jdbcType=VARCHAR},
URL = #{record.url,jdbcType=VARCHAR},
Width = #{record.width,jdbcType=VARCHAR},
Height = #{record.height,jdbcType=VARCHAR},
ReSize = #{record.resize,jdbcType=BIT},
OpenMax = #{record.openmax,jdbcType=BIT},
Flash = #{record.flash,jdbcType=BIT},
ZL = #{record.zl,jdbcType=VARCHAR},
Sort = #{record.sort,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR},
Enabled = #{record.enabled,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.App">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_app
<set>
<if test="number != null">
Number = #{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="icon != null">
Icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="url != null">
URL = #{url,jdbcType=VARCHAR},
</if>
<if test="width != null">
Width = #{width,jdbcType=VARCHAR},
</if>
<if test="height != null">
Height = #{height,jdbcType=VARCHAR},
</if>
<if test="resize != null">
ReSize = #{resize,jdbcType=BIT},
</if>
<if test="openmax != null">
OpenMax = #{openmax,jdbcType=BIT},
</if>
<if test="flash != null">
Flash = #{flash,jdbcType=BIT},
</if>
<if test="zl != null">
ZL = #{zl,jdbcType=VARCHAR},
</if>
<if test="sort != null">
Sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
Enabled = #{enabled,jdbcType=BIT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.App">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_app
set Number = #{number,jdbcType=VARCHAR},
Name = #{name,jdbcType=VARCHAR},
Type = #{type,jdbcType=VARCHAR},
Icon = #{icon,jdbcType=VARCHAR},
URL = #{url,jdbcType=VARCHAR},
Width = #{width,jdbcType=VARCHAR},
Height = #{height,jdbcType=VARCHAR},
ReSize = #{resize,jdbcType=BIT},
OpenMax = #{openmax,jdbcType=BIT},
Flash = #{flash,jdbcType=BIT},
ZL = #{zl,jdbcType=VARCHAR},
Sort = #{sort,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR},
Enabled = #{enabled,jdbcType=BIT}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,30 @@
<?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.AppMapper">
<select id="selectByConditionApp" parameterType="com.jsh.erp.datasource.entities.AppExample" resultMap="BaseResultMap">
select *
FROM jsh_app
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByApp" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_app
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,256 @@
<?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.AssetCategoryMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="assetname" jdbcType="VARCHAR" property="assetname" />
<result column="isystem" jdbcType="TINYINT" property="isystem" />
<result column="description" jdbcType="VARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetname, isystem, description
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AssetCategoryExample" 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_assetcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_assetcategory
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_assetcategory
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AssetCategoryExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetcategory (id, assetname, isystem,
description)
values (#{id,jdbcType=BIGINT}, #{assetname,jdbcType=VARCHAR}, #{isystem,jdbcType=TINYINT},
#{description,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetcategory
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="assetname != null">
assetname,
</if>
<if test="isystem != null">
isystem,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="assetname != null">
#{assetname,jdbcType=VARCHAR},
</if>
<if test="isystem != null">
#{isystem,jdbcType=TINYINT},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AssetCategoryExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_assetcategory
<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_assetcategory
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.assetname != null">
assetname = #{record.assetname,jdbcType=VARCHAR},
</if>
<if test="record.isystem != null">
isystem = #{record.isystem,jdbcType=TINYINT},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
isystem = #{record.isystem,jdbcType=TINYINT},
description = #{record.description,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
<set>
<if test="assetname != null">
assetname = #{assetname,jdbcType=VARCHAR},
</if>
<if test="isystem != null">
isystem = #{isystem,jdbcType=TINYINT},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetcategory
set assetname = #{assetname,jdbcType=VARCHAR},
isystem = #{isystem,jdbcType=TINYINT},
description = #{description,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,578 @@
<?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.AssetMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="assetnameID" jdbcType="BIGINT" property="assetnameid" />
<result column="location" jdbcType="VARCHAR" property="location" />
<result column="labels" jdbcType="VARCHAR" property="labels" />
<result column="status" jdbcType="SMALLINT" property="status" />
<result column="userID" jdbcType="BIGINT" property="userid" />
<result column="price" jdbcType="DOUBLE" property="price" />
<result column="purchasedate" jdbcType="TIMESTAMP" property="purchasedate" />
<result column="periodofvalidity" jdbcType="TIMESTAMP" property="periodofvalidity" />
<result column="warrantydate" jdbcType="TIMESTAMP" property="warrantydate" />
<result column="assetnum" jdbcType="VARCHAR" property="assetnum" />
<result column="serialnum" jdbcType="VARCHAR" property="serialnum" />
<result column="supplier" jdbcType="BIGINT" property="supplier" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="creator" jdbcType="BIGINT" property="creator" />
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
<result column="updator" jdbcType="BIGINT" property="updator" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="description" jdbcType="LONGVARCHAR" property="description" />
<result column="addMonth" jdbcType="LONGVARCHAR" property="addmonth" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetnameID, location, labels, status, userID, price, purchasedate, periodofvalidity,
warrantydate, assetnum, serialnum, supplier, createtime, creator, updatetime, updator
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
description, addMonth
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.jsh.erp.datasource.entities.AssetExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_asset
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample" 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_asset
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_asset
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_asset
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_asset
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_asset (id, assetnameID, location,
labels, status, userID,
price, purchasedate, periodofvalidity,
warrantydate, assetnum, serialnum,
supplier, createtime, creator,
updatetime, updator, description,
addMonth)
values (#{id,jdbcType=BIGINT}, #{assetnameid,jdbcType=BIGINT}, #{location,jdbcType=VARCHAR},
#{labels,jdbcType=VARCHAR}, #{status,jdbcType=SMALLINT}, #{userid,jdbcType=BIGINT},
#{price,jdbcType=DOUBLE}, #{purchasedate,jdbcType=TIMESTAMP}, #{periodofvalidity,jdbcType=TIMESTAMP},
#{warrantydate,jdbcType=TIMESTAMP}, #{assetnum,jdbcType=VARCHAR}, #{serialnum,jdbcType=VARCHAR},
#{supplier,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT},
#{updatetime,jdbcType=TIMESTAMP}, #{updator,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR},
#{addmonth,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_asset
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="assetnameid != null">
assetnameID,
</if>
<if test="location != null">
location,
</if>
<if test="labels != null">
labels,
</if>
<if test="status != null">
status,
</if>
<if test="userid != null">
userID,
</if>
<if test="price != null">
price,
</if>
<if test="purchasedate != null">
purchasedate,
</if>
<if test="periodofvalidity != null">
periodofvalidity,
</if>
<if test="warrantydate != null">
warrantydate,
</if>
<if test="assetnum != null">
assetnum,
</if>
<if test="serialnum != null">
serialnum,
</if>
<if test="supplier != null">
supplier,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="creator != null">
creator,
</if>
<if test="updatetime != null">
updatetime,
</if>
<if test="updator != null">
updator,
</if>
<if test="description != null">
description,
</if>
<if test="addmonth != null">
addMonth,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="assetnameid != null">
#{assetnameid,jdbcType=BIGINT},
</if>
<if test="location != null">
#{location,jdbcType=VARCHAR},
</if>
<if test="labels != null">
#{labels,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=SMALLINT},
</if>
<if test="userid != null">
#{userid,jdbcType=BIGINT},
</if>
<if test="price != null">
#{price,jdbcType=DOUBLE},
</if>
<if test="purchasedate != null">
#{purchasedate,jdbcType=TIMESTAMP},
</if>
<if test="periodofvalidity != null">
#{periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if test="warrantydate != null">
#{warrantydate,jdbcType=TIMESTAMP},
</if>
<if test="assetnum != null">
#{assetnum,jdbcType=VARCHAR},
</if>
<if test="serialnum != null">
#{serialnum,jdbcType=VARCHAR},
</if>
<if test="supplier != null">
#{supplier,jdbcType=BIGINT},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
#{creator,jdbcType=BIGINT},
</if>
<if test="updatetime != null">
#{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="updator != null">
#{updator,jdbcType=BIGINT},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
<if test="addmonth != null">
#{addmonth,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AssetExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_asset
<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_asset
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.assetnameid != null">
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
</if>
<if test="record.location != null">
location = #{record.location,jdbcType=VARCHAR},
</if>
<if test="record.labels != null">
labels = #{record.labels,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=SMALLINT},
</if>
<if test="record.userid != null">
userID = #{record.userid,jdbcType=BIGINT},
</if>
<if test="record.price != null">
price = #{record.price,jdbcType=DOUBLE},
</if>
<if test="record.purchasedate != null">
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
</if>
<if test="record.periodofvalidity != null">
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if test="record.warrantydate != null">
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
</if>
<if test="record.assetnum != null">
assetnum = #{record.assetnum,jdbcType=VARCHAR},
</if>
<if test="record.serialnum != null">
serialnum = #{record.serialnum,jdbcType=VARCHAR},
</if>
<if test="record.supplier != null">
supplier = #{record.supplier,jdbcType=BIGINT},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if test="record.updatetime != null">
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
</if>
<if test="record.updator != null">
updator = #{record.updator,jdbcType=BIGINT},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
<if test="record.addmonth != null">
addMonth = #{record.addmonth,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set id = #{record.id,jdbcType=BIGINT},
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
location = #{record.location,jdbcType=VARCHAR},
labels = #{record.labels,jdbcType=VARCHAR},
status = #{record.status,jdbcType=SMALLINT},
userID = #{record.userid,jdbcType=BIGINT},
price = #{record.price,jdbcType=DOUBLE},
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
assetnum = #{record.assetnum,jdbcType=VARCHAR},
serialnum = #{record.serialnum,jdbcType=VARCHAR},
supplier = #{record.supplier,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
updator = #{record.updator,jdbcType=BIGINT},
description = #{record.description,jdbcType=LONGVARCHAR},
addMonth = #{record.addmonth,jdbcType=LONGVARCHAR}
<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_asset
set id = #{record.id,jdbcType=BIGINT},
assetnameID = #{record.assetnameid,jdbcType=BIGINT},
location = #{record.location,jdbcType=VARCHAR},
labels = #{record.labels,jdbcType=VARCHAR},
status = #{record.status,jdbcType=SMALLINT},
userID = #{record.userid,jdbcType=BIGINT},
price = #{record.price,jdbcType=DOUBLE},
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
assetnum = #{record.assetnum,jdbcType=VARCHAR},
serialnum = #{record.serialnum,jdbcType=VARCHAR},
supplier = #{record.supplier,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=BIGINT},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
updator = #{record.updator,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
<set>
<if test="assetnameid != null">
assetnameID = #{assetnameid,jdbcType=BIGINT},
</if>
<if test="location != null">
location = #{location,jdbcType=VARCHAR},
</if>
<if test="labels != null">
labels = #{labels,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=SMALLINT},
</if>
<if test="userid != null">
userID = #{userid,jdbcType=BIGINT},
</if>
<if test="price != null">
price = #{price,jdbcType=DOUBLE},
</if>
<if test="purchasedate != null">
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
</if>
<if test="periodofvalidity != null">
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
</if>
<if test="warrantydate != null">
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
</if>
<if test="assetnum != null">
assetnum = #{assetnum,jdbcType=VARCHAR},
</if>
<if test="serialnum != null">
serialnum = #{serialnum,jdbcType=VARCHAR},
</if>
<if test="supplier != null">
supplier = #{supplier,jdbcType=BIGINT},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
creator = #{creator,jdbcType=BIGINT},
</if>
<if test="updatetime != null">
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="updator != null">
updator = #{updator,jdbcType=BIGINT},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
<if test="addmonth != null">
addMonth = #{addmonth,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set assetnameID = #{assetnameid,jdbcType=BIGINT},
location = #{location,jdbcType=VARCHAR},
labels = #{labels,jdbcType=VARCHAR},
status = #{status,jdbcType=SMALLINT},
userID = #{userid,jdbcType=BIGINT},
price = #{price,jdbcType=DOUBLE},
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
assetnum = #{assetnum,jdbcType=VARCHAR},
serialnum = #{serialnum,jdbcType=VARCHAR},
supplier = #{supplier,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
updatetime = #{updatetime,jdbcType=TIMESTAMP},
updator = #{updator,jdbcType=BIGINT},
description = #{description,jdbcType=LONGVARCHAR},
addMonth = #{addmonth,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Asset">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_asset
set assetnameID = #{assetnameid,jdbcType=BIGINT},
location = #{location,jdbcType=VARCHAR},
labels = #{labels,jdbcType=VARCHAR},
status = #{status,jdbcType=SMALLINT},
userID = #{userid,jdbcType=BIGINT},
price = #{price,jdbcType=DOUBLE},
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
assetnum = #{assetnum,jdbcType=VARCHAR},
serialnum = #{serialnum,jdbcType=VARCHAR},
supplier = #{supplier,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=BIGINT},
updatetime = #{updatetime,jdbcType=TIMESTAMP},
updator = #{updator,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,350 @@
<?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.AssetNameMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="assetname" jdbcType="VARCHAR" property="assetname" />
<result column="assetcategoryID" jdbcType="BIGINT" property="assetcategoryid" />
<result column="isystem" jdbcType="SMALLINT" property="isystem" />
<result column="isconsumables" jdbcType="SMALLINT" property="isconsumables" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="description" jdbcType="LONGVARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetname, assetcategoryID, isystem, isconsumables
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
description
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.jsh.erp.datasource.entities.AssetNameExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_assetname
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AssetNameExample" 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_assetname
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from jsh_assetname
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_assetname
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AssetNameExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_assetname
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetname (id, assetname, assetcategoryID,
isystem, isconsumables, description
)
values (#{id,jdbcType=BIGINT}, #{assetname,jdbcType=VARCHAR}, #{assetcategoryid,jdbcType=BIGINT},
#{isystem,jdbcType=SMALLINT}, #{isconsumables,jdbcType=SMALLINT}, #{description,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetname
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="assetname != null">
assetname,
</if>
<if test="assetcategoryid != null">
assetcategoryID,
</if>
<if test="isystem != null">
isystem,
</if>
<if test="isconsumables != null">
isconsumables,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="assetname != null">
#{assetname,jdbcType=VARCHAR},
</if>
<if test="assetcategoryid != null">
#{assetcategoryid,jdbcType=BIGINT},
</if>
<if test="isystem != null">
#{isystem,jdbcType=SMALLINT},
</if>
<if test="isconsumables != null">
#{isconsumables,jdbcType=SMALLINT},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AssetNameExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_assetname
<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_assetname
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.assetname != null">
assetname = #{record.assetname,jdbcType=VARCHAR},
</if>
<if test="record.assetcategoryid != null">
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
</if>
<if test="record.isystem != null">
isystem = #{record.isystem,jdbcType=SMALLINT},
</if>
<if test="record.isconsumables != null">
isconsumables = #{record.isconsumables,jdbcType=SMALLINT},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
isystem = #{record.isystem,jdbcType=SMALLINT},
isconsumables = #{record.isconsumables,jdbcType=SMALLINT},
description = #{record.description,jdbcType=LONGVARCHAR}
<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_assetname
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
assetcategoryID = #{record.assetcategoryid,jdbcType=BIGINT},
isystem = #{record.isystem,jdbcType=SMALLINT},
isconsumables = #{record.isconsumables,jdbcType=SMALLINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
<set>
<if test="assetname != null">
assetname = #{assetname,jdbcType=VARCHAR},
</if>
<if test="assetcategoryid != null">
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
</if>
<if test="isystem != null">
isystem = #{isystem,jdbcType=SMALLINT},
</if>
<if test="isconsumables != null">
isconsumables = #{isconsumables,jdbcType=SMALLINT},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set assetname = #{assetname,jdbcType=VARCHAR},
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
isystem = #{isystem,jdbcType=SMALLINT},
isconsumables = #{isconsumables,jdbcType=SMALLINT},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AssetName">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_assetname
set assetname = #{assetname,jdbcType=VARCHAR},
assetcategoryID = #{assetcategoryid,jdbcType=BIGINT},
isystem = #{isystem,jdbcType=SMALLINT},
isconsumables = #{isconsumables,jdbcType=SMALLINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,635 @@
<?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.DepotHeadMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotHead">
<!--
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="SubType" jdbcType="VARCHAR" property="subtype" />
<result column="ProjectId" jdbcType="BIGINT" property="projectid" />
<result column="DefaultNumber" jdbcType="VARCHAR" property="defaultnumber" />
<result column="Number" jdbcType="VARCHAR" property="number" />
<result column="OperPersonName" jdbcType="VARCHAR" property="operpersonname" />
<result column="CreateTime" jdbcType="TIMESTAMP" property="createtime" />
<result column="OperTime" jdbcType="TIMESTAMP" property="opertime" />
<result column="OrganId" jdbcType="BIGINT" property="organid" />
<result column="HandsPersonId" jdbcType="BIGINT" property="handspersonid" />
<result column="AccountId" jdbcType="BIGINT" property="accountid" />
<result column="ChangeAmount" jdbcType="DOUBLE" property="changeamount" />
<result column="AllocationProjectId" jdbcType="BIGINT" property="allocationprojectid" />
<result column="TotalPrice" jdbcType="DOUBLE" property="totalprice" />
<result column="PayType" jdbcType="VARCHAR" property="paytype" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="Salesman" jdbcType="VARCHAR" property="salesman" />
<result column="AccountIdList" jdbcType="VARCHAR" property="accountidlist" />
<result column="AccountMoneyList" jdbcType="VARCHAR" property="accountmoneylist" />
<result column="Discount" jdbcType="DOUBLE" property="discount" />
<result column="DiscountMoney" jdbcType="DOUBLE" property="discountmoney" />
<result column="DiscountLastMoney" jdbcType="DOUBLE" property="discountlastmoney" />
<result column="OtherMoney" jdbcType="DOUBLE" property="othermoney" />
<result column="OtherMoneyList" jdbcType="VARCHAR" property="othermoneylist" />
<result column="OtherMoneyItem" jdbcType="VARCHAR" property="othermoneyitem" />
<result column="AccountDay" jdbcType="INTEGER" property="accountday" />
<result column="Status" jdbcType="BIT" property="status" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, SubType, ProjectId, DefaultNumber, Number, OperPersonName, CreateTime,
OperTime, OrganId, HandsPersonId, AccountId, ChangeAmount, AllocationProjectId, TotalPrice,
PayType, Remark, Salesman, AccountIdList, AccountMoneyList, Discount, DiscountMoney,
DiscountLastMoney, OtherMoney, OtherMoneyList, OtherMoneyItem, AccountDay, Status
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" 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_depothead
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_depothead
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_depothead
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_depothead
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.DepotHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depothead (Id, Type, SubType,
ProjectId, DefaultNumber, Number,
OperPersonName, CreateTime, OperTime,
OrganId, HandsPersonId, AccountId,
ChangeAmount, AllocationProjectId, TotalPrice,
PayType, Remark, Salesman,
AccountIdList, AccountMoneyList, Discount,
DiscountMoney, DiscountLastMoney, OtherMoney,
OtherMoneyList, OtherMoneyItem, AccountDay,
Status)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subtype,jdbcType=VARCHAR},
#{projectid,jdbcType=BIGINT}, #{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR},
#{operpersonname,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP},
#{organid,jdbcType=BIGINT}, #{handspersonid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT},
#{changeamount,jdbcType=DOUBLE}, #{allocationprojectid,jdbcType=BIGINT}, #{totalprice,jdbcType=DOUBLE},
#{paytype,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{salesman,jdbcType=VARCHAR},
#{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=DOUBLE},
#{discountmoney,jdbcType=DOUBLE}, #{discountlastmoney,jdbcType=DOUBLE}, #{othermoney,jdbcType=DOUBLE},
#{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER},
#{status,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depothead
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="type != null">
Type,
</if>
<if test="subtype != null">
SubType,
</if>
<if test="projectid != null">
ProjectId,
</if>
<if test="defaultnumber != null">
DefaultNumber,
</if>
<if test="number != null">
Number,
</if>
<if test="operpersonname != null">
OperPersonName,
</if>
<if test="createtime != null">
CreateTime,
</if>
<if test="opertime != null">
OperTime,
</if>
<if test="organid != null">
OrganId,
</if>
<if test="handspersonid != null">
HandsPersonId,
</if>
<if test="accountid != null">
AccountId,
</if>
<if test="changeamount != null">
ChangeAmount,
</if>
<if test="allocationprojectid != null">
AllocationProjectId,
</if>
<if test="totalprice != null">
TotalPrice,
</if>
<if test="paytype != null">
PayType,
</if>
<if test="remark != null">
Remark,
</if>
<if test="salesman != null">
Salesman,
</if>
<if test="accountidlist != null">
AccountIdList,
</if>
<if test="accountmoneylist != null">
AccountMoneyList,
</if>
<if test="discount != null">
Discount,
</if>
<if test="discountmoney != null">
DiscountMoney,
</if>
<if test="discountlastmoney != null">
DiscountLastMoney,
</if>
<if test="othermoney != null">
OtherMoney,
</if>
<if test="othermoneylist != null">
OtherMoneyList,
</if>
<if test="othermoneyitem != null">
OtherMoneyItem,
</if>
<if test="accountday != null">
AccountDay,
</if>
<if test="status != null">
Status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="subtype != null">
#{subtype,jdbcType=VARCHAR},
</if>
<if test="projectid != null">
#{projectid,jdbcType=BIGINT},
</if>
<if test="defaultnumber != null">
#{defaultnumber,jdbcType=VARCHAR},
</if>
<if test="number != null">
#{number,jdbcType=VARCHAR},
</if>
<if test="operpersonname != null">
#{operpersonname,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="opertime != null">
#{opertime,jdbcType=TIMESTAMP},
</if>
<if test="organid != null">
#{organid,jdbcType=BIGINT},
</if>
<if test="handspersonid != null">
#{handspersonid,jdbcType=BIGINT},
</if>
<if test="accountid != null">
#{accountid,jdbcType=BIGINT},
</if>
<if test="changeamount != null">
#{changeamount,jdbcType=DOUBLE},
</if>
<if test="allocationprojectid != null">
#{allocationprojectid,jdbcType=BIGINT},
</if>
<if test="totalprice != null">
#{totalprice,jdbcType=DOUBLE},
</if>
<if test="paytype != null">
#{paytype,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="salesman != null">
#{salesman,jdbcType=VARCHAR},
</if>
<if test="accountidlist != null">
#{accountidlist,jdbcType=VARCHAR},
</if>
<if test="accountmoneylist != null">
#{accountmoneylist,jdbcType=VARCHAR},
</if>
<if test="discount != null">
#{discount,jdbcType=DOUBLE},
</if>
<if test="discountmoney != null">
#{discountmoney,jdbcType=DOUBLE},
</if>
<if test="discountlastmoney != null">
#{discountlastmoney,jdbcType=DOUBLE},
</if>
<if test="othermoney != null">
#{othermoney,jdbcType=DOUBLE},
</if>
<if test="othermoneylist != null">
#{othermoneylist,jdbcType=VARCHAR},
</if>
<if test="othermoneyitem != null">
#{othermoneyitem,jdbcType=VARCHAR},
</if>
<if test="accountday != null">
#{accountday,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=BIT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_depothead
<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_depothead
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.subtype != null">
SubType = #{record.subtype,jdbcType=VARCHAR},
</if>
<if test="record.projectid != null">
ProjectId = #{record.projectid,jdbcType=BIGINT},
</if>
<if test="record.defaultnumber != null">
DefaultNumber = #{record.defaultnumber,jdbcType=VARCHAR},
</if>
<if test="record.number != null">
Number = #{record.number,jdbcType=VARCHAR},
</if>
<if test="record.operpersonname != null">
OperPersonName = #{record.operpersonname,jdbcType=VARCHAR},
</if>
<if test="record.createtime != null">
CreateTime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if test="record.opertime != null">
OperTime = #{record.opertime,jdbcType=TIMESTAMP},
</if>
<if test="record.organid != null">
OrganId = #{record.organid,jdbcType=BIGINT},
</if>
<if test="record.handspersonid != null">
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
</if>
<if test="record.accountid != null">
AccountId = #{record.accountid,jdbcType=BIGINT},
</if>
<if test="record.changeamount != null">
ChangeAmount = #{record.changeamount,jdbcType=DOUBLE},
</if>
<if test="record.allocationprojectid != null">
AllocationProjectId = #{record.allocationprojectid,jdbcType=BIGINT},
</if>
<if test="record.totalprice != null">
TotalPrice = #{record.totalprice,jdbcType=DOUBLE},
</if>
<if test="record.paytype != null">
PayType = #{record.paytype,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.salesman != null">
Salesman = #{record.salesman,jdbcType=VARCHAR},
</if>
<if test="record.accountidlist != null">
AccountIdList = #{record.accountidlist,jdbcType=VARCHAR},
</if>
<if test="record.accountmoneylist != null">
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR},
</if>
<if test="record.discount != null">
Discount = #{record.discount,jdbcType=DOUBLE},
</if>
<if test="record.discountmoney != null">
DiscountMoney = #{record.discountmoney,jdbcType=DOUBLE},
</if>
<if test="record.discountlastmoney != null">
DiscountLastMoney = #{record.discountlastmoney,jdbcType=DOUBLE},
</if>
<if test="record.othermoney != null">
OtherMoney = #{record.othermoney,jdbcType=DOUBLE},
</if>
<if test="record.othermoneylist != null">
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR},
</if>
<if test="record.othermoneyitem != null">
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR},
</if>
<if test="record.accountday != null">
AccountDay = #{record.accountday,jdbcType=INTEGER},
</if>
<if test="record.status != null">
Status = #{record.status,jdbcType=BIT},
</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_depothead
set Id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR},
SubType = #{record.subtype,jdbcType=VARCHAR},
ProjectId = #{record.projectid,jdbcType=BIGINT},
DefaultNumber = #{record.defaultnumber,jdbcType=VARCHAR},
Number = #{record.number,jdbcType=VARCHAR},
OperPersonName = #{record.operpersonname,jdbcType=VARCHAR},
CreateTime = #{record.createtime,jdbcType=TIMESTAMP},
OperTime = #{record.opertime,jdbcType=TIMESTAMP},
OrganId = #{record.organid,jdbcType=BIGINT},
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
AccountId = #{record.accountid,jdbcType=BIGINT},
ChangeAmount = #{record.changeamount,jdbcType=DOUBLE},
AllocationProjectId = #{record.allocationprojectid,jdbcType=BIGINT},
TotalPrice = #{record.totalprice,jdbcType=DOUBLE},
PayType = #{record.paytype,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR},
Salesman = #{record.salesman,jdbcType=VARCHAR},
AccountIdList = #{record.accountidlist,jdbcType=VARCHAR},
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR},
Discount = #{record.discount,jdbcType=DOUBLE},
DiscountMoney = #{record.discountmoney,jdbcType=DOUBLE},
DiscountLastMoney = #{record.discountlastmoney,jdbcType=DOUBLE},
OtherMoney = #{record.othermoney,jdbcType=DOUBLE},
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR},
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR},
AccountDay = #{record.accountday,jdbcType=INTEGER},
Status = #{record.status,jdbcType=BIT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.DepotHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depothead
<set>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="subtype != null">
SubType = #{subtype,jdbcType=VARCHAR},
</if>
<if test="projectid != null">
ProjectId = #{projectid,jdbcType=BIGINT},
</if>
<if test="defaultnumber != null">
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR},
</if>
<if test="number != null">
Number = #{number,jdbcType=VARCHAR},
</if>
<if test="operpersonname != null">
OperPersonName = #{operpersonname,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
CreateTime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="opertime != null">
OperTime = #{opertime,jdbcType=TIMESTAMP},
</if>
<if test="organid != null">
OrganId = #{organid,jdbcType=BIGINT},
</if>
<if test="handspersonid != null">
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
</if>
<if test="accountid != null">
AccountId = #{accountid,jdbcType=BIGINT},
</if>
<if test="changeamount != null">
ChangeAmount = #{changeamount,jdbcType=DOUBLE},
</if>
<if test="allocationprojectid != null">
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
</if>
<if test="totalprice != null">
TotalPrice = #{totalprice,jdbcType=DOUBLE},
</if>
<if test="paytype != null">
PayType = #{paytype,jdbcType=VARCHAR},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="salesman != null">
Salesman = #{salesman,jdbcType=VARCHAR},
</if>
<if test="accountidlist != null">
AccountIdList = #{accountidlist,jdbcType=VARCHAR},
</if>
<if test="accountmoneylist != null">
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
</if>
<if test="discount != null">
Discount = #{discount,jdbcType=DOUBLE},
</if>
<if test="discountmoney != null">
DiscountMoney = #{discountmoney,jdbcType=DOUBLE},
</if>
<if test="discountlastmoney != null">
DiscountLastMoney = #{discountlastmoney,jdbcType=DOUBLE},
</if>
<if test="othermoney != null">
OtherMoney = #{othermoney,jdbcType=DOUBLE},
</if>
<if test="othermoneylist != null">
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
</if>
<if test="othermoneyitem != null">
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
</if>
<if test="accountday != null">
AccountDay = #{accountday,jdbcType=INTEGER},
</if>
<if test="status != null">
Status = #{status,jdbcType=BIT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.DepotHead">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depothead
set Type = #{type,jdbcType=VARCHAR},
SubType = #{subtype,jdbcType=VARCHAR},
ProjectId = #{projectid,jdbcType=BIGINT},
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR},
Number = #{number,jdbcType=VARCHAR},
OperPersonName = #{operpersonname,jdbcType=VARCHAR},
CreateTime = #{createtime,jdbcType=TIMESTAMP},
OperTime = #{opertime,jdbcType=TIMESTAMP},
OrganId = #{organid,jdbcType=BIGINT},
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
AccountId = #{accountid,jdbcType=BIGINT},
ChangeAmount = #{changeamount,jdbcType=DOUBLE},
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
TotalPrice = #{totalprice,jdbcType=DOUBLE},
PayType = #{paytype,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR},
Salesman = #{salesman,jdbcType=VARCHAR},
AccountIdList = #{accountidlist,jdbcType=VARCHAR},
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
Discount = #{discount,jdbcType=DOUBLE},
DiscountMoney = #{discountmoney,jdbcType=DOUBLE},
DiscountLastMoney = #{discountlastmoney,jdbcType=DOUBLE},
OtherMoney = #{othermoney,jdbcType=DOUBLE},
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
AccountDay = #{accountday,jdbcType=INTEGER},
Status = #{status,jdbcType=BIT}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,284 @@
<?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.DepotHeadMapper">
<resultMap extends="BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.vo.DepotHeadVo4List">
<result column="ProjectName" jdbcType="VARCHAR" property="projectName" />
<result column="OrganName" jdbcType="VARCHAR" property="organName" />
<result column="HandsPersonName" jdbcType="VARCHAR" property="handsPersonName" />
<result column="AccountName" jdbcType="VARCHAR" property="accountName" />
<result column="AllocationProjectName" jdbcType="VARCHAR" property="allocationProjectName" />
</resultMap>
<resultMap id="ResultWithInfoExMap" type="com.jsh.erp.datasource.vo.DepotHeadVo4InDetail">
<result column="Number" jdbcType="VARCHAR" property="Number" />
<result column="MName" jdbcType="VARCHAR" property="MName" />
<result column="Model" jdbcType="VARCHAR" property="Model" />
<result column="UnitPrice" jdbcType="DOUBLE" property="UnitPrice" />
<result column="OperNumber" jdbcType="DOUBLE" property="OperNumber" />
<result column="AllPrice" jdbcType="DOUBLE" property="AllPrice" />
<result column="SName" jdbcType="VARCHAR" property="SName" />
<result column="DName" jdbcType="VARCHAR" property="DName" />
<result column="OperTime" jdbcType="VARCHAR" property="OperTime" />
<result column="NewType" jdbcType="VARCHAR" property="NewType" />
</resultMap>
<resultMap id="ResultInOutMaterialCount" type="com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount">
<result column="MaterialId" jdbcType="BIGINT" property="MaterialId" />
<result column="mName" jdbcType="VARCHAR" property="mName" />
<result column="Model" jdbcType="VARCHAR" property="Model" />
<result column="categoryName" jdbcType="VARCHAR" property="categoryName" />
<result column="numSum" jdbcType="DOUBLE" property="numSum" />
<result column="priceSum" jdbcType="DOUBLE" property="priceSum" />
</resultMap>
<resultMap id="ResultStatementAccount" type="com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount">
<result column="Number" jdbcType="VARCHAR" property="number" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="DiscountLastMoney" jdbcType="DOUBLE" property="discountLastMoney" />
<result column="ChangeAmount" jdbcType="DOUBLE" property="changeAmount" />
<result column="supplierName" jdbcType="VARCHAR" property="supplierName" />
<result column="oTime" jdbcType="VARCHAR" property="oTime" />
</resultMap>
<select id="selectByConditionDepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
select dh.*, d.name ProjectName, s.supplier OrganName, p.name HandsPersonName, a.name AccountName, dd.name AllocationProjectName
from jsh_depothead dh
left join jsh_depot d on dh.ProjectId=d.id
left join jsh_supplier s on dh.OrganId=s.id
left join jsh_person p on dh.HandsPersonId=p.id
left join jsh_account a on dh.AccountId=a.id
left join jsh_depot dd on dh.AllocationProjectId=dd.id
where 1=1
<if test="type != null">
and dh.Type='${type}'
</if>
<if test="subType != null">
and dh.SubType='${subType}'
</if>
<if test="number != null">
and dh.Number like '%${number}%'
</if>
<if test="dhIds != null">
and dh.Id in (${dhIds})
</if>
<if test="beginTime != null">
and dh.OperTime >= (${beginTime})
</if>
<if test="endTime != null">
and dh.OperTime &lt;= (${endTime})
</if>
order by dh.Id desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByDepotHead" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_depothead
WHERE 1=1
<if test="type != null">
and Type='${type}'
</if>
<if test="subType != null">
and SubType='${subType}'
</if>
<if test="number != null">
and Number like '%${number}%'
</if>
<if test="dhIds != null">
and Id in (${dhIds})
</if>
<if test="beginTime != null">
and OperTime >= (${beginTime})
</if>
<if test="endTime != null">
and OperTime &lt;= (${endTime})
</if>
</select>
<select id="getMaxId" resultType="java.lang.Long">
select max(Id) as Id from jsh_depothead
</select>
<select id="findMaterialsListByHeaderId" resultType="java.lang.String">
select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName from jsh_depotitem inner join jsh_material
on jsh_depotitem.MaterialId = jsh_material.Id where jsh_depotitem.HeaderId = ${id}
</select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select dh.Number,m.`name` MName,m.Model,di.UnitPrice,di.OperNumber,di.AllPrice,s.supplier SName,d.dName DName,
date_format(dh.OperTime, '%Y-%m-%d') OperTime, concat(dh.SubType,dh.Type) as NewType
from jsh_depothead dh inner join jsh_depotitem di on di.HeaderId=dh.id
inner join jsh_material m on m.id=di.MaterialId
inner join jsh_supplier s on s.id=dh.OrganId
inner join (select id,name as dName from jsh_depot) d on d.id=di.DepotId
where dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="oId != null">
and dh.OrganId = ${oId}
</if>
<if test="pid != null">
and di.DepotId = ${pid}
</if>
<if test="pid == null">
and di.DepotId in (${dids})
</if>
<if test="type != null">
and dh.Type='${type}'
</if>
ORDER BY OperTime DESC,Number desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findByAllCount" resultType="java.lang.Integer">
select count(1)
from jsh_depothead dh inner join jsh_depotitem di on di.HeaderId=dh.id
inner join jsh_material m on m.id=di.MaterialId
inner join jsh_supplier s on s.id=dh.OrganId
inner join (select id,name as dName from jsh_depot) d on d.id=di.DepotId
where dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="oId != null">
and dh.OrganId = ${oId}
</if>
<if test="pid != null">
and di.DepotId = ${pid}
</if>
<if test="pid == null">
and di.DepotId in (${dids})
</if>
<if test="type != null">
and dh.Type='${type}'
</if>
ORDER BY OperTime DESC,Number desc
</select>
<select id="findInOutMaterialCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultInOutMaterialCount">
select di.MaterialId, m.mName,m.Model,m.categoryName,
(select sum(jdi.BasicNumber) numSum from jsh_depothead jdh INNER JOIN jsh_depotitem jdi
on jdh.id=jdi.HeaderId where jdi.MaterialId=di.MaterialId
and jdh.type='${type}' and jdh.OperTime >='${beginTime}' and jdh.OperTime &lt;='${endTime}'
<if test="oId != null">
and jdh.OrganId = ${oId}
</if>
<if test="pid != null">
and jdi.DepotId= ${pid}
</if>
<if test="pid == null">
and jdi.DepotId in (${dids})
</if>
) numSum,
(select sum(jdi.AllPrice) priceSum from jsh_depothead jdh INNER JOIN jsh_depotitem jdi
on jdh.id=jdi.HeaderId where jdi.MaterialId=di.MaterialId
and jdh.type='${type}' and jdh.OperTime >='${beginTime}' and jdh.OperTime &lt;='${endTime}'
<if test="oId != null">
and jdh.OrganId = ${oId}
</if>
<if test="pid != null">
and jdi.DepotId= ${pid}
</if>
<if test="pid == null">
and jdi.DepotId in (${dids})
</if>
) priceSum
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName
from jsh_material INNER JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id) m
on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="oId != null">
and dh.OrganId = ${oId}
</if>
<if test="pid != null">
and di.DepotId= ${pid}
</if>
<if test="pid == null">
and di.DepotId in (${dids})
</if>
GROUP BY di.MaterialId,m.mName,m.Model,m.categoryName
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findInOutMaterialCountTotal" resultType="java.lang.Integer">
select count(1)
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName
from jsh_material INNER JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id) m
on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="oId != null">
and dh.OrganId = ${oId}
</if>
<if test="pid != null">
and di.DepotId= ${pid}
</if>
<if test="pid == null">
and di.DepotId in (${dids})
</if>
</select>
<select id="findStatementAccount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStatementAccount">
select dh.Number,concat(dh.SubType,dh.Type) as type,dh.DiscountLastMoney,dh.ChangeAmount,s.supplier supplierName,
date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime from jsh_depothead dh
inner join jsh_supplier s on s.id=dh.OrganId where s.type='${supType}' and dh.SubType!='其它'
and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="organId != null">
and dh.OrganId=${organId}
</if>
UNION ALL
select ah.BillNo Number,ah.Type as newType,ah.TotalPrice DiscountLastMoney,ah.ChangeAmount,s.supplier supplierName,
date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime from jsh_accounthead ah
inner join jsh_supplier s on s.id=ah.OrganId where s.type='${supType}'
and ah.BillTime >='${beginTime}' and ah.BillTime &lt;='${endTime}'
<if test="organId != null">
and ah.OrganId=${organId}
</if>
ORDER BY oTime
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findStatementAccountCount" resultType="java.lang.Integer">
select sum(a) from
(
select count(1) a from jsh_depothead dh
inner join jsh_supplier s on s.id=dh.OrganId where s.type='${supType}' and dh.SubType!='其它'
and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}'
<if test="organId != null">
and dh.OrganId=${organId}
</if>
UNION ALL
select count(1) a from jsh_accounthead ah
inner join jsh_supplier s on s.id=ah.OrganId where s.type='${supType}'
and ah.BillTime >='${beginTime}' and ah.BillTime &lt;='${endTime}'
<if test="organId != null">
and ah.OrganId=${organId}
</if>
) cc
</select>
<select id="findAllMoney" resultType="java.lang.Double">
select sum(${modeName}) as allMoney from jsh_depothead where Type='${type}' and SubType = '${subType}'
and OrganId =${supplierId} and OperTime &lt;='${endTime}'
</select>
<select id="getDetailByNumber" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
select dh.*, d.name ProjectName, s.supplier OrganName, p.name HandsPersonName, a.name AccountName, dd.name AllocationProjectName
from jsh_depothead dh
left join jsh_depot d on dh.ProjectId=d.id
left join jsh_supplier s on dh.OrganId=s.id
left join jsh_person p on dh.HandsPersonId=p.id
left join jsh_account a on dh.AccountId=a.id
left join jsh_depot dd on dh.AllocationProjectId=dd.id
where 1=1
<if test="number != null">
and dh.Number='${number}'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,555 @@
<?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.DepotItemMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="HeaderId" jdbcType="BIGINT" property="headerid" />
<result column="MaterialId" jdbcType="BIGINT" property="materialid" />
<result column="MUnit" jdbcType="VARCHAR" property="munit" />
<result column="OperNumber" jdbcType="DOUBLE" property="opernumber" />
<result column="BasicNumber" jdbcType="DOUBLE" property="basicnumber" />
<result column="UnitPrice" jdbcType="DOUBLE" property="unitprice" />
<result column="TaxUnitPrice" jdbcType="DOUBLE" property="taxunitprice" />
<result column="AllPrice" jdbcType="DOUBLE" property="allprice" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="Img" jdbcType="VARCHAR" property="img" />
<result column="Incidentals" jdbcType="DOUBLE" property="incidentals" />
<result column="DepotId" jdbcType="BIGINT" property="depotid" />
<result column="AnotherDepotId" jdbcType="BIGINT" property="anotherdepotid" />
<result column="TaxRate" jdbcType="DOUBLE" property="taxrate" />
<result column="TaxMoney" jdbcType="DOUBLE" property="taxmoney" />
<result column="TaxLastMoney" jdbcType="DOUBLE" property="taxlastmoney" />
<result column="OtherField1" jdbcType="VARCHAR" property="otherfield1" />
<result column="OtherField2" jdbcType="VARCHAR" property="otherfield2" />
<result column="OtherField3" jdbcType="VARCHAR" property="otherfield3" />
<result column="OtherField4" jdbcType="VARCHAR" property="otherfield4" />
<result column="OtherField5" jdbcType="VARCHAR" property="otherfield5" />
<result column="MType" jdbcType="VARCHAR" property="mtype" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, HeaderId, MaterialId, MUnit, OperNumber, BasicNumber, UnitPrice, TaxUnitPrice,
AllPrice, Remark, Img, Incidentals, DepotId, AnotherDepotId, TaxRate, TaxMoney, TaxLastMoney,
OtherField1, OtherField2, OtherField3, OtherField4, OtherField5, MType
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" 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_depotitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_depotitem
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_depotitem
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_depotitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.DepotItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depotitem (Id, HeaderId, MaterialId,
MUnit, OperNumber, BasicNumber,
UnitPrice, TaxUnitPrice, AllPrice,
Remark, Img, Incidentals,
DepotId, AnotherDepotId, TaxRate,
TaxMoney, TaxLastMoney, OtherField1,
OtherField2, OtherField3, OtherField4,
OtherField5, MType)
values (#{id,jdbcType=BIGINT}, #{headerid,jdbcType=BIGINT}, #{materialid,jdbcType=BIGINT},
#{munit,jdbcType=VARCHAR}, #{opernumber,jdbcType=DOUBLE}, #{basicnumber,jdbcType=DOUBLE},
#{unitprice,jdbcType=DOUBLE}, #{taxunitprice,jdbcType=DOUBLE}, #{allprice,jdbcType=DOUBLE},
#{remark,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, #{incidentals,jdbcType=DOUBLE},
#{depotid,jdbcType=BIGINT}, #{anotherdepotid,jdbcType=BIGINT}, #{taxrate,jdbcType=DOUBLE},
#{taxmoney,jdbcType=DOUBLE}, #{taxlastmoney,jdbcType=DOUBLE}, #{otherfield1,jdbcType=VARCHAR},
#{otherfield2,jdbcType=VARCHAR}, #{otherfield3,jdbcType=VARCHAR}, #{otherfield4,jdbcType=VARCHAR},
#{otherfield5,jdbcType=VARCHAR}, #{mtype,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depotitem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="headerid != null">
HeaderId,
</if>
<if test="materialid != null">
MaterialId,
</if>
<if test="munit != null">
MUnit,
</if>
<if test="opernumber != null">
OperNumber,
</if>
<if test="basicnumber != null">
BasicNumber,
</if>
<if test="unitprice != null">
UnitPrice,
</if>
<if test="taxunitprice != null">
TaxUnitPrice,
</if>
<if test="allprice != null">
AllPrice,
</if>
<if test="remark != null">
Remark,
</if>
<if test="img != null">
Img,
</if>
<if test="incidentals != null">
Incidentals,
</if>
<if test="depotid != null">
DepotId,
</if>
<if test="anotherdepotid != null">
AnotherDepotId,
</if>
<if test="taxrate != null">
TaxRate,
</if>
<if test="taxmoney != null">
TaxMoney,
</if>
<if test="taxlastmoney != null">
TaxLastMoney,
</if>
<if test="otherfield1 != null">
OtherField1,
</if>
<if test="otherfield2 != null">
OtherField2,
</if>
<if test="otherfield3 != null">
OtherField3,
</if>
<if test="otherfield4 != null">
OtherField4,
</if>
<if test="otherfield5 != null">
OtherField5,
</if>
<if test="mtype != null">
MType,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="headerid != null">
#{headerid,jdbcType=BIGINT},
</if>
<if test="materialid != null">
#{materialid,jdbcType=BIGINT},
</if>
<if test="munit != null">
#{munit,jdbcType=VARCHAR},
</if>
<if test="opernumber != null">
#{opernumber,jdbcType=DOUBLE},
</if>
<if test="basicnumber != null">
#{basicnumber,jdbcType=DOUBLE},
</if>
<if test="unitprice != null">
#{unitprice,jdbcType=DOUBLE},
</if>
<if test="taxunitprice != null">
#{taxunitprice,jdbcType=DOUBLE},
</if>
<if test="allprice != null">
#{allprice,jdbcType=DOUBLE},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="img != null">
#{img,jdbcType=VARCHAR},
</if>
<if test="incidentals != null">
#{incidentals,jdbcType=DOUBLE},
</if>
<if test="depotid != null">
#{depotid,jdbcType=BIGINT},
</if>
<if test="anotherdepotid != null">
#{anotherdepotid,jdbcType=BIGINT},
</if>
<if test="taxrate != null">
#{taxrate,jdbcType=DOUBLE},
</if>
<if test="taxmoney != null">
#{taxmoney,jdbcType=DOUBLE},
</if>
<if test="taxlastmoney != null">
#{taxlastmoney,jdbcType=DOUBLE},
</if>
<if test="otherfield1 != null">
#{otherfield1,jdbcType=VARCHAR},
</if>
<if test="otherfield2 != null">
#{otherfield2,jdbcType=VARCHAR},
</if>
<if test="otherfield3 != null">
#{otherfield3,jdbcType=VARCHAR},
</if>
<if test="otherfield4 != null">
#{otherfield4,jdbcType=VARCHAR},
</if>
<if test="otherfield5 != null">
#{otherfield5,jdbcType=VARCHAR},
</if>
<if test="mtype != null">
#{mtype,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_depotitem
<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_depotitem
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.headerid != null">
HeaderId = #{record.headerid,jdbcType=BIGINT},
</if>
<if test="record.materialid != null">
MaterialId = #{record.materialid,jdbcType=BIGINT},
</if>
<if test="record.munit != null">
MUnit = #{record.munit,jdbcType=VARCHAR},
</if>
<if test="record.opernumber != null">
OperNumber = #{record.opernumber,jdbcType=DOUBLE},
</if>
<if test="record.basicnumber != null">
BasicNumber = #{record.basicnumber,jdbcType=DOUBLE},
</if>
<if test="record.unitprice != null">
UnitPrice = #{record.unitprice,jdbcType=DOUBLE},
</if>
<if test="record.taxunitprice != null">
TaxUnitPrice = #{record.taxunitprice,jdbcType=DOUBLE},
</if>
<if test="record.allprice != null">
AllPrice = #{record.allprice,jdbcType=DOUBLE},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.img != null">
Img = #{record.img,jdbcType=VARCHAR},
</if>
<if test="record.incidentals != null">
Incidentals = #{record.incidentals,jdbcType=DOUBLE},
</if>
<if test="record.depotid != null">
DepotId = #{record.depotid,jdbcType=BIGINT},
</if>
<if test="record.anotherdepotid != null">
AnotherDepotId = #{record.anotherdepotid,jdbcType=BIGINT},
</if>
<if test="record.taxrate != null">
TaxRate = #{record.taxrate,jdbcType=DOUBLE},
</if>
<if test="record.taxmoney != null">
TaxMoney = #{record.taxmoney,jdbcType=DOUBLE},
</if>
<if test="record.taxlastmoney != null">
TaxLastMoney = #{record.taxlastmoney,jdbcType=DOUBLE},
</if>
<if test="record.otherfield1 != null">
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
</if>
<if test="record.otherfield2 != null">
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR},
</if>
<if test="record.otherfield3 != null">
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR},
</if>
<if test="record.otherfield4 != null">
OtherField4 = #{record.otherfield4,jdbcType=VARCHAR},
</if>
<if test="record.otherfield5 != null">
OtherField5 = #{record.otherfield5,jdbcType=VARCHAR},
</if>
<if test="record.mtype != null">
MType = #{record.mtype,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depotitem
set Id = #{record.id,jdbcType=BIGINT},
HeaderId = #{record.headerid,jdbcType=BIGINT},
MaterialId = #{record.materialid,jdbcType=BIGINT},
MUnit = #{record.munit,jdbcType=VARCHAR},
OperNumber = #{record.opernumber,jdbcType=DOUBLE},
BasicNumber = #{record.basicnumber,jdbcType=DOUBLE},
UnitPrice = #{record.unitprice,jdbcType=DOUBLE},
TaxUnitPrice = #{record.taxunitprice,jdbcType=DOUBLE},
AllPrice = #{record.allprice,jdbcType=DOUBLE},
Remark = #{record.remark,jdbcType=VARCHAR},
Img = #{record.img,jdbcType=VARCHAR},
Incidentals = #{record.incidentals,jdbcType=DOUBLE},
DepotId = #{record.depotid,jdbcType=BIGINT},
AnotherDepotId = #{record.anotherdepotid,jdbcType=BIGINT},
TaxRate = #{record.taxrate,jdbcType=DOUBLE},
TaxMoney = #{record.taxmoney,jdbcType=DOUBLE},
TaxLastMoney = #{record.taxlastmoney,jdbcType=DOUBLE},
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR},
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR},
OtherField4 = #{record.otherfield4,jdbcType=VARCHAR},
OtherField5 = #{record.otherfield5,jdbcType=VARCHAR},
MType = #{record.mtype,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.DepotItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depotitem
<set>
<if test="headerid != null">
HeaderId = #{headerid,jdbcType=BIGINT},
</if>
<if test="materialid != null">
MaterialId = #{materialid,jdbcType=BIGINT},
</if>
<if test="munit != null">
MUnit = #{munit,jdbcType=VARCHAR},
</if>
<if test="opernumber != null">
OperNumber = #{opernumber,jdbcType=DOUBLE},
</if>
<if test="basicnumber != null">
BasicNumber = #{basicnumber,jdbcType=DOUBLE},
</if>
<if test="unitprice != null">
UnitPrice = #{unitprice,jdbcType=DOUBLE},
</if>
<if test="taxunitprice != null">
TaxUnitPrice = #{taxunitprice,jdbcType=DOUBLE},
</if>
<if test="allprice != null">
AllPrice = #{allprice,jdbcType=DOUBLE},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="img != null">
Img = #{img,jdbcType=VARCHAR},
</if>
<if test="incidentals != null">
Incidentals = #{incidentals,jdbcType=DOUBLE},
</if>
<if test="depotid != null">
DepotId = #{depotid,jdbcType=BIGINT},
</if>
<if test="anotherdepotid != null">
AnotherDepotId = #{anotherdepotid,jdbcType=BIGINT},
</if>
<if test="taxrate != null">
TaxRate = #{taxrate,jdbcType=DOUBLE},
</if>
<if test="taxmoney != null">
TaxMoney = #{taxmoney,jdbcType=DOUBLE},
</if>
<if test="taxlastmoney != null">
TaxLastMoney = #{taxlastmoney,jdbcType=DOUBLE},
</if>
<if test="otherfield1 != null">
OtherField1 = #{otherfield1,jdbcType=VARCHAR},
</if>
<if test="otherfield2 != null">
OtherField2 = #{otherfield2,jdbcType=VARCHAR},
</if>
<if test="otherfield3 != null">
OtherField3 = #{otherfield3,jdbcType=VARCHAR},
</if>
<if test="otherfield4 != null">
OtherField4 = #{otherfield4,jdbcType=VARCHAR},
</if>
<if test="otherfield5 != null">
OtherField5 = #{otherfield5,jdbcType=VARCHAR},
</if>
<if test="mtype != null">
MType = #{mtype,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.DepotItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depotitem
set HeaderId = #{headerid,jdbcType=BIGINT},
MaterialId = #{materialid,jdbcType=BIGINT},
MUnit = #{munit,jdbcType=VARCHAR},
OperNumber = #{opernumber,jdbcType=DOUBLE},
BasicNumber = #{basicnumber,jdbcType=DOUBLE},
UnitPrice = #{unitprice,jdbcType=DOUBLE},
TaxUnitPrice = #{taxunitprice,jdbcType=DOUBLE},
AllPrice = #{allprice,jdbcType=DOUBLE},
Remark = #{remark,jdbcType=VARCHAR},
Img = #{img,jdbcType=VARCHAR},
Incidentals = #{incidentals,jdbcType=DOUBLE},
DepotId = #{depotid,jdbcType=BIGINT},
AnotherDepotId = #{anotherdepotid,jdbcType=BIGINT},
TaxRate = #{taxrate,jdbcType=DOUBLE},
TaxMoney = #{taxmoney,jdbcType=DOUBLE},
TaxLastMoney = #{taxlastmoney,jdbcType=DOUBLE},
OtherField1 = #{otherfield1,jdbcType=VARCHAR},
OtherField2 = #{otherfield2,jdbcType=VARCHAR},
OtherField3 = #{otherfield3,jdbcType=VARCHAR},
OtherField4 = #{otherfield4,jdbcType=VARCHAR},
OtherField5 = #{otherfield5,jdbcType=VARCHAR},
MType = #{mtype,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,268 @@
<?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.DepotItemMapper">
<resultMap id="HeaderIdResultMap" type="com.jsh.erp.datasource.entities.DepotItemVo4HeaderId">
<result column="HeaderId" jdbcType="BIGINT" property="headerid" />
</resultMap>
<resultMap id="DetailByTypeAndMIdResultMap" type="com.jsh.erp.datasource.entities.DepotItemVo4DetailByTypeAndMId">
<result column="Number" jdbcType="VARCHAR" property="number" />
<result column="newType" jdbcType="VARCHAR" property="newtype" />
<result column="b_num" jdbcType="BIGINT" property="bnum" />
<result column="oTime" jdbcType="TIMESTAMP" property="otime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultAndMaterialMap" type="com.jsh.erp.datasource.entities.DepotItemVo4Material">
<result column="mName" jdbcType="VARCHAR" property="mname" />
<result column="mModel" jdbcType="VARCHAR" property="mmodel" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultWithInfoExMap" type="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
<result column="MName" jdbcType="VARCHAR" property="MName" />
<result column="MModel" jdbcType="VARCHAR" property="MModel" />
<result column="MaterialUnit" jdbcType="VARCHAR" property="MaterialUnit" />
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
<result column="MStandard" jdbcType="VARCHAR" property="MStandard" />
<result column="MMfrs" jdbcType="VARCHAR" property="MMfrs" />
<result column="MOtherField1" jdbcType="VARCHAR" property="MOtherField1" />
<result column="MOtherField2" jdbcType="VARCHAR" property="MOtherField2" />
<result column="MOtherField3" jdbcType="VARCHAR" property="MOtherField3" />
<result column="DepotName" jdbcType="VARCHAR" property="DepotName" />
<result column="AnotherDepotName" jdbcType="VARCHAR" property="AnotherDepotName" />
<result column="UnitId" jdbcType="BIGINT" property="UnitId" />
<result column="UName" jdbcType="VARCHAR" property="UName" />
</resultMap>
<select id="selectByConditionDepotItem" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="BaseResultMap">
select *
FROM jsh_depotitem
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByDepotItem" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_depotitem
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
</select>
<select id="getHeaderIdByMaterial" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="HeaderIdResultMap">
select dt.HeaderId from jsh_depotitem dt INNER JOIN jsh_material m on dt.MaterialId = m.Id
where (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%')
<if test="depotIds != null">
and dt.DepotId in (${depotIds})
</if>
</select>
<select id="findDetailByTypeAndMaterialIdList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="DetailByTypeAndMIdResultMap">
select dh.Number,concat(dh.SubType,dh.Type) as newType,
case when type='入库' then di.BasicNumber when type='出库' then 0-di.BasicNumber else 0 end as b_num,
date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type!='其它'
and SubType!='调拨' and SubType!='礼品充值'
and MaterialId =${mId} ORDER BY oTime desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findDetailByTypeAndMaterialIdCounts" resultType="java.lang.Integer">
select count(1)
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type!='其它'
and SubType!='调拨' and SubType!='礼品充值'
and MaterialId =${mId}
</select>
<select id="findStockNumByMaterialIdList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultAndMaterialMap">
select di.*,m.Name mName,m.Model mModel from jsh_depotitem di inner join jsh_material m on di.MaterialId=m.Id where 1=1
<if test="mId != null">
and MaterialId=${mId}
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findStockNumByMaterialIdCounts" resultType="java.lang.Integer">
select count(*) from jsh_depotitem where 1=1
<if test="mId != null">
and MaterialId=${mId}
</if>
</select>
<select id="findByTypeAndMaterialIdIn" resultType="java.lang.Integer">
select ifnull(sum(BasicNumber),0) as BasicNumber from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type='入库'
and MaterialId = ${mId}
</select>
<select id="findByTypeAndMaterialIdOut" resultType="java.lang.Integer">
select ifnull(sum(BasicNumber),0) as BasicNumber from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type='出库'
and SubType!='调拨' and SubType!='礼品充值' and MaterialId = ${mId}
</select>
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select di.*,m.Name MName,m.Model MModel,m.Unit MaterialUnit,m.Color MColor,m.Standard MStandard,m.Mfrs MMfrs,
m.OtherField1 MOtherField1,m.OtherField2 MOtherField2,m.OtherField3 MOtherField3,
dp1.name DepotName,dp2.name AnotherDepotName, u.id UnitId, u.UName
from jsh_depotitem di left join jsh_material m on di.MaterialId=m.id
left join jsh_unit u on m.UnitId = u.id
left join jsh_depot dp1 on di.DepotId=dp1.id
left join jsh_depot dp2 on di.AnotherDepotId=dp1.id
where di.HeaderId = ${headerId}
order by di.id asc
</select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select di.*, m.Name MName, m.Model MModel, m.Unit MaterialUnit, m.Color MColor
from jsh_depotitem di
inner join jsh_material m on di.MaterialId=m.id
where 1=1
<if test="headIds != null">
and HeaderId in (${headIds})
</if>
<if test="materialIds != null">
and MaterialId in (${materialIds})
</if>
group by MaterialId
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findByAllCount" resultType="java.lang.Integer">
select count(1)
from jsh_depotitem di
inner join jsh_material m on di.MaterialId=m.id
where 1=1
<if test="headIds != null">
and HeaderId in (${headIds})
</if>
<if test="materialIds != null">
and MaterialId in (${materialIds})
</if>
</select>
<select id="findByTypeInIsPrev" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(SubType='礼品充值' and AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime &lt; '${MonthTime}-01 00:00:00'
</select>
<select id="findByTypeInIsNotPrev" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(SubType='礼品充值' and AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime &gt;= '${MonthTime}-01 00:00:00'
and dh.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="findByTypeOutIsPrev" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime &lt; '${MonthTime}-01 00:00:00'
</select>
<select id="findByTypeOutIsNotPrev" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="findPriceByTypeInIsPrev" resultType="java.lang.Double">
select sum(AllPrice) as AllPrice from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(SubType='礼品充值' and AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime &lt; '${MonthTime}-01 00:00:00'
</select>
<select id="findPriceByTypeInIsNotPrev" resultType="java.lang.Double">
select sum(AllPrice) as AllPrice from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
or
(SubType='调拨' and AnotherDepotId=${ProjectId})
or
(SubType='礼品充值' and AnotherDepotId=${ProjectId}))
and MaterialId = ${MId} and dh.OperTime &gt;= '${MonthTime}-01 00:00:00'
and dh.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="findPriceByTypeOutIsPrev" resultType="java.lang.Double">
select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime &lt; '${MonthTime}-01 00:00:00'
</select>
<select id="findPriceByTypeOutIsNotPrev" resultType="java.lang.Double">
select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="buyOrSaleNumber" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and type='${type}' and subType='${subType}'
and MaterialId =${MId} and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="buyOrSalePrice" resultType="java.lang.Double">
select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and type='${type}' and subType='${subType}'
and MaterialId =${MId} and jsh_depothead.OperTime &gt;= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime &lt;= '${MonthTime}-31 59:59:59'
</select>
<select id="findGiftByTypeIn" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and jsh_depothead.SubType='${subType}'
and jsh_depotitem.AnotherDepotId=${ProjectId}
and jsh_depotitem.MaterialId =${MId}
</select>
<select id="findGiftByTypeOut" resultType="java.lang.Double">
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and jsh_depothead.SubType='${subType}'
and jsh_depotitem.DepotId=${ProjectId}
and jsh_depotitem.MaterialId =${MId}
</select>
</mapper>

View File

@@ -0,0 +1,318 @@
<?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.DepotMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Depot">
<!--
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="address" jdbcType="VARCHAR" property="address" />
<result column="warehousing" jdbcType="DOUBLE" property="warehousing" />
<result column="truckage" jdbcType="DOUBLE" property="truckage" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="sort" jdbcType="VARCHAR" property="sort" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, name, address, warehousing, truckage, type, sort, remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" 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_depot
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_depot
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_depot
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_depot
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Depot">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depot (id, name, address,
warehousing, truckage, type,
sort, remark)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{warehousing,jdbcType=DOUBLE}, #{truckage,jdbcType=DOUBLE}, #{type,jdbcType=INTEGER},
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Depot">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depot
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="address != null">
address,
</if>
<if test="warehousing != null">
warehousing,
</if>
<if test="truckage != null">
truckage,
</if>
<if test="type != null">
type,
</if>
<if test="sort != null">
sort,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="warehousing != null">
#{warehousing,jdbcType=DOUBLE},
</if>
<if test="truckage != null">
#{truckage,jdbcType=DOUBLE},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_depot
<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_depot
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.address != null">
address = #{record.address,jdbcType=VARCHAR},
</if>
<if test="record.warehousing != null">
warehousing = #{record.warehousing,jdbcType=DOUBLE},
</if>
<if test="record.truckage != null">
truckage = #{record.truckage,jdbcType=DOUBLE},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depot
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
address = #{record.address,jdbcType=VARCHAR},
warehousing = #{record.warehousing,jdbcType=DOUBLE},
truckage = #{record.truckage,jdbcType=DOUBLE},
type = #{record.type,jdbcType=INTEGER},
sort = #{record.sort,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Depot">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depot
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="warehousing != null">
warehousing = #{warehousing,jdbcType=DOUBLE},
</if>
<if test="truckage != null">
truckage = #{truckage,jdbcType=DOUBLE},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Depot">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depot
set name = #{name,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
warehousing = #{warehousing,jdbcType=DOUBLE},
truckage = #{truckage,jdbcType=DOUBLE},
type = #{type,jdbcType=INTEGER},
sort = #{sort,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,36 @@
<?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.DepotMapper">
<select id="selectByConditionDepot" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="BaseResultMap">
select *
FROM jsh_depot
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByDepot" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_depot
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type=${type}
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,348 @@
<?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" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Number, Name, PNumber, URL, State, Sort, Enabled, Type, PushBtn
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.FunctionsExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_functions
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_functions
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_functions
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.FunctionsExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_functions
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_functions (Id, Number, Name,
PNumber, URL, State, Sort,
Enabled, Type, PushBtn)
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})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_functions
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="number != null">
Number,
</if>
<if test="name != null">
Name,
</if>
<if test="pnumber != null">
PNumber,
</if>
<if test="url != null">
URL,
</if>
<if test="state != null">
State,
</if>
<if test="sort != null">
Sort,
</if>
<if test="enabled != null">
Enabled,
</if>
<if test="type != null">
Type,
</if>
<if test="pushbtn != null">
PushBtn,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="number != null">
#{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="pnumber != null">
#{pnumber,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="state != null">
#{state,jdbcType=BIT},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="pushbtn != null">
#{pushbtn,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.FunctionsExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_functions
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.number != null">
Number = #{record.number,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.pnumber != null">
PNumber = #{record.pnumber,jdbcType=VARCHAR},
</if>
<if test="record.url != null">
URL = #{record.url,jdbcType=VARCHAR},
</if>
<if test="record.state != null">
State = #{record.state,jdbcType=BIT},
</if>
<if test="record.sort != null">
Sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
Enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.pushbtn != null">
PushBtn = #{record.pushbtn,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
set Id = #{record.id,jdbcType=BIGINT},
Number = #{record.number,jdbcType=VARCHAR},
Name = #{record.name,jdbcType=VARCHAR},
PNumber = #{record.pnumber,jdbcType=VARCHAR},
URL = #{record.url,jdbcType=VARCHAR},
State = #{record.state,jdbcType=BIT},
Sort = #{record.sort,jdbcType=VARCHAR},
Enabled = #{record.enabled,jdbcType=BIT},
Type = #{record.type,jdbcType=VARCHAR},
PushBtn = #{record.pushbtn,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
<set>
<if test="number != null">
Number = #{number,jdbcType=VARCHAR},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="pnumber != null">
PNumber = #{pnumber,jdbcType=VARCHAR},
</if>
<if test="url != null">
URL = #{url,jdbcType=VARCHAR},
</if>
<if test="state != null">
State = #{state,jdbcType=BIT},
</if>
<if test="sort != null">
Sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
Enabled = #{enabled,jdbcType=BIT},
</if>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="pushbtn != null">
PushBtn = #{pushbtn,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Functions">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_functions
set Number = #{number,jdbcType=VARCHAR},
Name = #{name,jdbcType=VARCHAR},
PNumber = #{pnumber,jdbcType=VARCHAR},
URL = #{url,jdbcType=VARCHAR},
State = #{state,jdbcType=BIT},
Sort = #{sort,jdbcType=VARCHAR},
Enabled = #{enabled,jdbcType=BIT},
Type = #{type,jdbcType=VARCHAR},
PushBtn = #{pushbtn,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,30 @@
<?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">
<select id="selectByConditionFunctions" parameterType="com.jsh.erp.datasource.entities.FunctionsExample" resultMap="BaseResultMap">
select *
FROM jsh_functions
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByFunctions" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_functions
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,256 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.InOutItemMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, Type, Remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_inoutitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_inoutitem
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_inoutitem
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_inoutitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_inoutitem (Id, Name, Type,
Remark)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_inoutitem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="type != null">
Type,
</if>
<if test="remark != null">
Remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.InOutItemExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_inoutitem
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
Type = #{record.type,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.InOutItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_inoutitem
set Name = #{name,jdbcType=VARCHAR},
Type = #{type,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.InOutItemMapper">
<select id="selectByConditionInOutItem" parameterType="com.jsh.erp.datasource.entities.InOutItemExample" resultMap="BaseResultMap">
select *
FROM jsh_inoutitem
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByInOutItem" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_inoutitem
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="remark != null">
and remark like '%${remark}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,318 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.LogMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="userID" jdbcType="BIGINT" property="userid" />
<result column="operation" jdbcType="VARCHAR" property="operation" />
<result column="clientIP" jdbcType="VARCHAR" property="clientip" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="contentdetails" jdbcType="VARCHAR" property="contentdetails" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, userID, operation, clientIP, createtime, status, contentdetails, remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.LogExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_log
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.LogExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_log (id, userID, operation,
clientIP, createtime, status,
contentdetails, remark)
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})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userid != null">
userID,
</if>
<if test="operation != null">
operation,
</if>
<if test="clientip != null">
clientIP,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="status != null">
status,
</if>
<if test="contentdetails != null">
contentdetails,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="userid != null">
#{userid,jdbcType=BIGINT},
</if>
<if test="operation != null">
#{operation,jdbcType=VARCHAR},
</if>
<if test="clientip != null">
#{clientip,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="contentdetails != null">
#{contentdetails,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.LogExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userid != null">
userID = #{record.userid,jdbcType=BIGINT},
</if>
<if test="record.operation != null">
operation = #{record.operation,jdbcType=VARCHAR},
</if>
<if test="record.clientip != null">
clientIP = #{record.clientip,jdbcType=VARCHAR},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.contentdetails != null">
contentdetails = #{record.contentdetails,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
set id = #{record.id,jdbcType=BIGINT},
userID = #{record.userid,jdbcType=BIGINT},
operation = #{record.operation,jdbcType=VARCHAR},
clientIP = #{record.clientip,jdbcType=VARCHAR},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
status = #{record.status,jdbcType=TINYINT},
contentdetails = #{record.contentdetails,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
<set>
<if test="userid != null">
userID = #{userid,jdbcType=BIGINT},
</if>
<if test="operation != null">
operation = #{operation,jdbcType=VARCHAR},
</if>
<if test="clientip != null">
clientIP = #{clientip,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="contentdetails != null">
contentdetails = #{contentdetails,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Log">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_log
set userID = #{userid,jdbcType=BIGINT},
operation = #{operation,jdbcType=VARCHAR},
clientIP = #{clientip,jdbcType=VARCHAR},
createtime = #{createtime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=TINYINT},
contentdetails = #{contentdetails,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.LogMapper">
<select id="selectByConditionLog" parameterType="com.jsh.erp.datasource.entities.LogExample" resultMap="BaseResultMap">
select *
FROM jsh_log
where 1=1
<if test="operation != null">
and operation like '%${operation}%'
</if>
<if test="usernameID != null">
and userID=${usernameID}
</if>
<if test="clientIp != null">
and clientIp like '%${clientIp}%'
</if>
<if test="status != null">
and status=${status}
</if>
<if test="beginTime != null">
and createtime gt;= '%${beginTime}%'
</if>
<if test="endTime != null">
and createtime lt;= '%${endTime}%'
</if>
<if test="contentdetails != null">
and contentdetails like '%${contentdetails}%'
</if>
order by createtime desc
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByLog" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_log
WHERE 1=1
<if test="operation != null">
and operation like '%${operation}%'
</if>
<if test="usernameID != null">
and userID=${usernameID}
</if>
<if test="clientIp != null">
and clientIp like '%${clientIp}%'
</if>
<if test="status != null">
and status = ${status}
</if>
<if test="beginTime != null">
and createtime &gt;= '${beginTime}'
</if>
<if test="endTime != null">
and createtime &lt;= '${endTime}'
</if>
<if test="contentdetails != null">
and contentdetails like '%${contentdetails}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,256 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialCategoryMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="CategoryLevel" jdbcType="SMALLINT" property="categorylevel" />
<result column="ParentId" jdbcType="BIGINT" property="parentid" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, CategoryLevel, ParentId
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_materialcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_materialcategory
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialcategory
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialcategory (Id, Name, CategoryLevel,
ParentId)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{categorylevel,jdbcType=SMALLINT},
#{parentid,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialcategory
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="categorylevel != null">
CategoryLevel,
</if>
<if test="parentid != null">
ParentId,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="categorylevel != null">
#{categorylevel,jdbcType=SMALLINT},
</if>
<if test="parentid != null">
#{parentid,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_materialcategory
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.categorylevel != null">
CategoryLevel = #{record.categorylevel,jdbcType=SMALLINT},
</if>
<if test="record.parentid != null">
ParentId = #{record.parentid,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
CategoryLevel = #{record.categorylevel,jdbcType=SMALLINT},
ParentId = #{record.parentid,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="categorylevel != null">
CategoryLevel = #{categorylevel,jdbcType=SMALLINT},
</if>
<if test="parentid != null">
ParentId = #{parentid,jdbcType=BIGINT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.MaterialCategory">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialcategory
set Name = #{name,jdbcType=VARCHAR},
CategoryLevel = #{categorylevel,jdbcType=SMALLINT},
ParentId = #{parentid,jdbcType=BIGINT}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialCategoryMapper">
<select id="selectByConditionMaterialCategory" parameterType="com.jsh.erp.datasource.entities.MaterialCategoryExample" resultMap="BaseResultMap">
select *
FROM jsh_materialcategory
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="parentId != null">
and parentId = ${parentId}
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByMaterialCategory" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_materialcategory
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="parentId != null">
and parentId = ${parentId}
</if>
</select>
</mapper>

View File

@@ -0,0 +1,555 @@
<?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.MaterialMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Material">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="CategoryId" jdbcType="BIGINT" property="categoryid" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="Mfrs" jdbcType="VARCHAR" property="mfrs" />
<result column="Packing" jdbcType="DOUBLE" property="packing" />
<result column="SafetyStock" jdbcType="DOUBLE" property="safetystock" />
<result column="Model" jdbcType="VARCHAR" property="model" />
<result column="Standard" jdbcType="VARCHAR" property="standard" />
<result column="Color" jdbcType="VARCHAR" property="color" />
<result column="Unit" jdbcType="VARCHAR" property="unit" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="RetailPrice" jdbcType="DOUBLE" property="retailprice" />
<result column="LowPrice" jdbcType="DOUBLE" property="lowprice" />
<result column="PresetPriceOne" jdbcType="DOUBLE" property="presetpriceone" />
<result column="PresetPriceTwo" jdbcType="DOUBLE" property="presetpricetwo" />
<result column="UnitId" jdbcType="BIGINT" property="unitid" />
<result column="FirstOutUnit" jdbcType="VARCHAR" property="firstoutunit" />
<result column="FirstInUnit" jdbcType="VARCHAR" property="firstinunit" />
<result column="PriceStrategy" jdbcType="VARCHAR" property="pricestrategy" />
<result column="Enabled" jdbcType="BIT" property="enabled" />
<result column="OtherField1" jdbcType="VARCHAR" property="otherfield1" />
<result column="OtherField2" jdbcType="VARCHAR" property="otherfield2" />
<result column="OtherField3" jdbcType="VARCHAR" property="otherfield3" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, CategoryId, Name, Mfrs, Packing, SafetyStock, Model, Standard, Color, Unit, Remark,
RetailPrice, LowPrice, PresetPriceOne, PresetPriceTwo, UnitId, FirstOutUnit, FirstInUnit,
PriceStrategy, Enabled, OtherField1, OtherField2, OtherField3
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" 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_material
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_material
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_material
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_material
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Material">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_material (Id, CategoryId, Name,
Mfrs, Packing, SafetyStock,
Model, Standard, Color,
Unit, Remark, RetailPrice,
LowPrice, PresetPriceOne, PresetPriceTwo,
UnitId, FirstOutUnit, FirstInUnit,
PriceStrategy, Enabled, OtherField1,
OtherField2, OtherField3)
values (#{id,jdbcType=BIGINT}, #{categoryid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{mfrs,jdbcType=VARCHAR}, #{packing,jdbcType=DOUBLE}, #{safetystock,jdbcType=DOUBLE},
#{model,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR}, #{color,jdbcType=VARCHAR},
#{unit,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{retailprice,jdbcType=DOUBLE},
#{lowprice,jdbcType=DOUBLE}, #{presetpriceone,jdbcType=DOUBLE}, #{presetpricetwo,jdbcType=DOUBLE},
#{unitid,jdbcType=BIGINT}, #{firstoutunit,jdbcType=VARCHAR}, #{firstinunit,jdbcType=VARCHAR},
#{pricestrategy,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT}, #{otherfield1,jdbcType=VARCHAR},
#{otherfield2,jdbcType=VARCHAR}, #{otherfield3,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Material">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_material
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="categoryid != null">
CategoryId,
</if>
<if test="name != null">
Name,
</if>
<if test="mfrs != null">
Mfrs,
</if>
<if test="packing != null">
Packing,
</if>
<if test="safetystock != null">
SafetyStock,
</if>
<if test="model != null">
Model,
</if>
<if test="standard != null">
Standard,
</if>
<if test="color != null">
Color,
</if>
<if test="unit != null">
Unit,
</if>
<if test="remark != null">
Remark,
</if>
<if test="retailprice != null">
RetailPrice,
</if>
<if test="lowprice != null">
LowPrice,
</if>
<if test="presetpriceone != null">
PresetPriceOne,
</if>
<if test="presetpricetwo != null">
PresetPriceTwo,
</if>
<if test="unitid != null">
UnitId,
</if>
<if test="firstoutunit != null">
FirstOutUnit,
</if>
<if test="firstinunit != null">
FirstInUnit,
</if>
<if test="pricestrategy != null">
PriceStrategy,
</if>
<if test="enabled != null">
Enabled,
</if>
<if test="otherfield1 != null">
OtherField1,
</if>
<if test="otherfield2 != null">
OtherField2,
</if>
<if test="otherfield3 != null">
OtherField3,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="categoryid != null">
#{categoryid,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="mfrs != null">
#{mfrs,jdbcType=VARCHAR},
</if>
<if test="packing != null">
#{packing,jdbcType=DOUBLE},
</if>
<if test="safetystock != null">
#{safetystock,jdbcType=DOUBLE},
</if>
<if test="model != null">
#{model,jdbcType=VARCHAR},
</if>
<if test="standard != null">
#{standard,jdbcType=VARCHAR},
</if>
<if test="color != null">
#{color,jdbcType=VARCHAR},
</if>
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="retailprice != null">
#{retailprice,jdbcType=DOUBLE},
</if>
<if test="lowprice != null">
#{lowprice,jdbcType=DOUBLE},
</if>
<if test="presetpriceone != null">
#{presetpriceone,jdbcType=DOUBLE},
</if>
<if test="presetpricetwo != null">
#{presetpricetwo,jdbcType=DOUBLE},
</if>
<if test="unitid != null">
#{unitid,jdbcType=BIGINT},
</if>
<if test="firstoutunit != null">
#{firstoutunit,jdbcType=VARCHAR},
</if>
<if test="firstinunit != null">
#{firstinunit,jdbcType=VARCHAR},
</if>
<if test="pricestrategy != null">
#{pricestrategy,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="otherfield1 != null">
#{otherfield1,jdbcType=VARCHAR},
</if>
<if test="otherfield2 != null">
#{otherfield2,jdbcType=VARCHAR},
</if>
<if test="otherfield3 != null">
#{otherfield3,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_material
<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_material
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.categoryid != null">
CategoryId = #{record.categoryid,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.mfrs != null">
Mfrs = #{record.mfrs,jdbcType=VARCHAR},
</if>
<if test="record.packing != null">
Packing = #{record.packing,jdbcType=DOUBLE},
</if>
<if test="record.safetystock != null">
SafetyStock = #{record.safetystock,jdbcType=DOUBLE},
</if>
<if test="record.model != null">
Model = #{record.model,jdbcType=VARCHAR},
</if>
<if test="record.standard != null">
Standard = #{record.standard,jdbcType=VARCHAR},
</if>
<if test="record.color != null">
Color = #{record.color,jdbcType=VARCHAR},
</if>
<if test="record.unit != null">
Unit = #{record.unit,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.retailprice != null">
RetailPrice = #{record.retailprice,jdbcType=DOUBLE},
</if>
<if test="record.lowprice != null">
LowPrice = #{record.lowprice,jdbcType=DOUBLE},
</if>
<if test="record.presetpriceone != null">
PresetPriceOne = #{record.presetpriceone,jdbcType=DOUBLE},
</if>
<if test="record.presetpricetwo != null">
PresetPriceTwo = #{record.presetpricetwo,jdbcType=DOUBLE},
</if>
<if test="record.unitid != null">
UnitId = #{record.unitid,jdbcType=BIGINT},
</if>
<if test="record.firstoutunit != null">
FirstOutUnit = #{record.firstoutunit,jdbcType=VARCHAR},
</if>
<if test="record.firstinunit != null">
FirstInUnit = #{record.firstinunit,jdbcType=VARCHAR},
</if>
<if test="record.pricestrategy != null">
PriceStrategy = #{record.pricestrategy,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
Enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.otherfield1 != null">
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
</if>
<if test="record.otherfield2 != null">
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR},
</if>
<if test="record.otherfield3 != null">
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_material
set Id = #{record.id,jdbcType=BIGINT},
CategoryId = #{record.categoryid,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
Mfrs = #{record.mfrs,jdbcType=VARCHAR},
Packing = #{record.packing,jdbcType=DOUBLE},
SafetyStock = #{record.safetystock,jdbcType=DOUBLE},
Model = #{record.model,jdbcType=VARCHAR},
Standard = #{record.standard,jdbcType=VARCHAR},
Color = #{record.color,jdbcType=VARCHAR},
Unit = #{record.unit,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR},
RetailPrice = #{record.retailprice,jdbcType=DOUBLE},
LowPrice = #{record.lowprice,jdbcType=DOUBLE},
PresetPriceOne = #{record.presetpriceone,jdbcType=DOUBLE},
PresetPriceTwo = #{record.presetpricetwo,jdbcType=DOUBLE},
UnitId = #{record.unitid,jdbcType=BIGINT},
FirstOutUnit = #{record.firstoutunit,jdbcType=VARCHAR},
FirstInUnit = #{record.firstinunit,jdbcType=VARCHAR},
PriceStrategy = #{record.pricestrategy,jdbcType=VARCHAR},
Enabled = #{record.enabled,jdbcType=BIT},
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR},
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Material">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_material
<set>
<if test="categoryid != null">
CategoryId = #{categoryid,jdbcType=BIGINT},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="mfrs != null">
Mfrs = #{mfrs,jdbcType=VARCHAR},
</if>
<if test="packing != null">
Packing = #{packing,jdbcType=DOUBLE},
</if>
<if test="safetystock != null">
SafetyStock = #{safetystock,jdbcType=DOUBLE},
</if>
<if test="model != null">
Model = #{model,jdbcType=VARCHAR},
</if>
<if test="standard != null">
Standard = #{standard,jdbcType=VARCHAR},
</if>
<if test="color != null">
Color = #{color,jdbcType=VARCHAR},
</if>
<if test="unit != null">
Unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="retailprice != null">
RetailPrice = #{retailprice,jdbcType=DOUBLE},
</if>
<if test="lowprice != null">
LowPrice = #{lowprice,jdbcType=DOUBLE},
</if>
<if test="presetpriceone != null">
PresetPriceOne = #{presetpriceone,jdbcType=DOUBLE},
</if>
<if test="presetpricetwo != null">
PresetPriceTwo = #{presetpricetwo,jdbcType=DOUBLE},
</if>
<if test="unitid != null">
UnitId = #{unitid,jdbcType=BIGINT},
</if>
<if test="firstoutunit != null">
FirstOutUnit = #{firstoutunit,jdbcType=VARCHAR},
</if>
<if test="firstinunit != null">
FirstInUnit = #{firstinunit,jdbcType=VARCHAR},
</if>
<if test="pricestrategy != null">
PriceStrategy = #{pricestrategy,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
Enabled = #{enabled,jdbcType=BIT},
</if>
<if test="otherfield1 != null">
OtherField1 = #{otherfield1,jdbcType=VARCHAR},
</if>
<if test="otherfield2 != null">
OtherField2 = #{otherfield2,jdbcType=VARCHAR},
</if>
<if test="otherfield3 != null">
OtherField3 = #{otherfield3,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Material">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_material
set CategoryId = #{categoryid,jdbcType=BIGINT},
Name = #{name,jdbcType=VARCHAR},
Mfrs = #{mfrs,jdbcType=VARCHAR},
Packing = #{packing,jdbcType=DOUBLE},
SafetyStock = #{safetystock,jdbcType=DOUBLE},
Model = #{model,jdbcType=VARCHAR},
Standard = #{standard,jdbcType=VARCHAR},
Color = #{color,jdbcType=VARCHAR},
Unit = #{unit,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR},
RetailPrice = #{retailprice,jdbcType=DOUBLE},
LowPrice = #{lowprice,jdbcType=DOUBLE},
PresetPriceOne = #{presetpriceone,jdbcType=DOUBLE},
PresetPriceTwo = #{presetpricetwo,jdbcType=DOUBLE},
UnitId = #{unitid,jdbcType=BIGINT},
FirstOutUnit = #{firstoutunit,jdbcType=VARCHAR},
FirstInUnit = #{firstinunit,jdbcType=VARCHAR},
PriceStrategy = #{pricestrategy,jdbcType=VARCHAR},
Enabled = #{enabled,jdbcType=BIT},
OtherField1 = #{otherfield1,jdbcType=VARCHAR},
OtherField2 = #{otherfield2,jdbcType=VARCHAR},
OtherField3 = #{otherfield3,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,47 @@
<?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.MaterialMapper">
<resultMap extends="BaseResultMap" id="ResultAndUnitMap" type="com.jsh.erp.datasource.entities.MaterialVo4Unit">
<result column="UName" jdbcType="VARCHAR" property="unitName" />
</resultMap>
<select id="selectByConditionMaterial" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="BaseResultMap">
select *
FROM jsh_material
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="model != null">
and model like '%${model}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByMaterial" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_material
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="model != null">
and model like '%${model}%'
</if>
</select>
<select id="findUnitName" resultType="java.lang.String">
select jsh_unit.UName from jsh_unit left join jsh_material on UnitId=jsh_unit.id where jsh_material.id = ${mId}
</select>
<select id="findById" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
select m.*,u.UName from jsh_material m left join jsh_unit u on m.UnitId=u.id where m.id = ${id}
</select>
<select id="findBySelect" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
select m.*,u.UName from jsh_material m left join jsh_unit u on m.UnitId=u.id where m.enabled=1 ORDER BY Id asc
</select>
</mapper>

View File

@@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialPropertyMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="nativeName" jdbcType="VARCHAR" property="nativename" />
<result column="enabled" jdbcType="BIT" property="enabled" />
<result column="sort" jdbcType="VARCHAR" property="sort" />
<result column="anotherName" jdbcType="VARCHAR" property="anothername" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, nativeName, enabled, sort, anotherName
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_materialproperty
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_materialproperty
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialproperty
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_materialproperty
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialproperty (id, nativeName, enabled,
sort, anotherName)
values (#{id,jdbcType=BIGINT}, #{nativename,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT},
#{sort,jdbcType=VARCHAR}, #{anothername,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_materialproperty
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="nativename != null">
nativeName,
</if>
<if test="enabled != null">
enabled,
</if>
<if test="sort != null">
sort,
</if>
<if test="anothername != null">
anotherName,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="nativename != null">
#{nativename,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="sort != null">
#{sort,jdbcType=VARCHAR},
</if>
<if test="anothername != null">
#{anothername,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_materialproperty
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.nativename != null">
nativeName = #{record.nativename,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=VARCHAR},
</if>
<if test="record.anothername != null">
anotherName = #{record.anothername,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
set id = #{record.id,jdbcType=BIGINT},
nativeName = #{record.nativename,jdbcType=VARCHAR},
enabled = #{record.enabled,jdbcType=BIT},
sort = #{record.sort,jdbcType=VARCHAR},
anotherName = #{record.anothername,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
<set>
<if test="nativename != null">
nativeName = #{nativename,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=VARCHAR},
</if>
<if test="anothername != null">
anotherName = #{anothername,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.MaterialProperty">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_materialproperty
set nativeName = #{nativename,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
sort = #{sort,jdbcType=VARCHAR},
anotherName = #{anothername,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.MaterialPropertyMapper">
<select id="selectByConditionMaterialProperty" parameterType="com.jsh.erp.datasource.entities.MaterialPropertyExample" resultMap="BaseResultMap">
select *
FROM jsh_materialproperty
where 1=1
<if test="name != null">
and nativeName like '%${name}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByMaterialProperty" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_materialproperty
WHERE 1=1
<if test="name != null">
and nativeName like '%${name}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,241 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.PersonMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="Name" jdbcType="VARCHAR" property="name" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, Name
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_person
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_person
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_person (Id, Type, Name
)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_person
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="type != null">
Type,
</if>
<if test="name != null">
Name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_person
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
set Id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR},
Name = #{record.name,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
<set>
<if test="type != null">
Type = #{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Person">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_person
set Type = #{type,jdbcType=VARCHAR},
Name = #{name,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.PersonMapper">
<select id="selectByConditionPerson" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultMap="BaseResultMap">
select *
FROM jsh_person
where 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByPerson" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_person
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="type != null">
and type='${type}'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.RoleMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Name" jdbcType="VARCHAR" property="name" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="description" jdbcType="VARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, type, value, description
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_role
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_role
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_role (Id, Name, type,
value, description)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_role
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="name != null">
Name,
</if>
<if test="type != null">
type,
</if>
<if test="value != null">
value,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.RoleExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_role
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
<set>
<if test="name != null">
Name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Role">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_role
set Name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.RoleMapper">
<select id="selectByConditionRole" resultMap="BaseResultMap">
SELECT *
FROM jsh_role
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>;
</select>
<select id="countsByRole" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_role
WHERE 1=1
<if test="name != null">
and name like '%${name}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,525 @@
<?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.SupplierMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Supplier">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="supplier" jdbcType="VARCHAR" property="supplier" />
<result column="contacts" jdbcType="VARCHAR" property="contacts" />
<result column="phonenum" jdbcType="VARCHAR" property="phonenum" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="isystem" jdbcType="TINYINT" property="isystem" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="enabled" jdbcType="BIT" property="enabled" />
<result column="AdvanceIn" jdbcType="DOUBLE" property="advancein" />
<result column="BeginNeedGet" jdbcType="DOUBLE" property="beginneedget" />
<result column="BeginNeedPay" jdbcType="DOUBLE" property="beginneedpay" />
<result column="AllNeedGet" jdbcType="DOUBLE" property="allneedget" />
<result column="AllNeedPay" jdbcType="DOUBLE" property="allneedpay" />
<result column="fax" jdbcType="VARCHAR" property="fax" />
<result column="telephone" jdbcType="VARCHAR" property="telephone" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="taxNum" jdbcType="VARCHAR" property="taxnum" />
<result column="bankName" jdbcType="VARCHAR" property="bankname" />
<result column="accountNumber" jdbcType="VARCHAR" property="accountnumber" />
<result column="taxRate" jdbcType="DOUBLE" property="taxrate" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, supplier, contacts, phonenum, email, description, isystem, type, enabled, AdvanceIn,
BeginNeedGet, BeginNeedPay, AllNeedGet, AllNeedPay, fax, telephone, address, taxNum,
bankName, accountNumber, taxRate
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample" 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_supplier
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_supplier
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_supplier
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_supplier
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Supplier">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_supplier (id, supplier, contacts,
phonenum, email, description,
isystem, type, enabled,
AdvanceIn, BeginNeedGet, BeginNeedPay,
AllNeedGet, AllNeedPay, fax,
telephone, address, taxNum,
bankName, accountNumber, taxRate
)
values (#{id,jdbcType=BIGINT}, #{supplier,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR},
#{phonenum,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{isystem,jdbcType=TINYINT}, #{type,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT},
#{advancein,jdbcType=DOUBLE}, #{beginneedget,jdbcType=DOUBLE}, #{beginneedpay,jdbcType=DOUBLE},
#{allneedget,jdbcType=DOUBLE}, #{allneedpay,jdbcType=DOUBLE}, #{fax,jdbcType=VARCHAR},
#{telephone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{taxnum,jdbcType=VARCHAR},
#{bankname,jdbcType=VARCHAR}, #{accountnumber,jdbcType=VARCHAR}, #{taxrate,jdbcType=DOUBLE}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Supplier">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_supplier
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="supplier != null">
supplier,
</if>
<if test="contacts != null">
contacts,
</if>
<if test="phonenum != null">
phonenum,
</if>
<if test="email != null">
email,
</if>
<if test="description != null">
description,
</if>
<if test="isystem != null">
isystem,
</if>
<if test="type != null">
type,
</if>
<if test="enabled != null">
enabled,
</if>
<if test="advancein != null">
AdvanceIn,
</if>
<if test="beginneedget != null">
BeginNeedGet,
</if>
<if test="beginneedpay != null">
BeginNeedPay,
</if>
<if test="allneedget != null">
AllNeedGet,
</if>
<if test="allneedpay != null">
AllNeedPay,
</if>
<if test="fax != null">
fax,
</if>
<if test="telephone != null">
telephone,
</if>
<if test="address != null">
address,
</if>
<if test="taxnum != null">
taxNum,
</if>
<if test="bankname != null">
bankName,
</if>
<if test="accountnumber != null">
accountNumber,
</if>
<if test="taxrate != null">
taxRate,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="supplier != null">
#{supplier,jdbcType=VARCHAR},
</if>
<if test="contacts != null">
#{contacts,jdbcType=VARCHAR},
</if>
<if test="phonenum != null">
#{phonenum,jdbcType=VARCHAR},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="isystem != null">
#{isystem,jdbcType=TINYINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BIT},
</if>
<if test="advancein != null">
#{advancein,jdbcType=DOUBLE},
</if>
<if test="beginneedget != null">
#{beginneedget,jdbcType=DOUBLE},
</if>
<if test="beginneedpay != null">
#{beginneedpay,jdbcType=DOUBLE},
</if>
<if test="allneedget != null">
#{allneedget,jdbcType=DOUBLE},
</if>
<if test="allneedpay != null">
#{allneedpay,jdbcType=DOUBLE},
</if>
<if test="fax != null">
#{fax,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
#{telephone,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="taxnum != null">
#{taxnum,jdbcType=VARCHAR},
</if>
<if test="bankname != null">
#{bankname,jdbcType=VARCHAR},
</if>
<if test="accountnumber != null">
#{accountnumber,jdbcType=VARCHAR},
</if>
<if test="taxrate != null">
#{taxrate,jdbcType=DOUBLE},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_supplier
<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_supplier
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.supplier != null">
supplier = #{record.supplier,jdbcType=VARCHAR},
</if>
<if test="record.contacts != null">
contacts = #{record.contacts,jdbcType=VARCHAR},
</if>
<if test="record.phonenum != null">
phonenum = #{record.phonenum,jdbcType=VARCHAR},
</if>
<if test="record.email != null">
email = #{record.email,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.isystem != null">
isystem = #{record.isystem,jdbcType=TINYINT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
enabled = #{record.enabled,jdbcType=BIT},
</if>
<if test="record.advancein != null">
AdvanceIn = #{record.advancein,jdbcType=DOUBLE},
</if>
<if test="record.beginneedget != null">
BeginNeedGet = #{record.beginneedget,jdbcType=DOUBLE},
</if>
<if test="record.beginneedpay != null">
BeginNeedPay = #{record.beginneedpay,jdbcType=DOUBLE},
</if>
<if test="record.allneedget != null">
AllNeedGet = #{record.allneedget,jdbcType=DOUBLE},
</if>
<if test="record.allneedpay != null">
AllNeedPay = #{record.allneedpay,jdbcType=DOUBLE},
</if>
<if test="record.fax != null">
fax = #{record.fax,jdbcType=VARCHAR},
</if>
<if test="record.telephone != null">
telephone = #{record.telephone,jdbcType=VARCHAR},
</if>
<if test="record.address != null">
address = #{record.address,jdbcType=VARCHAR},
</if>
<if test="record.taxnum != null">
taxNum = #{record.taxnum,jdbcType=VARCHAR},
</if>
<if test="record.bankname != null">
bankName = #{record.bankname,jdbcType=VARCHAR},
</if>
<if test="record.accountnumber != null">
accountNumber = #{record.accountnumber,jdbcType=VARCHAR},
</if>
<if test="record.taxrate != null">
taxRate = #{record.taxrate,jdbcType=DOUBLE},
</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_supplier
set id = #{record.id,jdbcType=BIGINT},
supplier = #{record.supplier,jdbcType=VARCHAR},
contacts = #{record.contacts,jdbcType=VARCHAR},
phonenum = #{record.phonenum,jdbcType=VARCHAR},
email = #{record.email,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
isystem = #{record.isystem,jdbcType=TINYINT},
type = #{record.type,jdbcType=VARCHAR},
enabled = #{record.enabled,jdbcType=BIT},
AdvanceIn = #{record.advancein,jdbcType=DOUBLE},
BeginNeedGet = #{record.beginneedget,jdbcType=DOUBLE},
BeginNeedPay = #{record.beginneedpay,jdbcType=DOUBLE},
AllNeedGet = #{record.allneedget,jdbcType=DOUBLE},
AllNeedPay = #{record.allneedpay,jdbcType=DOUBLE},
fax = #{record.fax,jdbcType=VARCHAR},
telephone = #{record.telephone,jdbcType=VARCHAR},
address = #{record.address,jdbcType=VARCHAR},
taxNum = #{record.taxnum,jdbcType=VARCHAR},
bankName = #{record.bankname,jdbcType=VARCHAR},
accountNumber = #{record.accountnumber,jdbcType=VARCHAR},
taxRate = #{record.taxrate,jdbcType=DOUBLE}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Supplier">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_supplier
<set>
<if test="supplier != null">
supplier = #{supplier,jdbcType=VARCHAR},
</if>
<if test="contacts != null">
contacts = #{contacts,jdbcType=VARCHAR},
</if>
<if test="phonenum != null">
phonenum = #{phonenum,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="isystem != null">
isystem = #{isystem,jdbcType=TINYINT},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</if>
<if test="advancein != null">
AdvanceIn = #{advancein,jdbcType=DOUBLE},
</if>
<if test="beginneedget != null">
BeginNeedGet = #{beginneedget,jdbcType=DOUBLE},
</if>
<if test="beginneedpay != null">
BeginNeedPay = #{beginneedpay,jdbcType=DOUBLE},
</if>
<if test="allneedget != null">
AllNeedGet = #{allneedget,jdbcType=DOUBLE},
</if>
<if test="allneedpay != null">
AllNeedPay = #{allneedpay,jdbcType=DOUBLE},
</if>
<if test="fax != null">
fax = #{fax,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
telephone = #{telephone,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="taxnum != null">
taxNum = #{taxnum,jdbcType=VARCHAR},
</if>
<if test="bankname != null">
bankName = #{bankname,jdbcType=VARCHAR},
</if>
<if test="accountnumber != null">
accountNumber = #{accountnumber,jdbcType=VARCHAR},
</if>
<if test="taxrate != null">
taxRate = #{taxrate,jdbcType=DOUBLE},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Supplier">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_supplier
set supplier = #{supplier,jdbcType=VARCHAR},
contacts = #{contacts,jdbcType=VARCHAR},
phonenum = #{phonenum,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
isystem = #{isystem,jdbcType=TINYINT},
type = #{type,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
AdvanceIn = #{advancein,jdbcType=DOUBLE},
BeginNeedGet = #{beginneedget,jdbcType=DOUBLE},
BeginNeedPay = #{beginneedpay,jdbcType=DOUBLE},
AllNeedGet = #{allneedget,jdbcType=DOUBLE},
AllNeedPay = #{allneedpay,jdbcType=DOUBLE},
fax = #{fax,jdbcType=VARCHAR},
telephone = #{telephone,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
taxNum = #{taxnum,jdbcType=VARCHAR},
bankName = #{bankname,jdbcType=VARCHAR},
accountNumber = #{accountnumber,jdbcType=VARCHAR},
taxRate = #{taxrate,jdbcType=DOUBLE}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,48 @@
<?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.SupplierMapper">
<select id="selectByConditionSupplier" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultMap="BaseResultMap">
select *
FROM jsh_supplier
where 1=1
<if test="supplier != null">
and supplier like '%${supplier}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="phonenum != null">
and phonenum like '%${phonenum}%'
</if>
<if test="telephone != null">
and telephone like '%${telephone}%'
</if>
<if test="description != null">
and description like '%${description}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsBySupplier" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_supplier
WHERE 1=1
<if test="supplier != null">
and supplier like '%${supplier}%'
</if>
<if test="type != null">
and type='${type}'
</if>
<if test="phonenum != null">
and phonenum like '%${phonenum}%'
</if>
<if test="telephone != null">
and telephone like '%${telephone}%'
</if>
<if test="description != null">
and description like '%${description}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,271 @@
<?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.SystemConfigMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.SystemConfig">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="description" jdbcType="VARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, type, name, value, description
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" 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_systemconfig
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_systemconfig
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_systemconfig
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_systemconfig
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_systemconfig (id, type, name,
value, description)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_systemconfig
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="name != null">
name,
</if>
<if test="value != null">
value,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_systemconfig
<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_systemconfig
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_systemconfig
set id = #{record.id,jdbcType=BIGINT},
type = #{record.type,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
description = #{record.description,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">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_systemconfig
<set>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_systemconfig
set type = #{type,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,18 @@
<?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.SystemConfigMapper">
<select id="selectByConditionSystemConfig" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultMap="BaseResultMap">
select *
FROM jsh_systemconfig
where 1=1
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsBySystemConfig" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_systemconfig
WHERE 1=1
</select>
</mapper>

View File

@@ -0,0 +1,224 @@
<?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.UnitMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="UName" jdbcType="VARCHAR" property="uname" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, UName
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" 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_unit
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_unit
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_unit
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_unit
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_unit (id, UName)
values (#{id,jdbcType=BIGINT}, #{uname,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_unit
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="uname != null">
UName,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="uname != null">
#{uname,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_unit
<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_unit
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.uname != null">
UName = #{record.uname,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit
set id = #{record.id,jdbcType=BIGINT},
UName = #{record.uname,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit
<set>
<if test="uname != null">
UName = #{uname,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit
set UName = #{uname,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,24 @@
<?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.UnitMapper">
<select id="selectByConditionUnit" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultMap="BaseResultMap">
select *
FROM jsh_unit
where 1=1
<if test="name != null">
and UName like '%${name}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByUnit" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_unit
WHERE 1=1
<if test="name != null">
and UName like '%${name}%'
</if>
</select>
</mapper>

View File

@@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.UserBusinessMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="Id" jdbcType="BIGINT" property="id" />
<result column="Type" jdbcType="VARCHAR" property="type" />
<result column="KeyId" jdbcType="VARCHAR" property="keyid" />
<result column="Value" jdbcType="VARCHAR" property="value" />
<result column="BtnStr" jdbcType="VARCHAR" property="btnstr" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, KeyId, Value, BtnStr
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from jsh_userbusiness
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_userbusiness
where Id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_userbusiness
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_userbusiness
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_userbusiness (Id, Type, KeyId,
Value, BtnStr)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{keyid,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{btnstr,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_userbusiness
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
Id,
</if>
<if test="type != null">
Type,
</if>
<if test="keyid != null">
KeyId,
</if>
<if test="value != null">
Value,
</if>
<if test="btnstr != null">
BtnStr,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="keyid != null">
#{keyid,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="btnstr != null">
#{btnstr,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_userbusiness
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_userbusiness
<set>
<if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.keyid != null">
KeyId = #{record.keyid,jdbcType=VARCHAR},
</if>
<if test="record.value != null">
Value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.btnstr != null">
BtnStr = #{record.btnstr,jdbcType=VARCHAR},
</if>
</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}
<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>
</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}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,398 @@
<?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.UserMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.User">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="loginame" jdbcType="VARCHAR" property="loginame" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="position" jdbcType="VARCHAR" property="position" />
<result column="department" jdbcType="VARCHAR" property="department" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="phonenum" jdbcType="VARCHAR" property="phonenum" />
<result column="ismanager" jdbcType="TINYINT" property="ismanager" />
<result column="isystem" jdbcType="TINYINT" property="isystem" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, username, loginame, password, position, department, email, phonenum, ismanager,
isystem, status, description, remark
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserExample" 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_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_user
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_user
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UserExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.User">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_user (id, username, loginame,
password, position, department,
email, phonenum, ismanager,
isystem, status, description,
remark)
values (#{id,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{loginame,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{phonenum,jdbcType=VARCHAR}, #{ismanager,jdbcType=TINYINT},
#{isystem,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{description,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.User">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="username != null">
username,
</if>
<if test="loginame != null">
loginame,
</if>
<if test="password != null">
password,
</if>
<if test="position != null">
position,
</if>
<if test="department != null">
department,
</if>
<if test="email != null">
email,
</if>
<if test="phonenum != null">
phonenum,
</if>
<if test="ismanager != null">
ismanager,
</if>
<if test="isystem != null">
isystem,
</if>
<if test="status != null">
status,
</if>
<if test="description != null">
description,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="loginame != null">
#{loginame,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="position != null">
#{position,jdbcType=VARCHAR},
</if>
<if test="department != null">
#{department,jdbcType=VARCHAR},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="phonenum != null">
#{phonenum,jdbcType=VARCHAR},
</if>
<if test="ismanager != null">
#{ismanager,jdbcType=TINYINT},
</if>
<if test="isystem != null">
#{isystem,jdbcType=TINYINT},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserExample" resultType="java.lang.Integer">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_user
<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_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.username != null">
username = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.loginame != null">
loginame = #{record.loginame,jdbcType=VARCHAR},
</if>
<if test="record.password != null">
password = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.position != null">
position = #{record.position,jdbcType=VARCHAR},
</if>
<if test="record.department != null">
department = #{record.department,jdbcType=VARCHAR},
</if>
<if test="record.email != null">
email = #{record.email,jdbcType=VARCHAR},
</if>
<if test="record.phonenum != null">
phonenum = #{record.phonenum,jdbcType=VARCHAR},
</if>
<if test="record.ismanager != null">
ismanager = #{record.ismanager,jdbcType=TINYINT},
</if>
<if test="record.isystem != null">
isystem = #{record.isystem,jdbcType=TINYINT},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_user
set id = #{record.id,jdbcType=BIGINT},
username = #{record.username,jdbcType=VARCHAR},
loginame = #{record.loginame,jdbcType=VARCHAR},
password = #{record.password,jdbcType=VARCHAR},
position = #{record.position,jdbcType=VARCHAR},
department = #{record.department,jdbcType=VARCHAR},
email = #{record.email,jdbcType=VARCHAR},
phonenum = #{record.phonenum,jdbcType=VARCHAR},
ismanager = #{record.ismanager,jdbcType=TINYINT},
isystem = #{record.isystem,jdbcType=TINYINT},
status = #{record.status,jdbcType=TINYINT},
description = #{record.description,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.User">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_user
<set>
<if test="username != null">
username = #{username,jdbcType=VARCHAR},
</if>
<if test="loginame != null">
loginame = #{loginame,jdbcType=VARCHAR},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="position != null">
position = #{position,jdbcType=VARCHAR},
</if>
<if test="department != null">
department = #{department,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="phonenum != null">
phonenum = #{phonenum,jdbcType=VARCHAR},
</if>
<if test="ismanager != null">
ismanager = #{ismanager,jdbcType=TINYINT},
</if>
<if test="isystem != null">
isystem = #{isystem,jdbcType=TINYINT},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.User">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_user
set username = #{username,jdbcType=VARCHAR},
loginame = #{loginame,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
position = #{position,jdbcType=VARCHAR},
department = #{department,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
phonenum = #{phonenum,jdbcType=VARCHAR},
ismanager = #{ismanager,jdbcType=TINYINT},
isystem = #{isystem,jdbcType=TINYINT},
status = #{status,jdbcType=TINYINT},
description = #{description,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,30 @@
<?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.UserMapper">
<select id="selectByConditionUser" parameterType="com.jsh.erp.datasource.entities.UserExample" resultMap="BaseResultMap">
select *
FROM jsh_user
where 1=1
<if test="userName != null">
and username like '%${userName}%'
</if>
<if test="loginName != null">
and loginame like '%${loginName}%'
</if>
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="countsByUser" resultType="java.lang.Integer">
SELECT
COUNT(id)
FROM jsh_user
WHERE 1=1
<if test="userName != null">
and username like '%${userName}%'
</if>
<if test="loginName != null">
and loginame like '%${loginName}%'
</if>
</select>
</mapper>