Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
b9fb7e2c
Commit
b9fb7e2c
authored
Dec 25, 2019
by
季圣华
Browse files
优化用户和单据模块
parent
8cfdc3dc
Changes
10
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
b9fb7e2c
...
@@ -161,7 +161,7 @@
...
@@ -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>
...
...
src/main/java/com/jsh/erp/datasource/entities/DepotHeadExample.java
View file @
b9fb7e2c
...
@@ -13,7 +13,7 @@ public class DepotHeadExample {
...
@@ -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 {
...
@@ -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 {
...
@@ -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
();
}
}
...
...
src/main/java/com/jsh/erp/datasource/entities/UserExample.java
View file @
b9fb7e2c
...
@@ -11,7 +11,7 @@ public class UserExample {
...
@@ -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 {
...
@@ -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 {
...
@@ -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
();
}
}
...
...
src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapper.java
View file @
b9fb7e2c
...
@@ -6,7 +6,7 @@ import java.util.List;
...
@@ -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
);
...
...
src/main/java/com/jsh/erp/datasource/mappers/UserMapper.java
View file @
b9fb7e2c
...
@@ -6,7 +6,7 @@ import java.util.List;
...
@@ -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
);
...
...
src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
b9fb7e2c
...
@@ -464,8 +464,6 @@ public class DepotHeadService {
...
@@ -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 {
...
@@ -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 {
...
@@ -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
...
...
src/main/java/com/jsh/erp/service/user/UserService.java
View file @
b9fb7e2c
...
@@ -334,8 +334,14 @@ public class UserService {
...
@@ -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
());
...
...
src/main/resources/mapper_xml/DepotHeadMapper.xml
View file @
b9fb7e2c
<?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.DepotHeadMapper"
>
<mapper
namespace=
"com.jsh.erp.datasource.mappers.DepotHeadMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.DepotHead"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.DepotHead"
>
<id
column=
"Id"
jdbcType=
"BIGINT"
property=
"id"
/>
<id
column=
"Id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"Type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"Type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"SubType"
jdbcType=
"VARCHAR"
property=
"subtype"
/>
<result
column=
"SubType"
jdbcType=
"VARCHAR"
property=
"subtype"
/>
<result
column=
"ProjectId"
jdbcType=
"BIGINT"
property=
"projectid"
/>
<result
column=
"ProjectId"
jdbcType=
"BIGINT"
property=
"projectid"
/>
<result
column=
"DefaultNumber"
jdbcType=
"VARCHAR"
property=
"defaultnumber"
/>
<result
column=
"DefaultNumber"
jdbcType=
"VARCHAR"
property=
"defaultnumber"
/>
<result
column=
"Number"
jdbcType=
"VARCHAR"
property=
"number"
/>
<result
column=
"Number"
jdbcType=
"VARCHAR"
property=
"number"
/>
<result
column=
"OperPersonName"
jdbcType=
"VARCHAR"
property=
"operpersonname"
/>
<result
column=
"OperPersonName"
jdbcType=
"VARCHAR"
property=
"operpersonname"
/>
<result
column=
"CreateTime"
jdbcType=
"TIMESTAMP"
property=
"createtime"
/>
<result
column=
"CreateTime"
jdbcType=
"TIMESTAMP"
property=
"createtime"
/>
<result
column=
"OperTime"
jdbcType=
"TIMESTAMP"
property=
"opertime"
/>
<result
column=
"OperTime"
jdbcType=
"TIMESTAMP"
property=
"opertime"
/>
<result
column=
"OrganId"
jdbcType=
"BIGINT"
property=
"organid"
/>
<result
column=
"OrganId"
jdbcType=
"BIGINT"
property=
"organid"
/>
<result
column=
"HandsPersonId"
jdbcType=
"BIGINT"
property=
"handspersonid"
/>
<result
column=
"HandsPersonId"
jdbcType=
"BIGINT"
property=
"handspersonid"
/>
<result
column=
"AccountId"
jdbcType=
"BIGINT"
property=
"accountid"
/>
<result
column=
"AccountId"
jdbcType=
"BIGINT"
property=
"accountid"
/>
<result
column=
"ChangeAmount"
jdbcType=
"DECIMAL"
property=
"changeamount"
/>
<result
column=
"ChangeAmount"
jdbcType=
"DECIMAL"
property=
"changeamount"
/>
<result
column=
"AllocationProjectId"
jdbcType=
"BIGINT"
property=
"allocationprojectid"
/>
<result
column=
"AllocationProjectId"
jdbcType=
"BIGINT"
property=
"allocationprojectid"
/>
<result
column=
"TotalPrice"
jdbcType=
"DECIMAL"
property=
"totalprice"
/>
<result
column=
"TotalPrice"
jdbcType=
"DECIMAL"
property=
"totalprice"
/>
<result
column=
"PayType"
jdbcType=
"VARCHAR"
property=
"paytype"
/>
<result
column=
"PayType"
jdbcType=
"VARCHAR"
property=
"paytype"
/>
<result
column=
"Remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"Remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"Salesman"
jdbcType=
"VARCHAR"
property=
"salesman"
/>
<result
column=
"Salesman"
jdbcType=
"VARCHAR"
property=
"salesman"
/>
<result
column=
"AccountIdList"
jdbcType=
"VARCHAR"
property=
"accountidlist"
/>
<result
column=
"AccountIdList"
jdbcType=
"VARCHAR"
property=
"accountidlist"
/>
<result
column=
"AccountMoneyList"
jdbcType=
"VARCHAR"
property=
"accountmoneylist"
/>
<result
column=
"AccountMoneyList"
jdbcType=
"VARCHAR"
property=
"accountmoneylist"
/>
<result
column=
"Discount"
jdbcType=
"DECIMAL"
property=
"discount"
/>
<result
column=
"Discount"
jdbcType=
"DECIMAL"
property=
"discount"
/>
<result
column=
"DiscountMoney"
jdbcType=
"DECIMAL"
property=
"discountmoney"
/>
<result
column=
"DiscountMoney"
jdbcType=
"DECIMAL"
property=
"discountmoney"
/>
<result
column=
"DiscountLastMoney"
jdbcType=
"DECIMAL"
property=
"discountlastmoney"
/>
<result
column=
"DiscountLastMoney"
jdbcType=
"DECIMAL"
property=
"discountlastmoney"
/>
<result
column=
"OtherMoney"
jdbcType=
"DECIMAL"
property=
"othermoney"
/>
<result
column=
"OtherMoney"
jdbcType=
"DECIMAL"
property=
"othermoney"
/>
<result
column=
"OtherMoneyList"
jdbcType=
"VARCHAR"
property=
"othermoneylist"
/>
<result
column=
"OtherMoneyList"
jdbcType=
"VARCHAR"
property=
"othermoneylist"
/>
<result
column=
"OtherMoneyItem"
jdbcType=
"VARCHAR"
property=
"othermoneyitem"
/>
<result
column=
"OtherMoneyItem"
jdbcType=
"VARCHAR"
property=
"othermoneyitem"
/>
<result
column=
"AccountDay"
jdbcType=
"INTEGER"
property=
"accountday"
/>
<result
column=
"AccountDay"
jdbcType=
"INTEGER"
property=
"accountday"
/>
<result
column=
"Status"
jdbcType=
"VARCHAR"
property=
"status"
/>
<result
column=
"Status"
jdbcType=
"VARCHAR"
property=
"status"
/>
<result
column=
"LinkNumber"
jdbcType=
"VARCHAR"
property=
"linknumber"
/>
<result
column=
"LinkNumber"
jdbcType=
"VARCHAR"
property=
"linknumber"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"delete_Flag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
<result
column=
"delete_Flag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
</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, Type, SubType, ProjectId, DefaultNumber, Number, OperPersonName, CreateTime,
Id, Type, SubType, ProjectId, DefaultNumber, Number, OperPersonName, CreateTime,
OperTime, OrganId, HandsPersonId, AccountId, ChangeAmount, AllocationProjectId, TotalPrice,
OperTime, OrganId, HandsPersonId, AccountId, ChangeAmount, AllocationProjectId, TotalPrice,
PayType, Remark, Salesman, AccountIdList, AccountMoneyList, Discount, DiscountMoney,
PayType, Remark, Salesman, AccountIdList, AccountMoneyList, Discount, DiscountMoney,
DiscountLastMoney, OtherMoney, OtherMoneyList, OtherMoneyItem, AccountDay, Status,
DiscountLastMoney, OtherMoney, OtherMoneyList, OtherMoneyItem, AccountDay, Status,
LinkNumber, tenant_id, delete_Flag
LinkNumber, tenant_id, delete_Flag
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
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_depothead
from jsh_depothead
<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_depothead
from jsh_depothead
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_depothead
delete from jsh_depothead
where Id = #{id,jdbcType=BIGINT}
where Id = #{id,jdbcType=BIGINT}
</delete>
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
>
delete from jsh_depothead
delete from jsh_depothead
<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.DepotHead"
>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
<selectKey
keyProperty=
"id"
order=
"BEFORE"
resultType=
"java.lang.Long"
>
insert into jsh_depothead (Id, Type, SubType,
SELECT LAST_INSERT_ID()
ProjectId, DefaultNumber, Number,
</selectKey>
OperPersonName, CreateTime, OperTime,
insert into jsh_depothead (Id, Type, SubType,
OrganId, HandsPersonId, AccountId,
ProjectId, DefaultNumber, Number,
ChangeAmount, AllocationProjectId, TotalPrice,
OperPersonName, CreateTime, OperTime,
PayType, Remark, Salesman,
OrganId, HandsPersonId, AccountId,
AccountIdList, AccountMoneyList, Discount,
ChangeAmount, AllocationProjectId, TotalPrice,
DiscountMoney, DiscountLastMoney, OtherMoney,
PayType, Remark, Salesman,
OtherMoneyList, OtherMoneyItem, AccountDay,
AccountIdList, AccountMoneyList, Discount,
Status, LinkNumber, tenant_id,
DiscountMoney, DiscountLastMoney, OtherMoney,
delete_Flag)
OtherMoneyList, OtherMoneyItem, AccountDay,
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subtype,jdbcType=VARCHAR},
Status, LinkNumber, tenant_id,
#{projectid,jdbcType=BIGINT}, #{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR},
delete_Flag)
#{operpersonname,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP},
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subtype,jdbcType=VARCHAR},
#{organid,jdbcType=BIGINT}, #{handspersonid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT},
#{projectid,jdbcType=BIGINT}, #{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR},
#{changeamount,jdbcType=DECIMAL}, #{allocationprojectid,jdbcType=BIGINT}, #{totalprice,jdbcType=DECIMAL},
#{operpersonname,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP},
#{paytype,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{salesman,jdbcType=VARCHAR},
#{organid,jdbcType=BIGINT}, #{handspersonid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT},
#{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL},
#{changeamount,jdbcType=DECIMAL}, #{allocationprojectid,jdbcType=BIGINT}, #{totalprice,jdbcType=DECIMAL},
#{discountmoney,jdbcType=DECIMAL}, #{discountlastmoney,jdbcType=DECIMAL}, #{othermoney,jdbcType=DECIMAL},
#{paytype,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{salesman,jdbcType=VARCHAR},
#{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER},
#{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL},
#{status,jdbcType=VARCHAR}, #{linknumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
#{discountmoney,jdbcType=DECIMAL}, #{discountlastmoney,jdbcType=DECIMAL}, #{othermoney,jdbcType=DECIMAL},
#{deleteFlag,jdbcType=VARCHAR})
#{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER},
</insert>
#{status,jdbcType=VARCHAR}, #{linknumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT},
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
#{deleteFlag,jdbcType=VARCHAR})
insert into jsh_depothead
</insert>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
<if
test=
"id != null"
>
<selectKey
keyProperty=
"id"
order=
"BEFORE"
resultType=
"java.lang.Long"
>
Id,
SELECT LAST_INSERT_ID()
</if>
</selectKey>
<if
test=
"type != null"
>
insert into jsh_depothead
Type,
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
</if>
Id,
<if
test=
"subtype != null"
>
<if
test=
"type != null"
>
SubType,
Type,
</if>
</if>
<if
test=
"projectid != null"
>
<if
test=
"subtype != null"
>
ProjectId,
SubType,
</if>
</if>
<if
test=
"defaultnumber != null"
>
<if
test=
"projectid != null"
>
DefaultNumber,
ProjectId,
</if>
</if>
<if
test=
"number != null"
>
<if
test=
"defaultnumber != null"
>
Number,
DefaultNumber,
</if>
</if>
<if
test=
"operpersonname != null"
>
<if
test=
"number != null"
>
OperPersonName,
Number,
</if>
</if>
<if
test=
"createtime != null"
>
<if
test=
"operpersonname != null"
>
CreateTime,
OperPersonName,
</if>
</if>
<if
test=
"opertime != null"
>
<if
test=
"createtime != null"
>
OperTime,
CreateTime,
</if>
</if>
<if
test=
"organid != null"
>
<if
test=
"opertime != null"
>
OrganId,
OperTime,
</if>
</if>
<if
test=
"handspersonid != null"
>
<if
test=
"organid != null"
>
HandsPersonId,
OrganId,
</if>
</if>
<if
test=
"accountid != null"
>
<if
test=
"handspersonid != null"
>
AccountId,
HandsPersonId,
</if>
</if>
<if
test=
"changeamount != null"
>
<if
test=
"accountid != null"
>
ChangeAmount,
AccountId,
</if>
</if>
<if
test=
"allocationprojectid != null"
>
<if
test=
"changeamount != null"
>
AllocationProjectId,
ChangeAmount,
</if>
</if>
<if
test=
"totalprice != null"
>
<if
test=
"allocationprojectid != null"
>
TotalPrice,
AllocationProjectId,
</if>
</if>
<if
test=
"paytype != null"
>
<if
test=
"totalprice != null"
>
PayType,
TotalPrice,
</if>
</if>
<if
test=
"remark != null"
>
<if
test=
"paytype != null"
>
Remark,
PayType,
</if>
</if>
<if
test=
"salesman != null"
>
<if
test=
"remark != null"
>
Salesman,
Remark,
</if>
</if>
<if
test=
"accountidlist != null"
>
<if
test=
"salesman != null"
>
AccountIdList,
Salesman,
</if>
</if>
<if
test=
"accountmoneylist != null"
>
<if
test=
"accountidlist != null"
>
AccountMoneyList,
AccountIdList,
</if>
</if>
<if
test=
"discount != null"
>
<if
test=
"accountmoneylist != null"
>
Discount,
AccountMoneyList,
</if>
</if>
<if
test=
"discountmoney != null"
>
<if
test=
"discount != null"
>
DiscountMoney,
Discount,
</if>
</if>
<if
test=
"discountlastmoney != null"
>
<if
test=
"discountmoney != null"
>
DiscountLastMoney,
DiscountMoney,
</if>
</if>
<if
test=
"othermoney != null"
>
<if
test=
"discountlastmoney != null"
>
OtherMoney,
DiscountLastMoney,
</if>
</if>
<if
test=
"othermoneylist != null"
>
<if
test=
"othermoney != null"
>
OtherMoneyList,
OtherMoney,
</if>
</if>
<if
test=
"othermoneyitem != null"
>
<if
test=
"othermoneylist != null"
>
OtherMoneyItem,
OtherMoneyList,
</if>
</if>
<if
test=
"accountday != null"
>
<if
test=
"othermoneyitem != null"
>
AccountDay,
OtherMoneyItem,
</if>
</if>
<if
test=
"status != null"
>
<if
test=
"accountday != null"
>
Status,
AccountDay,
</if>
</if>
<if
test=
"linknumber != null"
>
<if
test=
"status != null"
>
LinkNumber,
Status,
</if>
</if>
<if
test=
"tenantId != null"
>
<if
test=
"linknumber != null"
>
tenant_id,
LinkNumber,
</if>
</if>
<if
test=
"deleteFlag != null"
>
<if
test=
"tenantId != null"
>
delete_Flag,
tenant_id,
</if>
</if>
</trim>
<if
test=
"deleteFlag != null"
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
delete_Flag,
<if
test=
"id != null"
>
</if>
#{id,jdbcType=BIGINT},
</trim>
</if>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"type != null"
>
#{id,jdbcType=BIGINT},
#{type,jdbcType=VARCHAR},
<if
test=
"type != null"
>
</if>
#{type,jdbcType=VARCHAR},
<if
test=
"subtype != null"
>
</if>
#{subtype,jdbcType=VARCHAR},
<if
test=
"subtype != null"
>
</if>
#{subtype,jdbcType=VARCHAR},
<if
test=
"projectid != null"
>
</if>
#{projectid,jdbcType=BIGINT},
<if
test=
"projectid != null"
>
</if>
#{projectid,jdbcType=BIGINT},
<if
test=
"defaultnumber != null"
>
</if>
#{defaultnumber,jdbcType=VARCHAR},
<if
test=
"defaultnumber != null"
>
</if>
#{defaultnumber,jdbcType=VARCHAR},
<if
test=
"number != null"
>
</if>
#{number,jdbcType=VARCHAR},
<if
test=
"number != null"
>
</if>
#{number,jdbcType=VARCHAR},
<if
test=
"operpersonname != null"
>
</if>
#{operpersonname,jdbcType=VARCHAR},
<if
test=
"operpersonname != null"
>
</if>
#{operpersonname,jdbcType=VARCHAR},
<if
test=
"createtime != null"
>
</if>
#{createtime,jdbcType=TIMESTAMP},
<if
test=
"createtime != null"
>
</if>
#{createtime,jdbcType=TIMESTAMP},
<if
test=
"opertime != null"
>
</if>
#{opertime,jdbcType=TIMESTAMP},
<if
test=
"opertime != null"
>
</if>
#{opertime,jdbcType=TIMESTAMP},
<if
test=
"organid != null"
>
</if>
#{organid,jdbcType=BIGINT},
<if
test=
"organid != null"
>
</if>
#{organid,jdbcType=BIGINT},
<if
test=
"handspersonid != null"
>
</if>
#{handspersonid,jdbcType=BIGINT},
<if
test=
"handspersonid != null"
>
</if>
#{handspersonid,jdbcType=BIGINT},
<if
test=
"accountid != null"
>
</if>
#{accountid,jdbcType=BIGINT},
<if
test=
"accountid != null"
>
</if>
#{accountid,jdbcType=BIGINT},
<if
test=
"changeamount != null"
>
</if>
#{changeamount,jdbcType=DECIMAL},
<if
test=
"changeamount != null"
>
</if>
#{changeamount,jdbcType=DECIMAL},
<if
test=
"allocationprojectid != null"
>
</if>
#{allocationprojectid,jdbcType=BIGINT},
<if
test=
"allocationprojectid != null"
>
</if>
#{allocationprojectid,jdbcType=BIGINT},
<if
test=
"totalprice != null"
>
</if>
#{totalprice,jdbcType=DECIMAL},
<if
test=
"totalprice != null"
>
</if>
#{totalprice,jdbcType=DECIMAL},
<if
test=
"paytype != null"
>
</if>
#{paytype,jdbcType=VARCHAR},
<if
test=
"paytype != null"
>
</if>
#{paytype,jdbcType=VARCHAR},
<if
test=
"remark != null"
>
</if>
#{remark,jdbcType=VARCHAR},
<if
test=
"remark != null"
>
</if>
#{remark,jdbcType=VARCHAR},
<if
test=
"salesman != null"
>
</if>
#{salesman,jdbcType=VARCHAR},
<if
test=
"salesman != null"
>
</if>
#{salesman,jdbcType=VARCHAR},
<if
test=
"accountidlist != null"
>
</if>
#{accountidlist,jdbcType=VARCHAR},
<if
test=
"accountidlist != null"
>
</if>
#{accountidlist,jdbcType=VARCHAR},
<if
test=
"accountmoneylist != null"
>
</if>
#{accountmoneylist,jdbcType=VARCHAR},
<if
test=
"accountmoneylist != null"
>
</if>
#{accountmoneylist,jdbcType=VARCHAR},
<if
test=
"discount != null"
>
</if>
#{discount,jdbcType=DECIMAL},
<if
test=
"discount != null"
>
</if>
#{discount,jdbcType=DECIMAL},
<if
test=
"discountmoney != null"
>
</if>
#{discountmoney,jdbcType=DECIMAL},
<if
test=
"discountmoney != null"
>
</if>
#{discountmoney,jdbcType=DECIMAL},
<if
test=
"discountlastmoney != null"
>
</if>
#{discountlastmoney,jdbcType=DECIMAL},
<if
test=
"discountlastmoney != null"
>
</if>
#{discountlastmoney,jdbcType=DECIMAL},
<if
test=
"othermoney != null"
>
</if>
#{othermoney,jdbcType=DECIMAL},
<if
test=
"othermoney != null"
>
</if>
#{othermoney,jdbcType=DECIMAL},
<if
test=
"othermoneylist != null"
>
</if>
#{othermoneylist,jdbcType=VARCHAR},
<if
test=
"othermoneylist != null"
>
</if>
#{othermoneylist,jdbcType=VARCHAR},
<if
test=
"othermoneyitem != null"
>
</if>
#{othermoneyitem,jdbcType=VARCHAR},
<if
test=
"othermoneyitem != null"
>
</if>
#{othermoneyitem,jdbcType=VARCHAR},
<if
test=
"accountday != null"
>
</if>
#{accountday,jdbcType=INTEGER},
<if
test=
"accountday != null"
>
</if>
#{accountday,jdbcType=INTEGER},
<if
test=
"status != null"
>
</if>
#{status,jdbcType=VARCHAR},
<if
test=
"status != null"
>
</if>
#{status,jdbcType=VARCHAR},
<if
test=
"linknumber != null"
>
</if>
#{linknumber,jdbcType=VARCHAR},
<if
test=
"linknumber != null"
>
</if>
#{linknumber,jdbcType=VARCHAR},
<if
test=
"tenantId != null"
>
</if>
#{tenantId,jdbcType=BIGINT},
<if
test=
"tenantId != null"
>
</if>
#{tenantId,jdbcType=BIGINT},
<if
test=
"deleteFlag != null"
>
</if>
#{deleteFlag,jdbcType=VARCHAR},
<if
test=
"deleteFlag != null"
>
</if>
#{deleteFlag,jdbcType=VARCHAR},
</trim>
</if>
</insert>
</trim>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultType=
"java.lang.Long"
>
</insert>
select count(*) from jsh_depothead
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultType=
"java.lang.Integer"
>
<if
test=
"_parameter != null"
>
select count(*) from jsh_depothead
<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_depothead
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<set>
update jsh_depothead
<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.type != null"
>
</if>
Type = #{record.type,jdbcType=VARCHAR},
<if
test=
"record.type != null"
>
</if>
Type = #{record.type,jdbcType=VARCHAR},
<if
test=
"record.subtype != null"
>
</if>
SubType = #{record.subtype,jdbcType=VARCHAR},
<if
test=
"record.subtype != null"
>
</if>
SubType = #{record.subtype,jdbcType=VARCHAR},
<if
test=
"record.projectid != null"
>
</if>
ProjectId = #{record.projectid,jdbcType=BIGINT},
<if
test=
"record.projectid != null"
>
</if>
ProjectId = #{record.projectid,jdbcType=BIGINT},
<if
test=
"record.defaultnumber != null"
>
</if>
DefaultNumber = #{record.defaultnumber,jdbcType=VARCHAR},
<if
test=
"record.defaultnumber != null"
>
</if>
DefaultNumber = #{record.defaultnumber,jdbcType=VARCHAR},
<if
test=
"record.number != null"
>
</if>
Number = #{record.number,jdbcType=VARCHAR},
<if
test=
"record.number != null"
>
</if>
Number = #{record.number,jdbcType=VARCHAR},
<if
test=
"record.operpersonname != null"
>
</if>
OperPersonName = #{record.operpersonname,jdbcType=VARCHAR},
<if
test=
"record.operpersonname != null"
>
</if>
OperPersonName = #{record.operpersonname,jdbcType=VARCHAR},
<if
test=
"record.createtime != null"
>
</if>
CreateTime = #{record.createtime,jdbcType=TIMESTAMP},
<if
test=
"record.createtime != null"
>
</if>
CreateTime = #{record.createtime,jdbcType=TIMESTAMP},
<if
test=
"record.opertime != null"
>
</if>
OperTime = #{record.opertime,jdbcType=TIMESTAMP},
<if
test=
"record.opertime != null"
>
</if>
OperTime = #{record.opertime,jdbcType=TIMESTAMP},
<if
test=
"record.organid != null"
>
</if>
OrganId = #{record.organid,jdbcType=BIGINT},
<if
test=
"record.organid != null"
>
</if>
OrganId = #{record.organid,jdbcType=BIGINT},
<if
test=
"record.handspersonid != null"
>
</if>
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
<if
test=
"record.handspersonid != null"
>
</if>
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
<if
test=
"record.accountid != null"
>
</if>
AccountId = #{record.accountid,jdbcType=BIGINT},
<if
test=
"record.accountid != null"
>
</if>
AccountId = #{record.accountid,jdbcType=BIGINT},
<if
test=
"record.changeamount != null"
>
</if>
ChangeAmount = #{record.changeamount,jdbcType=DECIMAL},
<if
test=
"record.changeamount != null"
>
</if>
ChangeAmount = #{record.changeamount,jdbcType=DECIMAL},
<if
test=
"record.allocationprojectid != null"
>
</if>
AllocationProjectId = #{record.allocationprojectid,jdbcType=BIGINT},
<if
test=
"record.allocationprojectid != null"
>
</if>
AllocationProjectId = #{record.allocationprojectid,jdbcType=BIGINT},
<if
test=
"record.totalprice != null"
>
</if>
TotalPrice = #{record.totalprice,jdbcType=DECIMAL},
<if
test=
"record.totalprice != null"
>
</if>
TotalPrice = #{record.totalprice,jdbcType=DECIMAL},
<if
test=
"record.paytype != null"
>
</if>
PayType = #{record.paytype,jdbcType=VARCHAR},
<if
test=
"record.paytype != null"
>
</if>
PayType = #{record.paytype,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.salesman != null"
>
</if>
Salesman = #{record.salesman,jdbcType=VARCHAR},
<if
test=
"record.salesman != null"
>
</if>
Salesman = #{record.salesman,jdbcType=VARCHAR},
<if
test=
"record.accountidlist != null"
>
</if>
AccountIdList = #{record.accountidlist,jdbcType=VARCHAR},
<if
test=
"record.accountidlist != null"
>
</if>
AccountIdList = #{record.accountidlist,jdbcType=VARCHAR},
<if
test=
"record.accountmoneylist != null"
>
</if>
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR},
<if
test=
"record.accountmoneylist != null"
>
</if>
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR},
<if
test=
"record.discount != null"
>
</if>
Discount = #{record.discount,jdbcType=DECIMAL},
<if
test=
"record.discount != null"
>
</if>
Discount = #{record.discount,jdbcType=DECIMAL},
<if
test=
"record.discountmoney != null"
>
</if>
DiscountMoney = #{record.discountmoney,jdbcType=DECIMAL},
<if
test=
"record.discountmoney != null"
>
</if>
DiscountMoney = #{record.discountmoney,jdbcType=DECIMAL},
<if
test=
"record.discountlastmoney != null"
>
</if>
DiscountLastMoney = #{record.discountlastmoney,jdbcType=DECIMAL},
<if
test=
"record.discountlastmoney != null"
>
</if>
DiscountLastMoney = #{record.discountlastmoney,jdbcType=DECIMAL},
<if
test=
"record.othermoney != null"
>
</if>
OtherMoney = #{record.othermoney,jdbcType=DECIMAL},
<if
test=
"record.othermoney != null"
>
</if>
OtherMoney = #{record.othermoney,jdbcType=DECIMAL},
<if
test=
"record.othermoneylist != null"
>
</if>
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR},
<if
test=
"record.othermoneylist != null"
>
</if>
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR},
<if
test=
"record.othermoneyitem != null"
>
</if>
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR},
<if
test=
"record.othermoneyitem != null"
>
</if>
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR},
<if
test=
"record.accountday != null"
>
</if>
AccountDay = #{record.accountday,jdbcType=INTEGER},
<if
test=
"record.accountday != null"
>
</if>
AccountDay = #{record.accountday,jdbcType=INTEGER},
<if
test=
"record.status != null"
>
</if>
Status = #{record.status,jdbcType=VARCHAR},
<if
test=
"record.status != null"
>
</if>
Status = #{record.status,jdbcType=VARCHAR},
<if
test=
"record.linknumber != null"
>
</if>
LinkNumber = #{record.linknumber,jdbcType=VARCHAR},
<if
test=
"record.linknumber != null"
>
</if>
LinkNumber = #{record.linknumber,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},
<if
test=
"record.deleteFlag != null"
>
</if>
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
<if
test=
"record.deleteFlag != null"
>
</if>
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</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_depothead
<update
id=
"updateByExample"
parameterType=
"map"
>
set Id = #{record.id,jdbcType=BIGINT},
update jsh_depothead
Type = #{record.type,jdbcType=VARCHAR},
set Id = #{record.id,jdbcType=BIGINT},
SubType = #{record.subtype,jdbcType=VARCHAR},
Type = #{record.type,jdbcType=VARCHAR},
ProjectId = #{record.projectid,jdbcType=BIGINT},
SubType = #{record.subtype,jdbcType=VARCHAR},
DefaultNumber = #{record.defaultnumber,jdbcType=VARCHAR},
ProjectId = #{record.projectid,jdbcType=BIGINT},
Number = #{record.number,jdbcType=VARCHAR},
DefaultNumber = #{record.defaultnumber,jdbcType=VARCHAR},
OperPersonName = #{record.operpersonname,jdbcType=VARCHAR},
Number = #{record.number,jdbcType=VARCHAR},
CreateTime = #{record.createtime,jdbcType=TIMESTAMP},
OperPersonName = #{record.operpersonname,jdbcType=VARCHAR},
OperTime = #{record.opertime,jdbcType=TIMESTAMP},
CreateTime = #{record.createtime,jdbcType=TIMESTAMP},
OrganId = #{record.organid,jdbcType=BIGINT},
OperTime = #{record.opertime,jdbcType=TIMESTAMP},
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
OrganId = #{record.organid,jdbcType=BIGINT},
AccountId = #{record.accountid,jdbcType=BIGINT},
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
ChangeAmount = #{record.changeamount,jdbcType=DECIMAL},
AccountId = #{record.accountid,jdbcType=BIGINT},
AllocationProjectId = #{record.allocationprojectid,jdbcType=BIGINT},
ChangeAmount = #{record.changeamount,jdbcType=DECIMAL},
TotalPrice = #{record.totalprice,jdbcType=DECIMAL},
AllocationProjectId = #{record.allocationprojectid,jdbcType=BIGINT},
PayType = #{record.paytype,jdbcType=VARCHAR},
TotalPrice = #{record.totalprice,jdbcType=DECIMAL},
Remark = #{record.remark,jdbcType=VARCHAR},
PayType = #{record.paytype,jdbcType=VARCHAR},
Salesman = #{record.salesman,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR},
AccountIdList = #{record.accountidlist,jdbcType=VARCHAR},
Salesman = #{record.salesman,jdbcType=VARCHAR},
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR},
AccountIdList = #{record.accountidlist,jdbcType=VARCHAR},
Discount = #{record.discount,jdbcType=DECIMAL},
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR},
DiscountMoney = #{record.discountmoney,jdbcType=DECIMAL},
Discount = #{record.discount,jdbcType=DECIMAL},
DiscountLastMoney = #{record.discountlastmoney,jdbcType=DECIMAL},
DiscountMoney = #{record.discountmoney,jdbcType=DECIMAL},
OtherMoney = #{record.othermoney,jdbcType=DECIMAL},
DiscountLastMoney = #{record.discountlastmoney,jdbcType=DECIMAL},
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR},
OtherMoney = #{record.othermoney,jdbcType=DECIMAL},
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR},
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR},
AccountDay = #{record.accountday,jdbcType=INTEGER},
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR},
Status = #{record.status,jdbcType=VARCHAR},
AccountDay = #{record.accountday,jdbcType=INTEGER},
LinkNumber = #{record.linknumber,jdbcType=VARCHAR},
Status = #{record.status,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
LinkNumber = #{record.linknumber,jdbcType=VARCHAR},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
tenant_id = #{record.tenantId,jdbcType=BIGINT},
<if
test=
"_parameter != null"
>
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<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.DepotHead"
>
</update>
update jsh_depothead
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
<set>
update jsh_depothead
<if
test=
"type != null"
>
<set>
Type = #{type,jdbcType=VARCHAR},
<if
test=
"type != null"
>
</if>
Type = #{type,jdbcType=VARCHAR},
<if
test=
"subtype != null"
>
</if>
SubType = #{subtype,jdbcType=VARCHAR},
<if
test=
"subtype != null"
>
</if>
SubType = #{subtype,jdbcType=VARCHAR},
<if
test=
"projectid != null"
>
</if>
ProjectId = #{projectid,jdbcType=BIGINT},
<if
test=
"projectid != null"
>
</if>
ProjectId = #{projectid,jdbcType=BIGINT},
<if
test=
"defaultnumber != null"
>
</if>
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR},
<if
test=
"defaultnumber != null"
>
</if>
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR},
<if
test=
"number != null"
>
</if>
Number = #{number,jdbcType=VARCHAR},
<if
test=
"number != null"
>
</if>
Number = #{number,jdbcType=VARCHAR},
<if
test=
"operpersonname != null"
>
</if>
OperPersonName = #{operpersonname,jdbcType=VARCHAR},
<if
test=
"operpersonname != null"
>
</if>
OperPersonName = #{operpersonname,jdbcType=VARCHAR},
<if
test=
"createtime != null"
>
</if>
CreateTime = #{createtime,jdbcType=TIMESTAMP},
<if
test=
"createtime != null"
>
</if>
CreateTime = #{createtime,jdbcType=TIMESTAMP},
<if
test=
"opertime != null"
>
</if>
OperTime = #{opertime,jdbcType=TIMESTAMP},
<if
test=
"opertime != null"
>
</if>
OperTime = #{opertime,jdbcType=TIMESTAMP},
<if
test=
"organid != null"
>
</if>
OrganId = #{organid,jdbcType=BIGINT},
<if
test=
"organid != null"
>
</if>
OrganId = #{organid,jdbcType=BIGINT},
<if
test=
"handspersonid != null"
>
</if>
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
<if
test=
"handspersonid != null"
>
</if>
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
<if
test=
"accountid != null"
>
</if>
AccountId = #{accountid,jdbcType=BIGINT},
<if
test=
"accountid != null"
>
</if>
AccountId = #{accountid,jdbcType=BIGINT},
<if
test=
"changeamount != null"
>
</if>
ChangeAmount = #{changeamount,jdbcType=DECIMAL},
<if
test=
"changeamount != null"
>
</if>
ChangeAmount = #{changeamount,jdbcType=DECIMAL},
<if
test=
"allocationprojectid != null"
>
</if>
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
<if
test=
"allocationprojectid != null"
>
</if>
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
<if
test=
"totalprice != null"
>
</if>
TotalPrice = #{totalprice,jdbcType=DECIMAL},
<if
test=
"totalprice != null"
>
</if>
TotalPrice = #{totalprice,jdbcType=DECIMAL},
<if
test=
"paytype != null"
>
</if>
PayType = #{paytype,jdbcType=VARCHAR},
<if
test=
"paytype != null"
>
</if>
PayType = #{paytype,jdbcType=VARCHAR},
<if
test=
"remark != null"
>
</if>
Remark = #{remark,jdbcType=VARCHAR},
<if
test=
"remark != null"
>
</if>
Remark = #{remark,jdbcType=VARCHAR},
<if
test=
"salesman != null"
>
</if>
Salesman = #{salesman,jdbcType=VARCHAR},
<if
test=
"salesman != null"
>
</if>
Salesman = #{salesman,jdbcType=VARCHAR},
<if
test=
"accountidlist != null"
>
</if>
AccountIdList = #{accountidlist,jdbcType=VARCHAR},
<if
test=
"accountidlist != null"
>
</if>
AccountIdList = #{accountidlist,jdbcType=VARCHAR},
<if
test=
"accountmoneylist != null"
>
</if>
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
<if
test=
"accountmoneylist != null"
>
</if>
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
<if
test=
"discount != null"
>
</if>
Discount = #{discount,jdbcType=DECIMAL},
<if
test=
"discount != null"
>
</if>
Discount = #{discount,jdbcType=DECIMAL},
<if
test=
"discountmoney != null"
>
</if>
DiscountMoney = #{discountmoney,jdbcType=DECIMAL},
<if
test=
"discountmoney != null"
>
</if>
DiscountMoney = #{discountmoney,jdbcType=DECIMAL},
<if
test=
"discountlastmoney != null"
>
</if>
DiscountLastMoney = #{discountlastmoney,jdbcType=DECIMAL},
<if
test=
"discountlastmoney != null"
>
</if>
DiscountLastMoney = #{discountlastmoney,jdbcType=DECIMAL},
<if
test=
"othermoney != null"
>
</if>
OtherMoney = #{othermoney,jdbcType=DECIMAL},
<if
test=
"othermoney != null"
>
</if>
OtherMoney = #{othermoney,jdbcType=DECIMAL},
<if
test=
"othermoneylist != null"
>
</if>
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
<if
test=
"othermoneylist != null"
>
</if>
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
<if
test=
"othermoneyitem != null"
>
</if>
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
<if
test=
"othermoneyitem != null"
>
</if>
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
<if
test=
"accountday != null"
>
</if>
AccountDay = #{accountday,jdbcType=INTEGER},
<if
test=
"accountday != null"
>
</if>
AccountDay = #{accountday,jdbcType=INTEGER},
<if
test=
"status != null"
>
</if>
Status = #{status,jdbcType=VARCHAR},
<if
test=
"status != null"
>
</if>
Status = #{status,jdbcType=VARCHAR},
<if
test=
"linknumber != null"
>
</if>
LinkNumber = #{linknumber,jdbcType=VARCHAR},
<if
test=
"linknumber != null"
>
</if>
LinkNumber = #{linknumber,jdbcType=VARCHAR},
<if
test=
"tenantId != null"
>
</if>
tenant_id = #{tenantId,jdbcType=BIGINT},
<if
test=
"tenantId != null"
>
</if>
tenant_id = #{tenantId,jdbcType=BIGINT},
<if
test=
"deleteFlag != null"
>
</if>
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
<if
test=
"deleteFlag != null"
>
</if>
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</set>
</if>
where Id = #{id,jdbcType=BIGINT}
</set>
</update>
where Id = #{id,jdbcType=BIGINT}
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
</update>
update jsh_depothead
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
set Type = #{type,jdbcType=VARCHAR},
update jsh_depothead
SubType = #{subtype,jdbcType=VARCHAR},
set Type = #{type,jdbcType=VARCHAR},
ProjectId = #{projectid,jdbcType=BIGINT},
SubType = #{subtype,jdbcType=VARCHAR},
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR},
ProjectId = #{projectid,jdbcType=BIGINT},
Number = #{number,jdbcType=VARCHAR},
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR},
OperPersonName = #{operpersonname,jdbcType=VARCHAR},
Number = #{number,jdbcType=VARCHAR},
CreateTime = #{createtime,jdbcType=TIMESTAMP},
OperPersonName = #{operpersonname,jdbcType=VARCHAR},
OperTime = #{opertime,jdbcType=TIMESTAMP},
CreateTime = #{createtime,jdbcType=TIMESTAMP},
OrganId = #{organid,jdbcType=BIGINT},
OperTime = #{opertime,jdbcType=TIMESTAMP},
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
OrganId = #{organid,jdbcType=BIGINT},
AccountId = #{accountid,jdbcType=BIGINT},
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
ChangeAmount = #{changeamount,jdbcType=DECIMAL},
AccountId = #{accountid,jdbcType=BIGINT},
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
ChangeAmount = #{changeamount,jdbcType=DECIMAL},
TotalPrice = #{totalprice,jdbcType=DECIMAL},
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
PayType = #{paytype,jdbcType=VARCHAR},
TotalPrice = #{totalprice,jdbcType=DECIMAL},
Remark = #{remark,jdbcType=VARCHAR},
PayType = #{paytype,jdbcType=VARCHAR},
Salesman = #{salesman,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR},
AccountIdList = #{accountidlist,jdbcType=VARCHAR},
Salesman = #{salesman,jdbcType=VARCHAR},
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
AccountIdList = #{accountidlist,jdbcType=VARCHAR},
Discount = #{discount,jdbcType=DECIMAL},
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
DiscountMoney = #{discountmoney,jdbcType=DECIMAL},
Discount = #{discount,jdbcType=DECIMAL},
DiscountLastMoney = #{discountlastmoney,jdbcType=DECIMAL},
DiscountMoney = #{discountmoney,jdbcType=DECIMAL},
OtherMoney = #{othermoney,jdbcType=DECIMAL},
DiscountLastMoney = #{discountlastmoney,jdbcType=DECIMAL},
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
OtherMoney = #{othermoney,jdbcType=DECIMAL},
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
AccountDay = #{accountday,jdbcType=INTEGER},
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
Status = #{status,jdbcType=VARCHAR},
AccountDay = #{accountday,jdbcType=INTEGER},
LinkNumber = #{linknumber,jdbcType=VARCHAR},
Status = #{status,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
LinkNumber = #{linknumber,jdbcType=VARCHAR},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
tenant_id = #{tenantId,jdbcType=BIGINT},
where Id = #{id,jdbcType=BIGINT}
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
</update>
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapper_xml/UserMapper.xml
View file @
b9fb7e2c
<?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>
\ No newline at end of file
src/test/resources/generatorConfig.xml
View file @
b9fb7e2c
...
@@ -37,7 +37,7 @@
...
@@ -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 @@
...
@@ -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 @@
...
@@ -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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment