Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pension
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mengmeng
pension
Commits
12d6437e
Commit
12d6437e
authored
Mar 18, 2021
by
mlchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.用户个人信息更新,添加家属信息
parent
b9619d0b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
5 deletions
+46
-5
PensionOldFamilyDao.java
...io/hmit/modules/serviceOrder/dao/PensionOldFamilyDao.java
+4
-1
UserController.java
...-api/src/main/java/io/hmit/controller/UserController.java
+3
-3
PensionOldFamilyDao.java
...io/hmit/modules/serviceOrder/dao/PensionOldFamilyDao.java
+6
-1
PensionOldFamilyService.java
...modules/serviceOrder/service/PensionOldFamilyService.java
+4
-0
PensionOldFamilyServiceImpl.java
...erviceOrder/service/impl/PensionOldFamilyServiceImpl.java
+8
-0
UserService.java
hmit-api/src/main/java/io/hmit/service/UserService.java
+3
-0
UserServiceImpl.java
...i/src/main/java/io/hmit/service/impl/UserServiceImpl.java
+14
-0
PensionOldFamilyDao.xml
...ain/resources/mapper/serviceOrder/PensionOldFamilyDao.xml
+4
-0
No files found.
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOldFamilyDao.java
View file @
12d6437e
package
io
.
hmit
.
modules
.
serviceOrder
.
dao
;
package
io
.
hmit
.
modules
.
serviceOrder
.
dao
;
import
io.hmit.common.dao.BaseDao
;
import
io.hmit.common.dao.BaseDao
;
import
io.hmit.modules.serviceOrder.dto.PensionOldFamilyDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOldFamilyEntity
;
import
io.hmit.modules.serviceOrder.entity.PensionOldFamilyEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
/**
* 老人与家属的关联表
* 老人与家属的关联表
*
*
...
@@ -12,5 +15,5 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -12,5 +15,5 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
PensionOldFamilyDao
extends
BaseDao
<
PensionOldFamilyEntity
>
{
public
interface
PensionOldFamilyDao
extends
BaseDao
<
PensionOldFamilyEntity
>
{
}
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/controller/UserController.java
View file @
12d6437e
...
@@ -37,8 +37,8 @@ public class UserController {
...
@@ -37,8 +37,8 @@ public class UserController {
@Login
@Login
@GetMapping
(
"myinfo"
)
@GetMapping
(
"myinfo"
)
@ApiOperation
(
"信息"
)
@ApiOperation
(
"信息"
)
public
Result
<
User
Entity
>
get
(
@ApiIgnore
@LoginUser
UserEntity
user
){
public
Result
<
User
InfoDTO
>
get
(
@ApiIgnore
@LoginUser
UserEntity
user
){
user
.
setPassword
(
null
);
UserInfoDTO
userDetails
=
userService
.
getUserDetails
(
user
.
getId
()
);
return
new
Result
<
User
Entity
>().
ok
(
user
);
return
new
Result
<
User
InfoDTO
>().
ok
(
userDetails
);
}
}
}
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOldFamilyDao.java
View file @
12d6437e
package
io
.
hmit
.
modules
.
serviceOrder
.
dao
;
package
io
.
hmit
.
modules
.
serviceOrder
.
dao
;
import
io.hmit.common.dao.BaseDao
;
import
io.hmit.common.dao.BaseDao
;
import
io.hmit.modules.serviceOrder.dto.PensionOldFamilyDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOldFamilyEntity
;
import
io.hmit.modules.serviceOrder.entity.PensionOldFamilyEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
/**
* 老人与家属的关联表
* 老人与家属的关联表
*
*
...
@@ -12,5 +15,7 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -12,5 +15,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
PensionOldFamilyDao
extends
BaseDao
<
PensionOldFamilyEntity
>
{
public
interface
PensionOldFamilyDao
extends
BaseDao
<
PensionOldFamilyEntity
>
{
List
<
PensionOldFamilyDTO
>
findByOldId
(
Long
oldId
);
}
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/PensionOldFamilyService.java
View file @
12d6437e
...
@@ -4,6 +4,8 @@ import io.hmit.common.service.CrudService;
...
@@ -4,6 +4,8 @@ import io.hmit.common.service.CrudService;
import
io.hmit.modules.serviceOrder.dto.PensionOldFamilyDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionOldFamilyDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOldFamilyEntity
;
import
io.hmit.modules.serviceOrder.entity.PensionOldFamilyEntity
;
import
java.util.List
;
/**
/**
* 老人与家属的关联表
* 老人与家属的关联表
*
*
...
@@ -12,4 +14,6 @@ import io.hmit.modules.serviceOrder.entity.PensionOldFamilyEntity;
...
@@ -12,4 +14,6 @@ import io.hmit.modules.serviceOrder.entity.PensionOldFamilyEntity;
*/
*/
public
interface
PensionOldFamilyService
extends
CrudService
<
PensionOldFamilyEntity
,
PensionOldFamilyDTO
>
{
public
interface
PensionOldFamilyService
extends
CrudService
<
PensionOldFamilyEntity
,
PensionOldFamilyDTO
>
{
List
<
PensionOldFamilyDTO
>
findByOldId
(
Long
oldId
);
}
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOldFamilyServiceImpl.java
View file @
12d6437e
...
@@ -7,8 +7,10 @@ import io.hmit.modules.serviceOrder.dto.PensionOldFamilyDTO;
...
@@ -7,8 +7,10 @@ import io.hmit.modules.serviceOrder.dto.PensionOldFamilyDTO;
import
io.hmit.modules.serviceOrder.entity.PensionOldFamilyEntity
;
import
io.hmit.modules.serviceOrder.entity.PensionOldFamilyEntity
;
import
io.hmit.modules.serviceOrder.service.PensionOldFamilyService
;
import
io.hmit.modules.serviceOrder.service.PensionOldFamilyService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -30,5 +32,11 @@ public class PensionOldFamilyServiceImpl extends CrudServiceImpl<PensionOldFamil
...
@@ -30,5 +32,11 @@ public class PensionOldFamilyServiceImpl extends CrudServiceImpl<PensionOldFamil
return
wrapper
;
return
wrapper
;
}
}
@Autowired
private
PensionOldFamilyDao
pensionOldFamilyDao
;
@Override
public
List
<
PensionOldFamilyDTO
>
findByOldId
(
Long
oldId
)
{
return
pensionOldFamilyDao
.
findByOldId
(
oldId
);
}
}
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/service/UserService.java
View file @
12d6437e
...
@@ -3,6 +3,7 @@ package io.hmit.service;
...
@@ -3,6 +3,7 @@ package io.hmit.service;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.service.BaseService
;
import
io.hmit.common.service.BaseService
;
import
io.hmit.dto.LoginDTO
;
import
io.hmit.dto.LoginDTO
;
import
io.hmit.dto.UserInfoDTO
;
import
io.hmit.entity.UserEntity
;
import
io.hmit.entity.UserEntity
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderDTO
;
...
@@ -21,6 +22,8 @@ public interface UserService extends BaseService<UserEntity> {
...
@@ -21,6 +22,8 @@ public interface UserService extends BaseService<UserEntity> {
UserEntity
getUserByUserId
(
Long
userId
);
UserEntity
getUserByUserId
(
Long
userId
);
UserInfoDTO
getUserDetails
(
Long
userId
);
/**
/**
* 用户登录
* 用户登录
*
*
...
...
hmit-api/src/main/java/io/hmit/service/impl/UserServiceImpl.java
View file @
12d6437e
...
@@ -6,11 +6,14 @@ import io.hmit.common.exception.ErrorCode;
...
@@ -6,11 +6,14 @@ import io.hmit.common.exception.ErrorCode;
import
io.hmit.common.exception.HmitException
;
import
io.hmit.common.exception.HmitException
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.service.impl.BaseServiceImpl
;
import
io.hmit.common.service.impl.BaseServiceImpl
;
import
io.hmit.common.utils.ConvertUtils
;
import
io.hmit.common.validator.AssertUtils
;
import
io.hmit.common.validator.AssertUtils
;
import
io.hmit.dao.UserDao
;
import
io.hmit.dao.UserDao
;
import
io.hmit.dto.LoginDTO
;
import
io.hmit.dto.LoginDTO
;
import
io.hmit.dto.UserInfoDTO
;
import
io.hmit.entity.TokenEntity
;
import
io.hmit.entity.TokenEntity
;
import
io.hmit.entity.UserEntity
;
import
io.hmit.entity.UserEntity
;
import
io.hmit.modules.serviceOrder.service.PensionOldFamilyService
;
import
io.hmit.service.TokenService
;
import
io.hmit.service.TokenService
;
import
io.hmit.service.UserService
;
import
io.hmit.service.UserService
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.apache.commons.codec.digest.DigestUtils
;
...
@@ -31,6 +34,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
...
@@ -31,6 +34,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
@Autowired
@Autowired
private
UserDao
userDao
;
private
UserDao
userDao
;
@Autowired
private
PensionOldFamilyService
pensionOldFamilyService
;
@Override
@Override
public
UserEntity
getByMobile
(
String
mobile
)
{
public
UserEntity
getByMobile
(
String
mobile
)
{
return
baseDao
.
getUserByMobile
(
mobile
);
return
baseDao
.
getUserByMobile
(
mobile
);
...
@@ -46,6 +52,14 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
...
@@ -46,6 +52,14 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
return
baseDao
.
getUserByUserId
(
userId
);
return
baseDao
.
getUserByUserId
(
userId
);
}
}
@Override
public
UserInfoDTO
getUserDetails
(
Long
userId
)
{
UserEntity
user
=
userDao
.
getUserByUserId
(
userId
);
UserInfoDTO
userInfoDTO
=
ConvertUtils
.
sourceToTarget
(
user
,
UserInfoDTO
.
class
);
userInfoDTO
.
setPensionOldFamilyDTOList
(
pensionOldFamilyService
.
findByOldId
(
userId
));
return
userInfoDTO
;
}
@Override
@Override
public
Map
<
String
,
Object
>
login
(
LoginDTO
dto
)
{
public
Map
<
String
,
Object
>
login
(
LoginDTO
dto
)
{
UserEntity
user
=
getByMobile
(
dto
.
getMobile
());
UserEntity
user
=
getByMobile
(
dto
.
getMobile
());
...
...
hmit-api/src/main/resources/mapper/serviceOrder/PensionOldFamilyDao.xml
View file @
12d6437e
...
@@ -16,5 +16,9 @@
...
@@ -16,5 +16,9 @@
<result
property=
"updateDate"
column=
"update_date"
/>
<result
property=
"updateDate"
column=
"update_date"
/>
</resultMap>
</resultMap>
<select
id=
"findByOldId"
resultType=
"io.hmit.modules.serviceOrder.dto.PensionOldFamilyDTO"
>
select * from pension_old_family
where old_id = #{oldId}
</select>
</mapper>
</mapper>
\ No newline at end of file
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