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
8cfdc3dc
Commit
8cfdc3dc
authored
Dec 24, 2019
by
季圣华
Browse files
优化用户和单据的sql
parent
193144f1
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/datasource/entities/DepotHead.java
View file @
8cfdc3dc
This diff is collapsed.
Click to expand it.
src/main/java/com/jsh/erp/datasource/entities/DepotHeadExample.java
View file @
8cfdc3dc
...
...
@@ -6,118 +6,46 @@ import java.util.Date;
import
java.util.List
;
public
class
DepotHeadExample
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
protected
String
orderByClause
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
protected
boolean
distinct
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
protected
List
<
Criteria
>
oredCriteria
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
public
DepotHeadExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
public
String
getOrderByClause
()
{
return
orderByClause
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
public
boolean
isDistinct
()
{
return
distinct
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
...
...
@@ -126,35 +54,17 @@ public class DepotHeadExample {
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
...
...
@@ -2207,12 +2117,6 @@ public class DepotHeadExample {
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_depothead
*
* @mbggenerated do_not_delete_during_merge
*/
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
...
...
@@ -2220,12 +2124,6 @@ public class DepotHeadExample {
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
public
static
class
Criterion
{
private
String
condition
;
...
...
src/main/java/com/jsh/erp/datasource/entities/User.java
View file @
8cfdc3dc
package
com.jsh.erp.datasource.entities
;
public
class
User
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.id
*
* @mbggenerated
*/
private
Long
id
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.username
*
* @mbggenerated
*/
private
String
username
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.loginame
*
* @mbggenerated
*/
private
String
loginame
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.password
*
* @mbggenerated
*/
private
String
password
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.position
*
* @mbggenerated
*/
private
String
position
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.department
*
* @mbggenerated
*/
private
String
department
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.email
*
* @mbggenerated
*/
private
String
email
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.phonenum
*
* @mbggenerated
*/
private
String
phonenum
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.ismanager
*
* @mbggenerated
*/
private
Byte
ismanager
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.isystem
*
* @mbggenerated
*/
private
Byte
isystem
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.Status
*
* @mbggenerated
*/
private
Byte
status
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.description
*
* @mbggenerated
*/
private
String
description
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.remark
*
* @mbggenerated
*/
private
String
remark
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_user.tenant_id
*
* @mbggenerated
*/
private
Long
tenantId
;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.id
*
* @return the value of jsh_user.id
*
* @mbggenerated
*/
public
Long
getId
()
{
return
id
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.id
*
* @param id the value for jsh_user.id
*
* @mbggenerated
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.username
*
* @return the value of jsh_user.username
*
* @mbggenerated
*/
public
String
getUsername
()
{
return
username
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.username
*
* @param username the value for jsh_user.username
*
* @mbggenerated
*/
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
==
null
?
null
:
username
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.loginame
*
* @return the value of jsh_user.loginame
*
* @mbggenerated
*/
public
String
getLoginame
()
{
return
loginame
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.loginame
*
* @param loginame the value for jsh_user.loginame
*
* @mbggenerated
*/
public
void
setLoginame
(
String
loginame
)
{
this
.
loginame
=
loginame
==
null
?
null
:
loginame
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.password
*
* @return the value of jsh_user.password
*
* @mbggenerated
*/
public
String
getPassword
()
{
return
password
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.password
*
* @param password the value for jsh_user.password
*
* @mbggenerated
*/
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
==
null
?
null
:
password
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.position
*
* @return the value of jsh_user.position
*
* @mbggenerated
*/
public
String
getPosition
()
{
return
position
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.position
*
* @param position the value for jsh_user.position
*
* @mbggenerated
*/
public
void
setPosition
(
String
position
)
{
this
.
position
=
position
==
null
?
null
:
position
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.department
*
* @return the value of jsh_user.department
*
* @mbggenerated
*/
public
String
getDepartment
()
{
return
department
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.department
*
* @param department the value for jsh_user.department
*
* @mbggenerated
*/
public
void
setDepartment
(
String
department
)
{
this
.
department
=
department
==
null
?
null
:
department
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.email
*
* @return the value of jsh_user.email
*
* @mbggenerated
*/
public
String
getEmail
()
{
return
email
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.email
*
* @param email the value for jsh_user.email
*
* @mbggenerated
*/
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
==
null
?
null
:
email
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.phonenum
*
* @return the value of jsh_user.phonenum
*
* @mbggenerated
*/
public
String
getPhonenum
()
{
return
phonenum
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.phonenum
*
* @param phonenum the value for jsh_user.phonenum
*
* @mbggenerated
*/
public
void
setPhonenum
(
String
phonenum
)
{
this
.
phonenum
=
phonenum
==
null
?
null
:
phonenum
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.ismanager
*
* @return the value of jsh_user.ismanager
*
* @mbggenerated
*/
public
Byte
getIsmanager
()
{
return
ismanager
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.ismanager
*
* @param ismanager the value for jsh_user.ismanager
*
* @mbggenerated
*/
public
void
setIsmanager
(
Byte
ismanager
)
{
this
.
ismanager
=
ismanager
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.isystem
*
* @return the value of jsh_user.isystem
*
* @mbggenerated
*/
public
Byte
getIsystem
()
{
return
isystem
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.isystem
*
* @param isystem the value for jsh_user.isystem
*
* @mbggenerated
*/
public
void
setIsystem
(
Byte
isystem
)
{
this
.
isystem
=
isystem
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.Status
*
* @return the value of jsh_user.Status
*
* @mbggenerated
*/
public
Byte
getStatus
()
{
return
status
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.Status
*
* @param status the value for jsh_user.Status
*
* @mbggenerated
*/
public
void
setStatus
(
Byte
status
)
{
this
.
status
=
status
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.description
*
* @return the value of jsh_user.description
*
* @mbggenerated
*/
public
String
getDescription
()
{
return
description
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.description
*
* @param description the value for jsh_user.description
*
* @mbggenerated
*/
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
==
null
?
null
:
description
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.remark
*
* @return the value of jsh_user.remark
*
* @mbggenerated
*/
public
String
getRemark
()
{
return
remark
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.remark
*
* @param remark the value for jsh_user.remark
*
* @mbggenerated
*/
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
==
null
?
null
:
remark
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column jsh_user.tenant_id
*
* @return the value of jsh_user.tenant_id
*
* @mbggenerated
*/
public
Long
getTenantId
()
{
return
tenantId
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column jsh_user.tenant_id
*
* @param tenantId the value for jsh_user.tenant_id
*
* @mbggenerated
*/
public
void
setTenantId
(
Long
tenantId
)
{
this
.
tenantId
=
tenantId
;
}
...
...
src/main/java/com/jsh/erp/datasource/entities/UserExample.java
View file @
8cfdc3dc
...
...
@@ -4,118 +4,46 @@ import java.util.ArrayList;
import
java.util.List
;
public
class
UserExample
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_user
*
* @mbggenerated
*/
protected
String
orderByClause
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_user
*
* @mbggenerated
*/
protected
boolean
distinct
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_user
*
* @mbggenerated
*/
protected
List
<
Criteria
>
oredCriteria
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
public
UserExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
public
String
getOrderByClause
()
{
return
orderByClause
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
public
boolean
isDistinct
()
{
return
distinct
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
...
...
@@ -124,35 +52,17 @@ public class UserExample {
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_user
*
* @mbggenerated
*/
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
...
...
@@ -1125,12 +1035,6 @@ public class UserExample {
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_user
*
* @mbggenerated do_not_delete_during_merge
*/
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
...
...
@@ -1138,12 +1042,6 @@ public class UserExample {
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_user
*
* @mbggenerated
*/
public
static
class
Criterion
{
private
String
condition
;
...
...
src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapper.java
View file @
8cfdc3dc
...
...
@@ -6,91 +6,25 @@ import java.util.List;
import
org.apache.ibatis.annotations.Param
;
public
interface
DepotHeadMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
int
countByExample
(
DepotHeadExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
int
deleteByExample
(
DepotHeadExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
int
insert
(
DepotHead
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
int
insertSelective
(
DepotHead
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
List
<
DepotHead
>
selectByExample
(
DepotHeadExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
DepotHead
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
DepotHead
record
,
@Param
(
"example"
)
DepotHeadExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
int
updateByExample
(
@Param
(
"record"
)
DepotHead
record
,
@Param
(
"example"
)
DepotHeadExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
int
updateByPrimaryKeySelective
(
DepotHead
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_depothead
*
* @mbggenerated
*/
int
updateByPrimaryKey
(
DepotHead
record
);
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java
View file @
8cfdc3dc
...
...
@@ -102,10 +102,6 @@ public interface DepotHeadMapperEx {
List
<
DepotHeadVo4List
>
getDetailByNumber
(
@Param
(
"number"
)
String
number
);
/**
* 新增单据主表信息,并反显单据主表id
* */
int
adddepotHead
(
DepotHead
depotHead
);
void
updateBuildOnlyNumber
();
/**
...
...
src/main/java/com/jsh/erp/datasource/mappers/UserMapper.java
View file @
8cfdc3dc
...
...
@@ -6,91 +6,25 @@ import java.util.List;
import
org.apache.ibatis.annotations.Param
;
public
interface
UserMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
int
countByExample
(
UserExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
int
deleteByExample
(
UserExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
int
insert
(
User
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
int
insertSelective
(
User
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
List
<
User
>
selectByExample
(
UserExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
User
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
User
record
,
@Param
(
"example"
)
UserExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
int
updateByExample
(
@Param
(
"record"
)
User
record
,
@Param
(
"example"
)
UserExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
int
updateByPrimaryKeySelective
(
User
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_user
*
* @mbggenerated
*/
int
updateByPrimaryKey
(
User
record
);
}
\ No newline at end of file
src/main/java/com/jsh/erp/datasource/mappers/UserMapperEx.java
View file @
8cfdc3dc
...
...
@@ -25,10 +25,6 @@ public interface UserMapperEx {
List
<
UserEx
>
getUserList
(
Map
<
String
,
Object
>
parameterMap
);
int
addUser
(
UserEx
ue
);
int
updateUser
(
UserEx
ue
);
List
<
User
>
getUserListByUserNameOrLoginName
(
@Param
(
"userName"
)
String
userName
,
@Param
(
"loginame"
)
String
loginame
);
...
...
src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
8cfdc3dc
...
...
@@ -489,7 +489,7 @@ public class DepotHeadService {
depotHead
.
setCreatetime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
depotHead
.
setStatus
(
BusinessConstants
.
BILLS_STATUS_UN_AUDIT
);
try
{
depotHeadMapper
Ex
.
adddepotHead
(
depotHead
);
depotHeadMapper
.
insertSelective
(
depotHead
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/java/com/jsh/erp/service/user/UserService.java
View file @
8cfdc3dc
...
...
@@ -365,7 +365,7 @@ public class UserService {
ue
.
setStatus
(
BusinessConstants
.
USER_STATUS_NORMAL
);
int
result
=
0
;
try
{
result
=
userMapper
Ex
.
addUser
(
ue
);
result
=
userMapper
.
insertSelective
(
ue
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -396,7 +396,7 @@ public class UserService {
ue
.
setStatus
(
BusinessConstants
.
USER_STATUS_NORMAL
);
int
result
=
0
;
try
{
result
=
userMapper
Ex
.
addUser
(
ue
);
result
=
userMapper
.
insertSelective
(
ue
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
@@ -490,7 +490,7 @@ public class UserService {
public
UserEx
updateUser
(
UserEx
ue
)
throws
Exception
{
int
result
=
0
;
try
{
result
=
userMapper
Ex
.
update
User
(
ue
);
result
=
userMapper
.
update
ByPrimaryKeySelective
(
ue
);
}
catch
(
Exception
e
){
JshException
.
writeFail
(
logger
,
e
);
}
...
...
src/main/resources/mapper_xml/DepotHeadMapper.xml
View file @
8cfdc3dc
...
...
@@ -2,10 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.DepotHeadMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.DepotHead"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"Id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"Type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"SubType"
jdbcType=
"VARCHAR"
property=
"subtype"
/>
...
...
@@ -39,10 +35,6 @@
<result
column=
"delete_Flag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -72,10 +64,6 @@
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -105,10 +93,6 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, SubType, ProjectId, DefaultNumber, Number, OperPersonName, CreateTime,
OperTime, OrganId, HandsPersonId, AccountId, ChangeAmount, AllocationProjectId, TotalPrice,
PayType, Remark, Salesman, AccountIdList, AccountMoneyList, Discount, DiscountMoney,
...
...
@@ -116,10 +100,6 @@
LinkNumber, tenant_id, delete_Flag
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
...
...
@@ -134,38 +114,25 @@
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from jsh_depothead
where Id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_depothead
where Id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_depothead
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"BEFORE"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into jsh_depothead (Id, Type, SubType,
ProjectId, DefaultNumber, Number,
OperPersonName, CreateTime, OperTime,
...
...
@@ -190,15 +157,12 @@
#{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"BEFORE"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into jsh_depothead
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
Id,
</if>
Id,
<if
test=
"type != null"
>
Type,
</if>
...
...
@@ -291,9 +255,7 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
#{id,jdbcType=BIGINT},
<if
test=
"type != null"
>
#{type,jdbcType=VARCHAR},
</if>
...
...
@@ -387,20 +349,12 @@
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.DepotHeadExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_depothead
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depothead
<set>
<if
test=
"record.id != null"
>
...
...
@@ -502,10 +456,6 @@
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depothead
set Id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR},
...
...
@@ -543,10 +493,6 @@
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depothead
<set>
<if
test=
"type != null"
>
...
...
@@ -643,10 +589,6 @@
where Id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_depothead
set Type = #{type,jdbcType=VARCHAR},
SubType = #{subtype,jdbcType=VARCHAR},
...
...
src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
8cfdc3dc
...
...
@@ -324,30 +324,6 @@
and ifnull(dh.delete_Flag,'0') !='1'
</select>
<insert
id=
"adddepotHead"
parameterType=
"com.jsh.erp.datasource.entities.DepotHead"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into jsh_depothead (Type, SubType,
ProjectId, DefaultNumber, Number,
OperPersonName, CreateTime, OperTime,
OrganId, HandsPersonId, AccountId,
ChangeAmount, AllocationProjectId, TotalPrice,
PayType, Remark, Salesman,
AccountIdList, AccountMoneyList, Discount,
DiscountMoney, DiscountLastMoney, OtherMoney,
OtherMoneyList, OtherMoneyItem, AccountDay,
Status, LinkNumber)
values (#{type,jdbcType=VARCHAR}, #{subtype,jdbcType=VARCHAR},
#{projectid,jdbcType=BIGINT}, #{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR},
#{operpersonname,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP},
#{organid,jdbcType=BIGINT}, #{handspersonid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT},
#{changeamount,jdbcType=DECIMAL}, #{allocationprojectid,jdbcType=BIGINT}, #{totalprice,jdbcType=DECIMAL},
#{paytype,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{salesman,jdbcType=VARCHAR},
#{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL},
#{discountmoney,jdbcType=DECIMAL}, #{discountlastmoney,jdbcType=DECIMAL}, #{othermoney,jdbcType=DECIMAL},
#{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER},
#{status,jdbcType=VARCHAR}, #{linknumber,jdbcType=VARCHAR})
</insert>
<update
id=
"updateBuildOnlyNumber"
>
update jsh_sequence set current_val = current_val + 1 where seq_name = 'depot_number_seq'
</update>
...
...
src/main/resources/mapper_xml/UserMapper.xml
View file @
8cfdc3dc
...
...
@@ -2,10 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.UserMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.User"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"username"
jdbcType=
"VARCHAR"
property=
"username"
/>
<result
column=
"loginame"
jdbcType=
"VARCHAR"
property=
"loginame"
/>
...
...
@@ -22,10 +18,6 @@
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -55,10 +47,6 @@
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -88,18 +76,10 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, username, loginame, password, position, department, email, phonenum, ismanager,
isystem, Status, description, remark, tenant_id
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.UserExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
...
...
@@ -114,38 +94,25 @@
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from jsh_user
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_user
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.jsh.erp.datasource.entities.UserExample"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_user
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.User"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"BEFORE"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into jsh_user (id, username, loginame,
password, position, department,
email, phonenum, ismanager,
...
...
@@ -158,15 +125,12 @@
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.User"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<selectKey
keyProperty=
"id"
order=
"BEFORE"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into jsh_user
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
id,
<if
test=
"username != null"
>
username,
</if>
...
...
@@ -208,9 +172,7 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
#{id,jdbcType=BIGINT},
<if
test=
"username != null"
>
#{username,jdbcType=VARCHAR},
</if>
...
...
@@ -253,20 +215,12 @@
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.UserExample"
resultType=
"java.lang.Integer"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_user
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_user
<set>
<if
test=
"record.id != null"
>
...
...
@@ -317,10 +271,6 @@
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_user
set id = #{record.id,jdbcType=BIGINT},
username = #{record.username,jdbcType=VARCHAR},
...
...
@@ -341,10 +291,6 @@
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.jsh.erp.datasource.entities.User"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_user
<set>
<if
test=
"username != null"
>
...
...
@@ -390,10 +336,6 @@
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.jsh.erp.datasource.entities.User"
>
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_user
set username = #{username,jdbcType=VARCHAR},
loginame = #{loginame,jdbcType=VARCHAR},
...
...
src/main/resources/mapper_xml/UserMapperEx.xml
View file @
8cfdc3dc
...
...
@@ -54,61 +54,6 @@
</if>
order by user.id desc
</select>
<insert
id=
"addUser"
parameterType=
"com.jsh.erp.datasource.entities.UserEx"
useGeneratedKeys=
"true"
keyProperty=
"id"
keyColumn=
"id"
>
insert into jsh_user (username, loginame,
password, position,
email, phonenum, ismanager,
isystem, status, description,
remark)
values (#{username,jdbcType=VARCHAR}, #{loginame,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{phonenum,jdbcType=VARCHAR}, #{ismanager,jdbcType=TINYINT},
#{isystem,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{description,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR})
</insert>
<update
id=
"updateUser"
parameterType=
"com.jsh.erp.datasource.entities.UserEx"
>
update jsh_user
<set>
<if
test=
"username != null"
>
username = #{username,jdbcType=VARCHAR},
</if>
<if
test=
"loginame != null"
>
loginame = #{loginame,jdbcType=VARCHAR},
</if>
<if
test=
"password != null"
>
password = #{password,jdbcType=VARCHAR},
</if>
<if
test=
"position != null"
>
position = #{position,jdbcType=VARCHAR},
</if>
<if
test=
"department != null"
>
department = #{department,jdbcType=VARCHAR},
</if>
<if
test=
"email != null"
>
email = #{email,jdbcType=VARCHAR},
</if>
<if
test=
"phonenum != null"
>
phonenum = #{phonenum,jdbcType=VARCHAR},
</if>
<if
test=
"ismanager != null"
>
ismanager = #{ismanager,jdbcType=TINYINT},
</if>
<if
test=
"isystem != null"
>
isystem = #{isystem,jdbcType=TINYINT},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=TINYINT},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"getUserListByUserNameOrLoginName"
resultMap=
"com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap"
>
select user.id, user.username, user.loginame, user.position, user.email, user.phonenum,
user.description, user.remark,user.isystem
...
...
src/test/resources/generatorConfig.xml
View file @
8cfdc3dc
...
...
@@ -9,7 +9,7 @@
<context
id=
"DB2Tables"
targetRuntime=
"MyBatis3"
defaultModelType=
"flat"
>
<commentGenerator>
<property
name=
"suppressAllComments"
value=
"
fals
e"
/>
<property
name=
"suppressAllComments"
value=
"
tru
e"
/>
<property
name=
"suppressDate"
value=
"true"
/>
</commentGenerator>
...
...
@@ -45,7 +45,9 @@
<table tableName="jsh_accounthead" domainObjectName="AccountHead"></table>
<table tableName="jsh_accountitem" domainObjectName="AccountItem"></table>
<table tableName="jsh_depot" domainObjectName="Depot"></table>
<table tableName="jsh_depothead" domainObjectName="DepotHead"></table>
<table tableName="jsh_depothead" domainObjectName="DepotHead">
<generatedKey column="id" sqlStatement="SELECT LAST_INSERT_ID()"/>
</table>
<table tableName="jsh_depotitem" domainObjectName="DepotItem"></table>
<table tableName="jsh_functions" domainObjectName="Functions"></table>
<table tableName="jsh_inoutitem" domainObjectName="InOutItem"></table>
...
...
@@ -59,7 +61,9 @@
<table tableName="jsh_supplier" domainObjectName="Supplier"></table>
<table tableName="jsh_systemconfig" domainObjectName="SystemConfig"></table>
<table tableName="jsh_unit" domainObjectName="Unit"></table>
<table tableName="jsh_user" domainObjectName="User"></table>
<table tableName="jsh_user" domainObjectName="User">
<generatedKey column="id" sqlStatement="SELECT LAST_INSERT_ID()"/>
</table>
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></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