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
0734b057
Commit
0734b057
authored
Feb 24, 2019
by
季圣华
Browse files
更新Mapper的文件结构
parent
1151add2
Changes
48
Show whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/service/log/LogService.java
View file @
0734b057
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.jsh.erp.datasource.entities.Log
;
import
com.jsh.erp.datasource.entities.LogExample
;
import
com.jsh.erp.datasource.mappers.LogMapper
;
import
com.jsh.erp.datasource.mappers.LogMapperEx
;
import
com.jsh.erp.datasource.vo.LogVo4List
;
import
com.jsh.erp.utils.ExceptionCodeConstants
;
import
com.jsh.erp.utils.JshException
;
...
...
@@ -25,6 +26,9 @@ public class LogService {
@Resource
private
LogMapper
logMapper
;
@Resource
private
LogMapperEx
logMapperEx
;
public
Log
getLog
(
long
id
)
{
return
logMapper
.
selectByPrimaryKey
(
id
);
}
...
...
@@ -36,13 +40,13 @@ public class LogService {
public
List
<
LogVo4List
>
select
(
String
operation
,
Integer
usernameID
,
String
clientIp
,
Integer
status
,
String
beginTime
,
String
endTime
,
String
contentdetails
,
int
offset
,
int
rows
)
{
return
logMapper
.
selectByConditionLog
(
operation
,
usernameID
,
clientIp
,
status
,
beginTime
,
endTime
,
return
logMapper
Ex
.
selectByConditionLog
(
operation
,
usernameID
,
clientIp
,
status
,
beginTime
,
endTime
,
contentdetails
,
offset
,
rows
);
}
public
int
countLog
(
String
operation
,
Integer
usernameID
,
String
clientIp
,
Integer
status
,
String
beginTime
,
String
endTime
,
String
contentdetails
)
{
return
logMapper
.
countsByLog
(
operation
,
usernameID
,
clientIp
,
status
,
beginTime
,
endTime
,
contentdetails
);
return
logMapper
Ex
.
countsByLog
(
operation
,
usernameID
,
clientIp
,
status
,
beginTime
,
endTime
,
contentdetails
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
...
...
src/main/java/com/jsh/erp/service/materialProperty/MaterialPropertyService.java
View file @
0734b057
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.jsh.erp.datasource.entities.MaterialProperty
;
import
com.jsh.erp.datasource.entities.MaterialPropertyExample
;
import
com.jsh.erp.datasource.mappers.MaterialPropertyMapper
;
import
com.jsh.erp.datasource.mappers.MaterialPropertyMapperEx
;
import
com.jsh.erp.utils.StringUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -21,6 +22,9 @@ public class MaterialPropertyService {
@Resource
private
MaterialPropertyMapper
materialPropertyMapper
;
@Resource
private
MaterialPropertyMapperEx
materialPropertyMapperEx
;
public
MaterialProperty
getMaterialProperty
(
long
id
)
{
return
materialPropertyMapper
.
selectByPrimaryKey
(
id
);
}
...
...
@@ -30,11 +34,11 @@ public class MaterialPropertyService {
return
materialPropertyMapper
.
selectByExample
(
example
);
}
public
List
<
MaterialProperty
>
select
(
String
name
,
int
offset
,
int
rows
)
{
return
materialPropertyMapper
.
selectByConditionMaterialProperty
(
name
,
offset
,
rows
);
return
materialPropertyMapper
Ex
.
selectByConditionMaterialProperty
(
name
,
offset
,
rows
);
}
public
int
countMaterialProperty
(
String
name
)
{
return
materialPropertyMapper
.
countsByMaterialProperty
(
name
);
return
materialPropertyMapper
Ex
.
countsByMaterialProperty
(
name
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
...
...
src/main/java/com/jsh/erp/service/person/PersonService.java
View file @
0734b057
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.jsh.erp.datasource.entities.Person
;
import
com.jsh.erp.datasource.entities.PersonExample
;
import
com.jsh.erp.datasource.mappers.PersonMapper
;
import
com.jsh.erp.datasource.mappers.PersonMapperEx
;
import
com.jsh.erp.utils.StringUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -21,6 +22,9 @@ public class PersonService {
@Resource
private
PersonMapper
personMapper
;
@Resource
private
PersonMapperEx
personMapperEx
;
public
Person
getPerson
(
long
id
)
{
return
personMapper
.
selectByPrimaryKey
(
id
);
}
...
...
@@ -31,11 +35,11 @@ public class PersonService {
}
public
List
<
Person
>
select
(
String
name
,
String
type
,
int
offset
,
int
rows
)
{
return
personMapper
.
selectByConditionPerson
(
name
,
type
,
offset
,
rows
);
return
personMapper
Ex
.
selectByConditionPerson
(
name
,
type
,
offset
,
rows
);
}
public
int
countPerson
(
String
name
,
String
type
)
{
return
personMapper
.
countsByPerson
(
name
,
type
);
return
personMapper
Ex
.
countsByPerson
(
name
,
type
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
...
...
src/main/java/com/jsh/erp/service/role/RoleService.java
View file @
0734b057
...
...
@@ -6,6 +6,7 @@ import com.jsh.erp.datasource.entities.RoleExample;
import
com.jsh.erp.datasource.entities.User
;
import
com.jsh.erp.datasource.entities.UserExample
;
import
com.jsh.erp.datasource.mappers.RoleMapper
;
import
com.jsh.erp.datasource.mappers.RoleMapperEx
;
import
com.jsh.erp.datasource.mappers.UserMapper
;
import
com.jsh.erp.utils.QueryUtils
;
import
com.jsh.erp.utils.RegExpTools
;
...
...
@@ -23,6 +24,9 @@ public class RoleService {
@Resource
private
RoleMapper
roleMapper
;
@Resource
private
RoleMapperEx
roleMapperEx
;
public
Role
getRole
(
long
id
)
{
return
roleMapper
.
selectByPrimaryKey
(
id
);
}
...
...
@@ -33,11 +37,11 @@ public class RoleService {
}
public
List
<
Role
>
select
(
String
name
,
int
offset
,
int
rows
)
{
return
roleMapper
.
selectByConditionRole
(
name
,
offset
,
rows
);
return
roleMapper
Ex
.
selectByConditionRole
(
name
,
offset
,
rows
);
}
public
int
countRole
(
String
name
)
{
return
roleMapper
.
countsByRole
(
name
);
return
roleMapper
Ex
.
countsByRole
(
name
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
...
...
src/main/java/com/jsh/erp/service/supplier/SupplierService.java
View file @
0734b057
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.jsh.erp.datasource.entities.Supplier
;
import
com.jsh.erp.datasource.entities.SupplierExample
;
import
com.jsh.erp.datasource.mappers.SupplierMapper
;
import
com.jsh.erp.datasource.mappers.SupplierMapperEx
;
import
com.jsh.erp.utils.BaseResponseInfo
;
import
com.jsh.erp.utils.StringUtil
;
import
org.slf4j.Logger
;
...
...
@@ -25,6 +26,9 @@ public class SupplierService {
@Resource
private
SupplierMapper
supplierMapper
;
@Resource
private
SupplierMapperEx
supplierMapperEx
;
public
Supplier
getSupplier
(
long
id
)
{
return
supplierMapper
.
selectByPrimaryKey
(
id
);
}
...
...
@@ -35,11 +39,11 @@ public class SupplierService {
}
public
List
<
Supplier
>
select
(
String
supplier
,
String
type
,
String
phonenum
,
String
telephone
,
String
description
,
int
offset
,
int
rows
)
{
return
supplierMapper
.
selectByConditionSupplier
(
supplier
,
type
,
phonenum
,
telephone
,
description
,
offset
,
rows
);
return
supplierMapper
Ex
.
selectByConditionSupplier
(
supplier
,
type
,
phonenum
,
telephone
,
description
,
offset
,
rows
);
}
public
int
countSupplier
(
String
supplier
,
String
type
,
String
phonenum
,
String
telephone
,
String
description
)
{
return
supplierMapper
.
countsBySupplier
(
supplier
,
type
,
phonenum
,
telephone
,
description
);
return
supplierMapper
Ex
.
countsBySupplier
(
supplier
,
type
,
phonenum
,
telephone
,
description
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
...
...
@@ -134,7 +138,7 @@ public class SupplierService {
}
public
List
<
Supplier
>
findByAll
(
String
supplier
,
String
type
,
String
phonenum
,
String
telephone
,
String
description
)
{
return
supplierMapper
.
findByAll
(
supplier
,
type
,
phonenum
,
telephone
,
description
);
return
supplierMapper
Ex
.
findByAll
(
supplier
,
type
,
phonenum
,
telephone
,
description
);
}
public
BaseResponseInfo
importExcel
(
List
<
Supplier
>
mList
)
throws
Exception
{
...
...
src/main/java/com/jsh/erp/service/systemConfig/SystemConfigService.java
View file @
0734b057
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.jsh.erp.datasource.entities.SystemConfig
;
import
com.jsh.erp.datasource.entities.SystemConfigExample
;
import
com.jsh.erp.datasource.mappers.SystemConfigMapper
;
import
com.jsh.erp.datasource.mappers.SystemConfigMapperEx
;
import
com.jsh.erp.utils.StringUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -21,6 +22,9 @@ public class SystemConfigService {
@Resource
private
SystemConfigMapper
systemConfigMapper
;
@Resource
private
SystemConfigMapperEx
systemConfigMapperEx
;
public
SystemConfig
getSystemConfig
(
long
id
)
{
return
systemConfigMapper
.
selectByPrimaryKey
(
id
);
}
...
...
@@ -30,11 +34,11 @@ public class SystemConfigService {
return
systemConfigMapper
.
selectByExample
(
example
);
}
public
List
<
SystemConfig
>
select
(
int
offset
,
int
rows
)
{
return
systemConfigMapper
.
selectByConditionSystemConfig
(
offset
,
rows
);
return
systemConfigMapper
Ex
.
selectByConditionSystemConfig
(
offset
,
rows
);
}
public
int
countSystemConfig
()
{
return
systemConfigMapper
.
countsBySystemConfig
();
return
systemConfigMapper
Ex
.
countsBySystemConfig
();
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
...
...
src/main/java/com/jsh/erp/service/unit/UnitService.java
View file @
0734b057
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.jsh.erp.datasource.entities.Unit
;
import
com.jsh.erp.datasource.entities.UnitExample
;
import
com.jsh.erp.datasource.mappers.UnitMapper
;
import
com.jsh.erp.datasource.mappers.UnitMapperEx
;
import
com.jsh.erp.utils.StringUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -21,6 +22,9 @@ public class UnitService {
@Resource
private
UnitMapper
unitMapper
;
@Resource
private
UnitMapperEx
unitMapperEx
;
public
Unit
getUnit
(
long
id
)
{
return
unitMapper
.
selectByPrimaryKey
(
id
);
}
...
...
@@ -31,11 +35,11 @@ public class UnitService {
}
public
List
<
Unit
>
select
(
String
name
,
int
offset
,
int
rows
)
{
return
unitMapper
.
selectByConditionUnit
(
name
,
offset
,
rows
);
return
unitMapper
Ex
.
selectByConditionUnit
(
name
,
offset
,
rows
);
}
public
int
countUnit
(
String
name
)
{
return
unitMapper
.
countsByUnit
(
name
);
return
unitMapper
Ex
.
countsByUnit
(
name
);
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
...
...
src/main/java/com/jsh/erp/service/user/UserService.java
View file @
0734b057
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.jsh.erp.datasource.entities.User
;
import
com.jsh.erp.datasource.entities.UserExample
;
import
com.jsh.erp.datasource.mappers.UserMapper
;
import
com.jsh.erp.datasource.mappers.UserMapperEx
;
import
com.jsh.erp.utils.*
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -26,6 +27,9 @@ public class UserService {
@Resource
private
UserMapper
userMapper
;
@Resource
private
UserMapperEx
userMapperEx
;
public
User
getUser
(
long
id
)
{
return
userMapper
.
selectByPrimaryKey
(
id
);
}
...
...
@@ -36,11 +40,11 @@ public class UserService {
}
public
List
<
User
>
select
(
String
userName
,
String
loginName
,
int
offset
,
int
rows
)
{
return
userMapper
.
selectByConditionUser
(
userName
,
loginName
,
offset
,
rows
);
return
userMapper
Ex
.
selectByConditionUser
(
userName
,
loginName
,
offset
,
rows
);
}
public
int
countUser
(
String
userName
,
String
loginName
)
{
return
userMapper
.
countsByUser
(
userName
,
loginName
);
return
userMapper
Ex
.
countsByUser
(
userName
,
loginName
);
}
/**
* create by: cjl
...
...
Prev
1
2
3
Next
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