优化用户和单据模块

This commit is contained in:
季圣华
2019-12-25 22:46:37 +08:00
parent 8cfdc3dc17
commit b9fb7e2c8c
10 changed files with 997 additions and 999 deletions

View File

@@ -161,7 +161,7 @@
<plugin> <plugin>
<groupId>org.mybatis.generator</groupId> <groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId> <artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version> <version>1.4.0</version>
<configuration> <configuration>
<configurationFile>${basedir}/src/test/resources/generatorConfig.xml</configurationFile> <configurationFile>${basedir}/src/test/resources/generatorConfig.xml</configurationFile>
<verbose>true</verbose> <verbose>true</verbose>

View File

@@ -13,7 +13,7 @@ public class DepotHeadExample {
protected List<Criteria> oredCriteria; protected List<Criteria> oredCriteria;
public DepotHeadExample() { public DepotHeadExample() {
oredCriteria = new ArrayList<Criteria>(); oredCriteria = new ArrayList<>();
} }
public void setOrderByClause(String orderByClause) { public void setOrderByClause(String orderByClause) {
@@ -70,7 +70,7 @@ public class DepotHeadExample {
protected GeneratedCriteria() { protected GeneratedCriteria() {
super(); super();
criteria = new ArrayList<Criterion>(); criteria = new ArrayList<>();
} }
public boolean isValid() { public boolean isValid() {
@@ -2118,7 +2118,6 @@ public class DepotHeadExample {
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
protected Criteria() { protected Criteria() {
super(); super();
} }

View File

@@ -11,7 +11,7 @@ public class UserExample {
protected List<Criteria> oredCriteria; protected List<Criteria> oredCriteria;
public UserExample() { public UserExample() {
oredCriteria = new ArrayList<Criteria>(); oredCriteria = new ArrayList<>();
} }
public void setOrderByClause(String orderByClause) { public void setOrderByClause(String orderByClause) {
@@ -68,7 +68,7 @@ public class UserExample {
protected GeneratedCriteria() { protected GeneratedCriteria() {
super(); super();
criteria = new ArrayList<Criterion>(); criteria = new ArrayList<>();
} }
public boolean isValid() { public boolean isValid() {
@@ -1036,7 +1036,6 @@ public class UserExample {
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
protected Criteria() { protected Criteria() {
super(); super();
} }

View File

@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface DepotHeadMapper { public interface DepotHeadMapper {
int countByExample(DepotHeadExample example); long countByExample(DepotHeadExample example);
int deleteByExample(DepotHeadExample example); int deleteByExample(DepotHeadExample example);

View File

@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface UserMapper { public interface UserMapper {
int countByExample(UserExample example); long countByExample(UserExample example);
int deleteByExample(UserExample example); int deleteByExample(UserExample example);

View File

@@ -464,8 +464,6 @@ public class DepotHeadService {
} }
/** /**
* create by: cjl
* description:
* 新增单据主表及单据子表信息 * 新增单据主表及单据子表信息
* create time: 2019/1/25 14:36 * create time: 2019/1/25 14:36
* @Param: beanJson * @Param: beanJson
@@ -493,15 +491,21 @@ public class DepotHeadService {
}catch(Exception e){ }catch(Exception e){
JshException.writeFail(logger, e); JshException.writeFail(logger, e);
} }
/**入库和出库处理预付款信息*/ /**入库和出库处理预付款信息*/
if(BusinessConstants.PAY_TYPE_PREPAID.equals(depotHead.getPaytype())){ if(BusinessConstants.PAY_TYPE_PREPAID.equals(depotHead.getPaytype())){
if(depotHead.getOrganid()!=null) { if(depotHead.getOrganid()!=null) {
supplierService.updateAdvanceIn(depotHead.getOrganid(), BigDecimal.ZERO.subtract(depotHead.getTotalprice())); supplierService.updateAdvanceIn(depotHead.getOrganid(), BigDecimal.ZERO.subtract(depotHead.getTotalprice()));
} }
} }
/**入库和出库处理单据子表信息*/ //根据单据编号查询单据id
depotItemService.saveDetials(inserted,deleted,updated,depotHead.getId(),tenantId, request); DepotHeadExample dhExample = new DepotHeadExample();
dhExample.createCriteria().andDefaultnumberEqualTo(depotHead.getDefaultnumber()).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
List<DepotHead> list = depotHeadMapper.selectByExample(dhExample);
if(list!=null) {
Long headId = list.get(0).getId();
/**入库和出库处理单据子表信息*/
depotItemService.saveDetials(inserted,deleted,updated,headId,tenantId, request);
}
/**如果关联单据号非空则更新订单的状态为2 */ /**如果关联单据号非空则更新订单的状态为2 */
if(depotHead.getLinknumber()!=null) { if(depotHead.getLinknumber()!=null) {
DepotHead depotHeadOrders = new DepotHead(); DepotHead depotHeadOrders = new DepotHead();
@@ -516,8 +520,6 @@ public class DepotHeadService {
} }
} }
/** /**
* create by: cjl
* description:
* 更新单据主表及单据子表信息 * 更新单据主表及单据子表信息
* create time: 2019/1/28 14:47 * create time: 2019/1/28 14:47
* @Param: id * @Param: id

View File

@@ -334,8 +334,14 @@ public class UserService {
OrgaUserRel oul=new OrgaUserRel(); OrgaUserRel oul=new OrgaUserRel();
//机构id //机构id
oul.setOrgaId(ue.getOrgaId()); oul.setOrgaId(ue.getOrgaId());
//用户id //用户id根据用户名查询id
oul.setUserId(ue.getId()); UserExample example = new UserExample();
example.createCriteria().andLoginameEqualTo(ue.getLoginame());
List<User> list = userMapper.selectByExample(example);
if(list!=null) {
Long userId = list.get(0).getId();
oul.setUserId(userId);
}
//用户在机构中的排序 //用户在机构中的排序
oul.setUserBlngOrgaDsplSeq(ue.getUserBlngOrgaDsplSeq()); oul.setUserBlngOrgaDsplSeq(ue.getUserBlngOrgaDsplSeq());

File diff suppressed because it is too large Load Diff

View File

@@ -1,355 +1,353 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.UserMapper"> <mapper namespace="com.jsh.erp.datasource.mappers.UserMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.User"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.User">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="username" jdbcType="VARCHAR" property="username" /> <result column="username" jdbcType="VARCHAR" property="username" />
<result column="loginame" jdbcType="VARCHAR" property="loginame" /> <result column="loginame" jdbcType="VARCHAR" property="loginame" />
<result column="password" jdbcType="VARCHAR" property="password" /> <result column="password" jdbcType="VARCHAR" property="password" />
<result column="position" jdbcType="VARCHAR" property="position" /> <result column="position" jdbcType="VARCHAR" property="position" />
<result column="department" jdbcType="VARCHAR" property="department" /> <result column="department" jdbcType="VARCHAR" property="department" />
<result column="email" jdbcType="VARCHAR" property="email" /> <result column="email" jdbcType="VARCHAR" property="email" />
<result column="phonenum" jdbcType="VARCHAR" property="phonenum" /> <result column="phonenum" jdbcType="VARCHAR" property="phonenum" />
<result column="ismanager" jdbcType="TINYINT" property="ismanager" /> <result column="ismanager" jdbcType="TINYINT" property="ismanager" />
<result column="isystem" jdbcType="TINYINT" property="isystem" /> <result column="isystem" jdbcType="TINYINT" property="isystem" />
<result column="Status" jdbcType="TINYINT" property="status" /> <result column="Status" jdbcType="TINYINT" property="status" />
<result column="description" jdbcType="VARCHAR" property="description" /> <result column="description" jdbcType="VARCHAR" property="description" />
<result column="remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" /> <result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
<foreach collection="oredCriteria" item="criteria" separator="or"> <foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")"> <trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion"> <foreach collection="criteria.criteria" item="criterion">
<choose> <choose>
<when test="criterion.noValue"> <when test="criterion.noValue">
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
</if> </if>
</foreach> </foreach>
</where> </where>
</sql> </sql>
<sql id="Update_By_Example_Where_Clause"> <sql id="Update_By_Example_Where_Clause">
<where> <where>
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")"> <trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion"> <foreach collection="criteria.criteria" item="criterion">
<choose> <choose>
<when test="criterion.noValue"> <when test="criterion.noValue">
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue"> <when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.betweenValue"> <when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.listValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
</if> </if>
</foreach> </foreach>
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, username, loginame, password, position, department, email, phonenum, ismanager, id, username, loginame, password, position, department, email, phonenum, ismanager,
isystem, Status, description, remark, tenant_id isystem, Status, description, remark, tenant_id
</sql> </sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserExample" resultMap="BaseResultMap">
select select
<if test="distinct"> <if test="distinct">
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from jsh_user from jsh_user
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
<if test="orderByClause != null"> <if test="orderByClause != null">
order by ${orderByClause} order by ${orderByClause}
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from jsh_user from jsh_user
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from jsh_user delete from jsh_user
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UserExample"> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UserExample">
delete from jsh_user delete from jsh_user
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.User"> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.User">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> insert into jsh_user (id, username, loginame,
SELECT LAST_INSERT_ID() password, position, department,
</selectKey> email, phonenum, ismanager,
insert into jsh_user (id, username, loginame, isystem, Status, description,
password, position, department, remark, tenant_id)
email, phonenum, ismanager, values (#{id,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{loginame,jdbcType=VARCHAR},
isystem, Status, description, #{password,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR},
remark, tenant_id) #{email,jdbcType=VARCHAR}, #{phonenum,jdbcType=VARCHAR}, #{ismanager,jdbcType=TINYINT},
values (#{id,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{loginame,jdbcType=VARCHAR}, #{isystem,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{description,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT})
#{email,jdbcType=VARCHAR}, #{phonenum,jdbcType=VARCHAR}, #{ismanager,jdbcType=TINYINT}, </insert>
#{isystem,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{description,jdbcType=VARCHAR}, <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.User">
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}) insert into jsh_user
</insert> <trim prefix="(" suffix=")" suffixOverrides=",">
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.User"> <if test="id != null">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.Long"> id,
SELECT LAST_INSERT_ID() </if>
</selectKey> <if test="username != null">
insert into jsh_user username,
<trim prefix="(" suffix=")" suffixOverrides=","> </if>
id, <if test="loginame != null">
<if test="username != null"> loginame,
username, </if>
</if> <if test="password != null">
<if test="loginame != null"> password,
loginame, </if>
</if> <if test="position != null">
<if test="password != null"> position,
password, </if>
</if> <if test="department != null">
<if test="position != null"> department,
position, </if>
</if> <if test="email != null">
<if test="department != null"> email,
department, </if>
</if> <if test="phonenum != null">
<if test="email != null"> phonenum,
email, </if>
</if> <if test="ismanager != null">
<if test="phonenum != null"> ismanager,
phonenum, </if>
</if> <if test="isystem != null">
<if test="ismanager != null"> isystem,
ismanager, </if>
</if> <if test="status != null">
<if test="isystem != null"> Status,
isystem, </if>
</if> <if test="description != null">
<if test="status != null"> description,
Status, </if>
</if> <if test="remark != null">
<if test="description != null"> remark,
description, </if>
</if> <if test="tenantId != null">
<if test="remark != null"> tenant_id,
remark, </if>
</if> </trim>
<if test="tenantId != null"> <trim prefix="values (" suffix=")" suffixOverrides=",">
tenant_id, <if test="id != null">
</if> #{id,jdbcType=BIGINT},
</trim> </if>
<trim prefix="values (" suffix=")" suffixOverrides=","> <if test="username != null">
#{id,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR},
<if test="username != null"> </if>
#{username,jdbcType=VARCHAR}, <if test="loginame != null">
</if> #{loginame,jdbcType=VARCHAR},
<if test="loginame != null"> </if>
#{loginame,jdbcType=VARCHAR}, <if test="password != null">
</if> #{password,jdbcType=VARCHAR},
<if test="password != null"> </if>
#{password,jdbcType=VARCHAR}, <if test="position != null">
</if> #{position,jdbcType=VARCHAR},
<if test="position != null"> </if>
#{position,jdbcType=VARCHAR}, <if test="department != null">
</if> #{department,jdbcType=VARCHAR},
<if test="department != null"> </if>
#{department,jdbcType=VARCHAR}, <if test="email != null">
</if> #{email,jdbcType=VARCHAR},
<if test="email != null"> </if>
#{email,jdbcType=VARCHAR}, <if test="phonenum != null">
</if> #{phonenum,jdbcType=VARCHAR},
<if test="phonenum != null"> </if>
#{phonenum,jdbcType=VARCHAR}, <if test="ismanager != null">
</if> #{ismanager,jdbcType=TINYINT},
<if test="ismanager != null"> </if>
#{ismanager,jdbcType=TINYINT}, <if test="isystem != null">
</if> #{isystem,jdbcType=TINYINT},
<if test="isystem != null"> </if>
#{isystem,jdbcType=TINYINT}, <if test="status != null">
</if> #{status,jdbcType=TINYINT},
<if test="status != null"> </if>
#{status,jdbcType=TINYINT}, <if test="description != null">
</if> #{description,jdbcType=VARCHAR},
<if test="description != null"> </if>
#{description,jdbcType=VARCHAR}, <if test="remark != null">
</if> #{remark,jdbcType=VARCHAR},
<if test="remark != null"> </if>
#{remark,jdbcType=VARCHAR}, <if test="tenantId != null">
</if> #{tenantId,jdbcType=BIGINT},
<if test="tenantId != null"> </if>
#{tenantId,jdbcType=BIGINT}, </trim>
</if> </insert>
</trim> <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserExample" resultType="java.lang.Long">
</insert> select count(*) from jsh_user
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserExample" resultType="java.lang.Integer"> <if test="_parameter != null">
select count(*) from jsh_user <include refid="Example_Where_Clause" />
<if test="_parameter != null"> </if>
<include refid="Example_Where_Clause" /> </select>
</if> <update id="updateByExampleSelective" parameterType="map">
</select> update jsh_user
<update id="updateByExampleSelective" parameterType="map"> <set>
update jsh_user <if test="record.id != null">
<set> id = #{record.id,jdbcType=BIGINT},
<if test="record.id != null"> </if>
id = #{record.id,jdbcType=BIGINT}, <if test="record.username != null">
</if> username = #{record.username,jdbcType=VARCHAR},
<if test="record.username != null"> </if>
username = #{record.username,jdbcType=VARCHAR}, <if test="record.loginame != null">
</if> loginame = #{record.loginame,jdbcType=VARCHAR},
<if test="record.loginame != null"> </if>
loginame = #{record.loginame,jdbcType=VARCHAR}, <if test="record.password != null">
</if> password = #{record.password,jdbcType=VARCHAR},
<if test="record.password != null"> </if>
password = #{record.password,jdbcType=VARCHAR}, <if test="record.position != null">
</if> position = #{record.position,jdbcType=VARCHAR},
<if test="record.position != null"> </if>
position = #{record.position,jdbcType=VARCHAR}, <if test="record.department != null">
</if> department = #{record.department,jdbcType=VARCHAR},
<if test="record.department != null"> </if>
department = #{record.department,jdbcType=VARCHAR}, <if test="record.email != null">
</if> email = #{record.email,jdbcType=VARCHAR},
<if test="record.email != null"> </if>
email = #{record.email,jdbcType=VARCHAR}, <if test="record.phonenum != null">
</if> phonenum = #{record.phonenum,jdbcType=VARCHAR},
<if test="record.phonenum != null"> </if>
phonenum = #{record.phonenum,jdbcType=VARCHAR}, <if test="record.ismanager != null">
</if> ismanager = #{record.ismanager,jdbcType=TINYINT},
<if test="record.ismanager != null"> </if>
ismanager = #{record.ismanager,jdbcType=TINYINT}, <if test="record.isystem != null">
</if> isystem = #{record.isystem,jdbcType=TINYINT},
<if test="record.isystem != null"> </if>
isystem = #{record.isystem,jdbcType=TINYINT}, <if test="record.status != null">
</if> Status = #{record.status,jdbcType=TINYINT},
<if test="record.status != null"> </if>
Status = #{record.status,jdbcType=TINYINT}, <if test="record.description != null">
</if> description = #{record.description,jdbcType=VARCHAR},
<if test="record.description != null"> </if>
description = #{record.description,jdbcType=VARCHAR}, <if test="record.remark != null">
</if> remark = #{record.remark,jdbcType=VARCHAR},
<if test="record.remark != null"> </if>
remark = #{record.remark,jdbcType=VARCHAR}, <if test="record.tenantId != null">
</if> tenant_id = #{record.tenantId,jdbcType=BIGINT},
<if test="record.tenantId != null"> </if>
tenant_id = #{record.tenantId,jdbcType=BIGINT}, </set>
</if> <if test="_parameter != null">
</set> <include refid="Update_By_Example_Where_Clause" />
<if test="_parameter != null"> </if>
<include refid="Update_By_Example_Where_Clause" /> </update>
</if> <update id="updateByExample" parameterType="map">
</update> update jsh_user
<update id="updateByExample" parameterType="map"> set id = #{record.id,jdbcType=BIGINT},
update jsh_user username = #{record.username,jdbcType=VARCHAR},
set id = #{record.id,jdbcType=BIGINT}, loginame = #{record.loginame,jdbcType=VARCHAR},
username = #{record.username,jdbcType=VARCHAR}, password = #{record.password,jdbcType=VARCHAR},
loginame = #{record.loginame,jdbcType=VARCHAR}, position = #{record.position,jdbcType=VARCHAR},
password = #{record.password,jdbcType=VARCHAR}, department = #{record.department,jdbcType=VARCHAR},
position = #{record.position,jdbcType=VARCHAR}, email = #{record.email,jdbcType=VARCHAR},
department = #{record.department,jdbcType=VARCHAR}, phonenum = #{record.phonenum,jdbcType=VARCHAR},
email = #{record.email,jdbcType=VARCHAR}, ismanager = #{record.ismanager,jdbcType=TINYINT},
phonenum = #{record.phonenum,jdbcType=VARCHAR}, isystem = #{record.isystem,jdbcType=TINYINT},
ismanager = #{record.ismanager,jdbcType=TINYINT}, Status = #{record.status,jdbcType=TINYINT},
isystem = #{record.isystem,jdbcType=TINYINT}, description = #{record.description,jdbcType=VARCHAR},
Status = #{record.status,jdbcType=TINYINT}, remark = #{record.remark,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR}, tenant_id = #{record.tenantId,jdbcType=BIGINT}
remark = #{record.remark,jdbcType=VARCHAR}, <if test="_parameter != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT} <include refid="Update_By_Example_Where_Clause" />
<if test="_parameter != null"> </if>
<include refid="Update_By_Example_Where_Clause" /> </update>
</if> <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.User">
</update> update jsh_user
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.User"> <set>
update jsh_user <if test="username != null">
<set> username = #{username,jdbcType=VARCHAR},
<if test="username != null"> </if>
username = #{username,jdbcType=VARCHAR}, <if test="loginame != null">
</if> loginame = #{loginame,jdbcType=VARCHAR},
<if test="loginame != null"> </if>
loginame = #{loginame,jdbcType=VARCHAR}, <if test="password != null">
</if> password = #{password,jdbcType=VARCHAR},
<if test="password != null"> </if>
password = #{password,jdbcType=VARCHAR}, <if test="position != null">
</if> position = #{position,jdbcType=VARCHAR},
<if test="position != null"> </if>
position = #{position,jdbcType=VARCHAR}, <if test="department != null">
</if> department = #{department,jdbcType=VARCHAR},
<if test="department != null"> </if>
department = #{department,jdbcType=VARCHAR}, <if test="email != null">
</if> email = #{email,jdbcType=VARCHAR},
<if test="email != null"> </if>
email = #{email,jdbcType=VARCHAR}, <if test="phonenum != null">
</if> phonenum = #{phonenum,jdbcType=VARCHAR},
<if test="phonenum != null"> </if>
phonenum = #{phonenum,jdbcType=VARCHAR}, <if test="ismanager != null">
</if> ismanager = #{ismanager,jdbcType=TINYINT},
<if test="ismanager != null"> </if>
ismanager = #{ismanager,jdbcType=TINYINT}, <if test="isystem != null">
</if> isystem = #{isystem,jdbcType=TINYINT},
<if test="isystem != null"> </if>
isystem = #{isystem,jdbcType=TINYINT}, <if test="status != null">
</if> Status = #{status,jdbcType=TINYINT},
<if test="status != null"> </if>
Status = #{status,jdbcType=TINYINT}, <if test="description != null">
</if> description = #{description,jdbcType=VARCHAR},
<if test="description != null"> </if>
description = #{description,jdbcType=VARCHAR}, <if test="remark != null">
</if> remark = #{remark,jdbcType=VARCHAR},
<if test="remark != null"> </if>
remark = #{remark,jdbcType=VARCHAR}, <if test="tenantId != null">
</if> tenant_id = #{tenantId,jdbcType=BIGINT},
<if test="tenantId != null"> </if>
tenant_id = #{tenantId,jdbcType=BIGINT}, </set>
</if> where id = #{id,jdbcType=BIGINT}
</set> </update>
where id = #{id,jdbcType=BIGINT} <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.User">
</update> update jsh_user
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.User"> set username = #{username,jdbcType=VARCHAR},
update jsh_user loginame = #{loginame,jdbcType=VARCHAR},
set username = #{username,jdbcType=VARCHAR}, password = #{password,jdbcType=VARCHAR},
loginame = #{loginame,jdbcType=VARCHAR}, position = #{position,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR}, department = #{department,jdbcType=VARCHAR},
position = #{position,jdbcType=VARCHAR}, email = #{email,jdbcType=VARCHAR},
department = #{department,jdbcType=VARCHAR}, phonenum = #{phonenum,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR}, ismanager = #{ismanager,jdbcType=TINYINT},
phonenum = #{phonenum,jdbcType=VARCHAR}, isystem = #{isystem,jdbcType=TINYINT},
ismanager = #{ismanager,jdbcType=TINYINT}, Status = #{status,jdbcType=TINYINT},
isystem = #{isystem,jdbcType=TINYINT}, description = #{description,jdbcType=VARCHAR},
Status = #{status,jdbcType=TINYINT}, remark = #{remark,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}, tenant_id = #{tenantId,jdbcType=BIGINT}
remark = #{remark,jdbcType=VARCHAR}, where id = #{id,jdbcType=BIGINT}
tenant_id = #{tenantId,jdbcType=BIGINT} </update>
where id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>

View File

@@ -37,7 +37,7 @@
<!-- generate Mapper --> <!-- generate Mapper -->
<javaClientGenerator type="XMLMAPPER" <javaClientGenerator type="XMLMAPPER"
targetPackage="com.jsh.erp.datasource.mappers" targetPackage="com.jsh.erp.datasource.mappers"
targetProject="src\main\java" implementationPackage=""> targetProject="src\main\java">
<property name="enableSubPackages" value="false"/> <property name="enableSubPackages" value="false"/>
<property name="exampleMethodVisibility" value="public"/> <property name="exampleMethodVisibility" value="public"/>
</javaClientGenerator> </javaClientGenerator>
@@ -45,9 +45,7 @@
<table tableName="jsh_accounthead" domainObjectName="AccountHead"></table> <table tableName="jsh_accounthead" domainObjectName="AccountHead"></table>
<table tableName="jsh_accountitem" domainObjectName="AccountItem"></table> <table tableName="jsh_accountitem" domainObjectName="AccountItem"></table>
<table tableName="jsh_depot" domainObjectName="Depot"></table> <table tableName="jsh_depot" domainObjectName="Depot"></table>
<table tableName="jsh_depothead" domainObjectName="DepotHead"> <table tableName="jsh_depothead" domainObjectName="DepotHead"></table>
<generatedKey column="id" sqlStatement="SELECT LAST_INSERT_ID()"/>
</table>
<table tableName="jsh_depotitem" domainObjectName="DepotItem"></table> <table tableName="jsh_depotitem" domainObjectName="DepotItem"></table>
<table tableName="jsh_functions" domainObjectName="Functions"></table> <table tableName="jsh_functions" domainObjectName="Functions"></table>
<table tableName="jsh_inoutitem" domainObjectName="InOutItem"></table> <table tableName="jsh_inoutitem" domainObjectName="InOutItem"></table>
@@ -61,9 +59,7 @@
<table tableName="jsh_supplier" domainObjectName="Supplier"></table> <table tableName="jsh_supplier" domainObjectName="Supplier"></table>
<table tableName="jsh_systemconfig" domainObjectName="SystemConfig"></table> <table tableName="jsh_systemconfig" domainObjectName="SystemConfig"></table>
<table tableName="jsh_unit" domainObjectName="Unit"></table> <table tableName="jsh_unit" domainObjectName="Unit"></table>
<table tableName="jsh_user" domainObjectName="User"> <table tableName="jsh_user" domainObjectName="User"></table>
<generatedKey column="id" sqlStatement="SELECT LAST_INSERT_ID()"/>
</table>
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table> <table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table> <table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>
<table tableName="jsh_organization" domainObjectName="Organization"></table> <table tableName="jsh_organization" domainObjectName="Organization"></table>