Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
b6ca5812
Commit
b6ca5812
authored
May 26, 2020
by
Simon Cheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试敏感字段插入
parent
95319cea
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
743 additions
and
190 deletions
+743
-190
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+2
-0
yd-api/src/main/java/com/yd/api/user/UserController.java
+57
-0
yd-api/src/main/java/com/yd/api/user/service/UserService.java
+26
-0
yd-api/src/main/java/com/yd/api/user/service/impl/UserServiceImpl.java
+78
-0
yd-api/src/main/java/com/yd/api/user/vo/UserRequestVO.java
+20
-0
yd-api/src/main/java/com/yd/api/user/vo/UserVO.java
+216
-0
yd-api/src/main/java/com/yd/dal/entity/customer/AclUser.java
+0
-114
yd-api/src/main/java/com/yd/dal/entity/user/AclUser.java
+216
-0
yd-api/src/main/java/com/yd/dal/mapper/user/UserMapper.java
+7
-5
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclUserDALServiceImpl.java
+0
-19
yd-api/src/main/java/com/yd/dal/service/user/AclUserDALService.java
+14
-2
yd-api/src/main/java/com/yd/dal/service/user/impl/AclUserDALServiceImpl.java
+49
-0
yd-api/src/main/resources/mapper/user/AclUserMapper.xml
+58
-50
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
b6ca5812
...
@@ -28,12 +28,14 @@ import com.yd.dal.entity.meta.ObjectCollectionTagged;
...
@@ -28,12 +28,14 @@ import com.yd.dal.entity.meta.ObjectCollectionTagged;
import
com.yd.dal.entity.practitioner.opportunity.OwnOpportunityInfo
;
import
com.yd.dal.entity.practitioner.opportunity.OwnOpportunityInfo
;
import
com.yd.dal.entity.order.PoOrder
;
import
com.yd.dal.entity.order.PoOrder
;
import
com.yd.dal.entity.survey.SurveyCustomerAnswers
;
import
com.yd.dal.entity.survey.SurveyCustomerAnswers
;
import
com.yd.dal.entity.user.AclUser
;
import
com.yd.dal.service.customer.*
;
import
com.yd.dal.service.customer.*
;
import
com.yd.dal.service.marketing.MktLeadsAssignedTrackDALService
;
import
com.yd.dal.service.marketing.MktLeadsAssignedTrackDALService
;
import
com.yd.dal.service.marketing.MktLeadsAssignedsDALService
;
import
com.yd.dal.service.marketing.MktLeadsAssignedsDALService
;
import
com.yd.dal.service.meta.*
;
import
com.yd.dal.service.meta.*
;
import
com.yd.dal.service.order.PoOrderDALService
;
import
com.yd.dal.service.order.PoOrderDALService
;
import
com.yd.dal.service.survey.SurveyCustomerAnswersDALService
;
import
com.yd.dal.service.survey.SurveyCustomerAnswersDALService
;
import
com.yd.dal.service.user.AclUserDALService
;
import
com.yd.dal.entity.customer.practitioner.*
;
import
com.yd.dal.entity.customer.practitioner.*
;
import
com.yd.dal.service.meta.MdCodeDALService
;
import
com.yd.dal.service.meta.MdCodeDALService
;
import
com.yd.dal.service.meta.MdDropOptionsDALService
;
import
com.yd.dal.service.meta.MdDropOptionsDALService
;
...
...
yd-api/src/main/java/com/yd/api/user/UserController.java
0 → 100644
View file @
b6ca5812
package
com
.
yd
.
api
.
user
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yd.api.practitioner.service.PractitionerService
;
import
com.yd.api.result.JsonResult
;
import
com.yd.api.security.vo.DESCommonVO
;
import
com.yd.api.user.service.UserService
;
import
com.yd.api.user.vo.UserRequestVO
;
import
com.yd.api.user.vo.UserVO
;
import
com.yd.util.deshandler.DESTypeHandler
;
@RestController
@RequestMapping
(
value
=
"/user"
)
public
class
UserController
{
@Autowired
private
UserService
userService
;
@RequestMapping
(
"/insert"
)
public
Object
encrypt
(
@RequestBody
UserVO
requestVO
)
throws
Exception
{
JsonResult
result
=
new
JsonResult
();
int
resultNum
=
0
;
try
{
resultNum
=
userService
.
insert
(
requestVO
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
result
.
setData
(
resultNum
);
return
result
;
}
@RequestMapping
(
"/findByIds"
)
public
Object
Decrypt
(
@RequestBody
UserRequestVO
userRequestVO
)
throws
Exception
{
JsonResult
result
=
new
JsonResult
();
List
<
UserVO
>
listVO
=
new
ArrayList
<
UserVO
>();
try
{
listVO
=
userService
.
findByIds
(
userRequestVO
.
getUserIdList
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
result
.
setData
(
listVO
);
return
result
;
}
}
yd-api/src/main/java/com/yd/api/user/service/UserService.java
0 → 100644
View file @
b6ca5812
package
com
.
yd
.
api
.
user
.
service
;
import
com.yd.api.user.vo.UserVO
;
import
com.yd.dal.entity.user.AclUser
;
import
java.util.List
;
import
org.springframework.stereotype.Service
;
@Service
(
"UserService"
)
public
interface
UserService
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
UserVO
record
);
int
insertSelective
(
UserVO
record
);
UserVO
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
UserVO
record
);
int
updateByPrimaryKey
(
UserVO
record
);
List
<
UserVO
>
findByIds
(
List
<
Long
>
userIdList
);
}
yd-api/src/main/java/com/yd/api/user/service/impl/UserServiceImpl.java
0 → 100644
View file @
b6ca5812
package
com
.
yd
.
api
.
user
.
service
.
impl
;
import
com.yd.api.user.vo.UserVO
;
import
com.yd.dal.entity.user.AclUser
;
import
com.yd.dal.service.user.AclUserDALService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
(
"userService"
)
public
class
UserServiceImpl
implements
com
.
yd
.
api
.
user
.
service
.
UserService
{
@Autowired
private
AclUserDALService
userDALService
;
@Override
public
int
deleteByPrimaryKey
(
Long
id
)
{
return
userDALService
.
deleteByPrimaryKey
(
id
);
}
@Override
public
int
insert
(
UserVO
record
)
{
AclUser
one
=
new
AclUser
();
BeanUtils
.
copyProperties
(
record
,
one
);
return
userDALService
.
insert
(
one
);
}
@Override
public
int
insertSelective
(
UserVO
record
)
{
AclUser
one
=
new
AclUser
();
BeanUtils
.
copyProperties
(
record
,
one
);
return
userDALService
.
insertSelective
(
one
);
}
@Override
public
UserVO
selectByPrimaryKey
(
Long
id
)
{
AclUser
one
=
new
AclUser
();
UserVO
record
=
new
UserVO
();
one
=
userDALService
.
selectByPrimaryKey
(
id
);
BeanUtils
.
copyProperties
(
one
,
record
);
return
record
;
}
@Override
public
int
updateByPrimaryKeySelective
(
UserVO
record
)
{
AclUser
one
=
new
AclUser
();
BeanUtils
.
copyProperties
(
record
,
one
);
return
userDALService
.
updateByPrimaryKeySelective
(
one
);
}
@Override
public
int
updateByPrimaryKey
(
UserVO
record
)
{
AclUser
one
=
new
AclUser
();
BeanUtils
.
copyProperties
(
record
,
one
);
return
userDALService
.
updateByPrimaryKey
(
one
);
}
@Override
public
List
<
UserVO
>
findByIds
(
List
<
Long
>
userIdList
)
{
List
<
UserVO
>
voUserList
=
new
ArrayList
<
UserVO
>();
List
<
AclUser
>
daUserList
=
userDALService
.
findByIds
(
userIdList
);
for
(
AclUser
one:
daUserList
)
{
UserVO
record
=
new
UserVO
();
BeanUtils
.
copyProperties
(
one
,
record
);
voUserList
.
add
(
record
);
}
return
voUserList
;
}
}
yd-api/src/main/java/com/yd/api/user/vo/UserRequestVO.java
0 → 100644
View file @
b6ca5812
package
com
.
yd
.
api
.
user
.
vo
;
import
java.util.List
;
public
class
UserRequestVO
{
private
List
<
Long
>
userIdList
;
public
List
<
Long
>
getUserIdList
()
{
return
userIdList
;
}
public
void
setUserIdList
(
List
<
Long
>
userIdList
)
{
this
.
userIdList
=
userIdList
;
}
}
\ No newline at end of file
yd-api/src/main/java/com/yd/api/user/vo/UserVO.java
0 → 100644
View file @
b6ca5812
package
com
.
yd
.
api
.
user
.
vo
;
import
java.util.Date
;
public
class
UserVO
{
private
Long
id
;
private
Integer
userRole
;
private
String
employeeNo
;
private
Integer
company
;
private
Long
deptId
;
private
Long
roleId
;
private
String
login
;
private
String
password
;
private
String
name
;
private
String
nickname
;
private
String
mobileNo
;
private
String
idNo
;
private
Date
lastLoginTime
;
private
Date
logoutTime
;
private
Integer
loginSource
;
private
Integer
isActive
;
private
String
email
;
private
Date
createdAt
;
private
Long
createdBy
;
private
Date
updatedAt
;
private
Long
updatedBy
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Integer
getUserRole
()
{
return
userRole
;
}
public
void
setUserRole
(
Integer
userRole
)
{
this
.
userRole
=
userRole
;
}
public
String
getEmployeeNo
()
{
return
employeeNo
;
}
public
void
setEmployeeNo
(
String
employeeNo
)
{
this
.
employeeNo
=
employeeNo
==
null
?
null
:
employeeNo
.
trim
();
}
public
Integer
getCompany
()
{
return
company
;
}
public
void
setCompany
(
Integer
company
)
{
this
.
company
=
company
;
}
public
Long
getDeptId
()
{
return
deptId
;
}
public
void
setDeptId
(
Long
deptId
)
{
this
.
deptId
=
deptId
;
}
public
Long
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
}
public
String
getLogin
()
{
return
login
;
}
public
void
setLogin
(
String
login
)
{
this
.
login
=
login
==
null
?
null
:
login
.
trim
();
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
==
null
?
null
:
password
.
trim
();
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
==
null
?
null
:
name
.
trim
();
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
==
null
?
null
:
nickname
.
trim
();
}
public
String
getMobileNo
()
{
return
mobileNo
;
}
public
void
setMobileNo
(
String
mobileNo
)
{
this
.
mobileNo
=
mobileNo
==
null
?
null
:
mobileNo
.
trim
();
}
public
String
getIdNo
()
{
return
idNo
;
}
public
void
setIdNo
(
String
idNo
)
{
this
.
idNo
=
idNo
==
null
?
null
:
idNo
.
trim
();
}
public
Date
getLastLoginTime
()
{
return
lastLoginTime
;
}
public
void
setLastLoginTime
(
Date
lastLoginTime
)
{
this
.
lastLoginTime
=
lastLoginTime
;
}
public
Date
getLogoutTime
()
{
return
logoutTime
;
}
public
void
setLogoutTime
(
Date
logoutTime
)
{
this
.
logoutTime
=
logoutTime
;
}
public
Integer
getLoginSource
()
{
return
loginSource
;
}
public
void
setLoginSource
(
Integer
loginSource
)
{
this
.
loginSource
=
loginSource
;
}
public
Integer
getIsActive
()
{
return
isActive
;
}
public
void
setIsActive
(
Integer
isActive
)
{
this
.
isActive
=
isActive
;
}
public
String
getEmail
()
{
return
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
==
null
?
null
:
email
.
trim
();
}
public
Date
getCreatedAt
()
{
return
createdAt
;
}
public
void
setCreatedAt
(
Date
createdAt
)
{
this
.
createdAt
=
createdAt
;
}
public
Long
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedBy
(
Long
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
public
Date
getUpdatedAt
()
{
return
updatedAt
;
}
public
void
setUpdatedAt
(
Date
updatedAt
)
{
this
.
updatedAt
=
updatedAt
;
}
public
Long
getUpdatedBy
()
{
return
updatedBy
;
}
public
void
setUpdatedBy
(
Long
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/entity/customer/AclUser.java
deleted
100644 → 0
View file @
95319cea
package
com
.
yd
.
dal
.
entity
.
customer
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* ag_acl_user
* @author
*/
@Data
public
class
AclUser
implements
Serializable
{
/**
* serial id
*/
private
Long
id
;
/**
* 1= Staff 2.Customer 3.Partner
*/
private
Integer
userRole
;
/**
* 员工编号
*/
private
String
employeeNo
;
/**
* 1= 安吉保 2=银盾
*/
private
Integer
company
;
/**
* FK ag_system_dept.id
*/
private
Long
deptId
;
/**
* FK ag_system_role.id
*/
private
Long
roleId
;
/**
* login ID
*/
private
String
login
;
/**
* 88888888
*/
private
String
password
;
/**
* user name
*/
private
String
name
;
/**
* user nickname
*/
private
String
nickname
;
private
String
mobileNo
;
private
String
idNo
;
/**
* 最后登入时间
*/
private
Date
lastLoginTime
;
/**
* 最后登出时间
*/
private
Date
logoutTime
;
/**
* 1=PC 2=Mobile 3=Pad
*/
private
Integer
loginSource
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
/**
* 员工email
*/
private
String
email
;
/**
* 创建日期
*/
private
Date
createdAt
;
/**
* creator
*/
private
Long
createdBy
;
/**
* 0000-00-00 00:00:00
*/
private
Date
updatedAt
;
/**
* updator, FK ag_acl_user.id
*/
private
Long
updatedBy
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/entity/user/AclUser.java
0 → 100644
View file @
b6ca5812
package
com
.
yd
.
dal
.
entity
.
user
;
import
java.util.Date
;
public
class
AclUser
{
private
Long
id
;
private
Integer
userRole
;
private
String
employeeNo
;
private
Integer
company
;
private
Long
deptId
;
private
Long
roleId
;
private
String
login
;
private
String
password
;
private
String
name
;
private
String
nickname
;
private
String
mobileNo
;
private
String
idNo
;
private
Date
lastLoginTime
;
private
Date
logoutTime
;
private
Integer
loginSource
;
private
Integer
isActive
;
private
String
email
;
private
Date
createdAt
;
private
Long
createdBy
;
private
Date
updatedAt
;
private
Long
updatedBy
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Integer
getUserRole
()
{
return
userRole
;
}
public
void
setUserRole
(
Integer
userRole
)
{
this
.
userRole
=
userRole
;
}
public
String
getEmployeeNo
()
{
return
employeeNo
;
}
public
void
setEmployeeNo
(
String
employeeNo
)
{
this
.
employeeNo
=
employeeNo
==
null
?
null
:
employeeNo
.
trim
();
}
public
Integer
getCompany
()
{
return
company
;
}
public
void
setCompany
(
Integer
company
)
{
this
.
company
=
company
;
}
public
Long
getDeptId
()
{
return
deptId
;
}
public
void
setDeptId
(
Long
deptId
)
{
this
.
deptId
=
deptId
;
}
public
Long
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
Long
roleId
)
{
this
.
roleId
=
roleId
;
}
public
String
getLogin
()
{
return
login
;
}
public
void
setLogin
(
String
login
)
{
this
.
login
=
login
==
null
?
null
:
login
.
trim
();
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
==
null
?
null
:
password
.
trim
();
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
==
null
?
null
:
name
.
trim
();
}
public
String
getNickname
()
{
return
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
==
null
?
null
:
nickname
.
trim
();
}
public
String
getMobileNo
()
{
return
mobileNo
;
}
public
void
setMobileNo
(
String
mobileNo
)
{
this
.
mobileNo
=
mobileNo
==
null
?
null
:
mobileNo
.
trim
();
}
public
String
getIdNo
()
{
return
idNo
;
}
public
void
setIdNo
(
String
idNo
)
{
this
.
idNo
=
idNo
==
null
?
null
:
idNo
.
trim
();
}
public
Date
getLastLoginTime
()
{
return
lastLoginTime
;
}
public
void
setLastLoginTime
(
Date
lastLoginTime
)
{
this
.
lastLoginTime
=
lastLoginTime
;
}
public
Date
getLogoutTime
()
{
return
logoutTime
;
}
public
void
setLogoutTime
(
Date
logoutTime
)
{
this
.
logoutTime
=
logoutTime
;
}
public
Integer
getLoginSource
()
{
return
loginSource
;
}
public
void
setLoginSource
(
Integer
loginSource
)
{
this
.
loginSource
=
loginSource
;
}
public
Integer
getIsActive
()
{
return
isActive
;
}
public
void
setIsActive
(
Integer
isActive
)
{
this
.
isActive
=
isActive
;
}
public
String
getEmail
()
{
return
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
==
null
?
null
:
email
.
trim
();
}
public
Date
getCreatedAt
()
{
return
createdAt
;
}
public
void
setCreatedAt
(
Date
createdAt
)
{
this
.
createdAt
=
createdAt
;
}
public
Long
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedBy
(
Long
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
public
Date
getUpdatedAt
()
{
return
updatedAt
;
}
public
void
setUpdatedAt
(
Date
updatedAt
)
{
this
.
updatedAt
=
updatedAt
;
}
public
Long
getUpdatedBy
()
{
return
updatedBy
;
}
public
void
setUpdatedBy
(
Long
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/
customer/Acl
UserMapper.java
→
yd-api/src/main/java/com/yd/dal/mapper/
user/
UserMapper.java
View file @
b6ca5812
package
com
.
yd
.
dal
.
mapper
.
customer
;
package
com
.
yd
.
dal
.
mapper
.
user
;
import
java.util.List
;
import
com.yd.dal.entity.customer.AclUser
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
com.yd.dal.entity.user.AclUser
;
public
interface
Acl
UserMapper
{
public
interface
UserMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
AclUser
record
);
int
insert
(
AclUser
record
);
...
@@ -17,6 +18,6 @@ public interface AclUserMapper {
...
@@ -17,6 +18,6 @@ public interface AclUserMapper {
int
updateByPrimaryKeySelective
(
AclUser
record
);
int
updateByPrimaryKeySelective
(
AclUser
record
);
int
updateByPrimaryKey
(
AclUser
record
);
int
updateByPrimaryKey
(
AclUser
record
);
List
<
AclUser
>
findByIds
(
@Param
(
"userIdList"
)
List
<
Long
>
userIdList
);
List
<
AclUser
>
findByIds
(
@Param
(
"userIdList"
)
List
<
Long
>
userIdList
);
}
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclUserDALServiceImpl.java
deleted
100644 → 0
View file @
95319cea
package
com
.
yd
.
dal
.
service
.
customer
.
impl
;
import
com.yd.dal.entity.customer.AclUser
;
import
com.yd.dal.mapper.customer.AclUserMapper
;
import
com.yd.dal.service.customer.AclUserDALService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
(
"aclUserDALService"
)
public
class
AclUserDALServiceImpl
implements
AclUserDALService
{
@Resource
private
AclUserMapper
aclUserMapper
;
@Override
public
List
<
AclUser
>
findByIds
(
List
<
Long
>
userIdList
)
{
return
aclUserMapper
.
findByIds
(
userIdList
);
}
}
yd-api/src/main/java/com/yd/dal/service/
custom
er/AclUserDALService.java
→
yd-api/src/main/java/com/yd/dal/service/
us
er/AclUserDALService.java
View file @
b6ca5812
package
com
.
yd
.
dal
.
service
.
custom
er
;
package
com
.
yd
.
dal
.
service
.
us
er
;
import
com.yd.dal.entity.
custom
er.AclUser
;
import
com.yd.dal.entity.
us
er.AclUser
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
@Service
(
"aclUserDALService"
)
@Service
(
"aclUserDALService"
)
public
interface
AclUserDALService
{
public
interface
AclUserDALService
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
AclUser
record
);
int
insertSelective
(
AclUser
record
);
AclUser
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
AclUser
record
);
int
updateByPrimaryKey
(
AclUser
record
);
List
<
AclUser
>
findByIds
(
List
<
Long
>
userIdList
);
List
<
AclUser
>
findByIds
(
List
<
Long
>
userIdList
);
}
}
yd-api/src/main/java/com/yd/dal/service/user/impl/AclUserDALServiceImpl.java
0 → 100644
View file @
b6ca5812
package
com
.
yd
.
dal
.
service
.
user
.
impl
;
import
com.yd.dal.entity.user.AclUser
;
import
com.yd.dal.mapper.user.UserMapper
;
import
com.yd.dal.service.user.AclUserDALService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
(
"aclUserDALService"
)
public
class
AclUserDALServiceImpl
implements
AclUserDALService
{
@Resource
private
UserMapper
aclUserMapper
;
@Override
public
List
<
AclUser
>
findByIds
(
List
<
Long
>
userIdList
)
{
return
aclUserMapper
.
findByIds
(
userIdList
);
}
@Override
public
int
deleteByPrimaryKey
(
Long
id
)
{
return
aclUserMapper
.
deleteByPrimaryKey
(
id
);
}
@Override
public
int
insert
(
AclUser
record
)
{
return
aclUserMapper
.
insert
(
record
);
}
@Override
public
int
insertSelective
(
AclUser
record
)
{
return
aclUserMapper
.
insertSelective
(
record
);
}
@Override
public
AclUser
selectByPrimaryKey
(
Long
id
)
{
return
aclUserMapper
.
selectByPrimaryKey
(
id
);
}
@Override
public
int
updateByPrimaryKeySelective
(
AclUser
record
)
{
return
aclUserMapper
.
updateByPrimaryKeySelective
(
record
);
}
@Override
public
int
updateByPrimaryKey
(
AclUser
record
)
{
return
aclUserMapper
.
updateByPrimaryKey
(
record
);
}
}
yd-api/src/main/resources/mapper/
custom
er/AclUserMapper.xml
→
yd-api/src/main/resources/mapper/
us
er/AclUserMapper.xml
View file @
b6ca5812
<?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.yd.dal.mapper.
customer.Acl
UserMapper"
>
<mapper
namespace=
"com.yd.dal.mapper.
user.
UserMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.
custom
er.AclUser"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.
us
er.AclUser"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"user_role"
jdbcType=
"INTEGER"
property=
"userRole"
/>
<result
column=
"user_role"
jdbcType=
"INTEGER"
property=
"userRole"
/>
<result
column=
"employee_no"
jdbcType=
"VARCHAR"
property=
"employeeNo"
/>
<result
column=
"employee_no"
jdbcType=
"VARCHAR"
property=
"employeeNo"
/>
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
<result
column=
"password"
jdbcType=
"VARCHAR"
property=
"password"
/>
<result
column=
"password"
jdbcType=
"VARCHAR"
property=
"password"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"nickname"
jdbcType=
"VARCHAR"
property=
"nickname"
/>
<result
column=
"nickname"
jdbcType=
"VARCHAR"
property=
"nickname"
/>
<result
column=
"mobile_no"
jdbcType=
"VARCHAR"
property=
"mobileNo"
/>
<result
column=
"mobile_no"
jdbcType=
"VARCHAR"
property=
"mobileNo"
typeHandler=
"com.yd.util.deshandler.DESTypeHandler"
/>
<result
column=
"id_no"
jdbcType=
"VARCHAR"
property=
"idNo"
/>
<result
column=
"id_no"
jdbcType=
"VARCHAR"
property=
"idNo"
typeHandler=
"com.yd.util.deshandler.DESTypeHandler"
/>
<result
column=
"last_login_time"
jdbcType=
"TIMESTAMP"
property=
"lastLoginTime"
/>
<result
column=
"last_login_time"
jdbcType=
"TIMESTAMP"
property=
"lastLoginTime"
/>
<result
column=
"logout_time"
jdbcType=
"TIMESTAMP"
property=
"logoutTime"
/>
<result
column=
"logout_time"
jdbcType=
"TIMESTAMP"
property=
"logoutTime"
/>
<result
column=
"login_source"
jdbcType=
"INTEGER"
property=
"loginSource"
/>
<result
column=
"login_source"
jdbcType=
"INTEGER"
property=
"loginSource"
/>
...
@@ -25,48 +25,53 @@
...
@@ -25,48 +25,53 @@
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, user_role, employee_no, company, dept_id, role_id,
`login`, `password`, `name`
,
id, user_role, employee_no, company, dept_id, role_id,
login, password, name, nickname
,
nickname, mobile_no, id_no, last_login_time, logout_time, login_source, is_active
,
mobile_no, id_no, last_login_time, logout_time, login_source, is_active, email, created_at
,
email, created_at,
created_by, updated_at, updated_by
created_by, updated_at, updated_by
</sql>
</sql>
<select
id=
"findByIds"
resultType=
"com.yd.dal.entity.user.AclUser"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_user
where id in
<foreach
collection=
"userIdList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</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 ag_acl_user
from ag_acl_user
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</select>
</select>
<select
id=
"findByIds"
resultType=
"com.yd.dal.entity.customer.AclUser"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_acl_user
where id in
<foreach
collection=
"userIdList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from ag_acl_user
delete from ag_acl_user
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</delete>
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclUser"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
parameterType=
"com.yd.dal.entity.user.AclUser"
>
insert into ag_acl_user (user_role, employee_no, company,
insert into ag_acl_user (id, user_role, employee_no,
dept_id, role_id, `login`,
company, dept_id, role_id,
`password`, `name`, nickname,
login, password, name,
mobile_no, id_no, last_login_time,
nickname, mobile_no, id_no,
logout_time, login_source, is_active,
last_login_time, logout_time, login_source,
email, created_at, created_by,
is_active, email, created_at,
updated_at, updated_by)
created_by, updated_at, updated_by
values (#{userRole,jdbcType=INTEGER}, #{employeeNo,jdbcType=VARCHAR}, #{company,jdbcType=INTEGER},
)
#{deptId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, #{login,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{userRole,jdbcType=INTEGER}, #{employeeNo,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR},
#{company,jdbcType=INTEGER}, #{deptId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT},
#{mobileNo,jdbcType=VARCHAR}, #{idNo,jdbcType=VARCHAR}, #{lastLoginTime,jdbcType=TIMESTAMP},
#{login,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{logoutTime,jdbcType=TIMESTAMP}, #{loginSource,jdbcType=INTEGER}, #{isActive,jdbcType=INTEGER},
#{nickname,jdbcType=VARCHAR}, #{mobileNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler}, #{idNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
#{email,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{lastLoginTime,jdbcType=TIMESTAMP}, #{logoutTime,jdbcType=TIMESTAMP}, #{loginSource,jdbcType=INTEGER},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT})
#{isActive,jdbcType=INTEGER}, #{email,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}
)
</insert>
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.customer.AclUser"
useGeneratedKeys=
"true
"
>
<insert
id=
"insertSelective"
parameterType=
"com.yd.dal.entity.user.AclUser
"
>
insert into ag_acl_user
insert into ag_acl_user
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"userRole != null"
>
<if
test=
"userRole != null"
>
user_role,
user_role,
</if>
</if>
...
@@ -83,13 +88,13 @@
...
@@ -83,13 +88,13 @@
role_id,
role_id,
</if>
</if>
<if
test=
"login != null"
>
<if
test=
"login != null"
>
`login`
,
login
,
</if>
</if>
<if
test=
"password != null"
>
<if
test=
"password != null"
>
`password`
,
password
,
</if>
</if>
<if
test=
"name != null"
>
<if
test=
"name != null"
>
`name`
,
name
,
</if>
</if>
<if
test=
"nickname != null"
>
<if
test=
"nickname != null"
>
nickname,
nickname,
...
@@ -129,6 +134,9 @@
...
@@ -129,6 +134,9 @@
</if>
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"userRole != null"
>
<if
test=
"userRole != null"
>
#{userRole,jdbcType=INTEGER},
#{userRole,jdbcType=INTEGER},
</if>
</if>
...
@@ -157,10 +165,10 @@
...
@@ -157,10 +165,10 @@
#{nickname,jdbcType=VARCHAR},
#{nickname,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"mobileNo != null"
>
<if
test=
"mobileNo != null"
>
#{mobileNo,jdbcType=VARCHAR},
#{mobileNo,jdbcType=VARCHAR
,typeHandler=com.yd.util.deshandler.DESTypeHandler
},
</if>
</if>
<if
test=
"idNo != null"
>
<if
test=
"idNo != null"
>
#{idNo,jdbcType=VARCHAR},
#{idNo,jdbcType=VARCHAR
,typeHandler=com.yd.util.deshandler.DESTypeHandler
},
</if>
</if>
<if
test=
"lastLoginTime != null"
>
<if
test=
"lastLoginTime != null"
>
#{lastLoginTime,jdbcType=TIMESTAMP},
#{lastLoginTime,jdbcType=TIMESTAMP},
...
@@ -191,7 +199,7 @@
...
@@ -191,7 +199,7 @@
</if>
</if>
</trim>
</trim>
</insert>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.
custom
er.AclUser"
>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.
us
er.AclUser"
>
update ag_acl_user
update ag_acl_user
<set>
<set>
<if
test=
"userRole != null"
>
<if
test=
"userRole != null"
>
...
@@ -210,22 +218,22 @@
...
@@ -210,22 +218,22 @@
role_id = #{roleId,jdbcType=BIGINT},
role_id = #{roleId,jdbcType=BIGINT},
</if>
</if>
<if
test=
"login != null"
>
<if
test=
"login != null"
>
`login`
= #{login,jdbcType=VARCHAR},
login
= #{login,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"password != null"
>
<if
test=
"password != null"
>
`password`
= #{password,jdbcType=VARCHAR},
password
= #{password,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"name != null"
>
<if
test=
"name != null"
>
`name`
= #{name,jdbcType=VARCHAR},
name
= #{name,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"nickname != null"
>
<if
test=
"nickname != null"
>
nickname = #{nickname,jdbcType=VARCHAR},
nickname = #{nickname,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"mobileNo != null"
>
<if
test=
"mobileNo != null"
>
mobile_no = #{mobileNo,jdbcType=VARCHAR},
mobile_no = #{mobileNo,jdbcType=VARCHAR
,typeHandler=com.yd.util.deshandler.DESTypeHandler
},
</if>
</if>
<if
test=
"idNo != null"
>
<if
test=
"idNo != null"
>
id_no = #{idNo,jdbcType=VARCHAR},
id_no = #{idNo,jdbcType=VARCHAR
,typeHandler=com.yd.util.deshandler.DESTypeHandler
},
</if>
</if>
<if
test=
"lastLoginTime != null"
>
<if
test=
"lastLoginTime != null"
>
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
...
@@ -257,19 +265,19 @@
...
@@ -257,19 +265,19 @@
</set>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.
custom
er.AclUser"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.
us
er.AclUser"
>
update ag_acl_user
update ag_acl_user
set user_role = #{userRole,jdbcType=INTEGER},
set user_role = #{userRole,jdbcType=INTEGER},
employee_no = #{employeeNo,jdbcType=VARCHAR},
employee_no = #{employeeNo,jdbcType=VARCHAR},
company = #{company,jdbcType=INTEGER},
company = #{company,jdbcType=INTEGER},
dept_id = #{deptId,jdbcType=BIGINT},
dept_id = #{deptId,jdbcType=BIGINT},
role_id = #{roleId,jdbcType=BIGINT},
role_id = #{roleId,jdbcType=BIGINT},
`login`
= #{login,jdbcType=VARCHAR},
login
= #{login,jdbcType=VARCHAR},
`password`
= #{password,jdbcType=VARCHAR},
password
= #{password,jdbcType=VARCHAR},
`name`
= #{name,jdbcType=VARCHAR},
name
= #{name,jdbcType=VARCHAR},
nickname = #{nickname,jdbcType=VARCHAR},
nickname = #{nickname,jdbcType=VARCHAR},
mobile_no = #{mobileNo,jdbcType=VARCHAR},
mobile_no = #{mobileNo,jdbcType=VARCHAR
,typeHandler=com.yd.util.deshandler.DESTypeHandler
},
id_no = #{idNo,jdbcType=VARCHAR},
id_no = #{idNo,jdbcType=VARCHAR
,typeHandler=com.yd.util.deshandler.DESTypeHandler
},
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
logout_time = #{logoutTime,jdbcType=TIMESTAMP},
logout_time = #{logoutTime,jdbcType=TIMESTAMP},
login_source = #{loginSource,jdbcType=INTEGER},
login_source = #{loginSource,jdbcType=INTEGER},
...
...
Write
Preview
Markdown
is supported
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