Commit fa4716a7 by huluobin

fix

parent 230d5445
...@@ -54,13 +54,16 @@ public class SessionHandlerInterceptor implements HandlerInterceptor { ...@@ -54,13 +54,16 @@ public class SessionHandlerInterceptor implements HandlerInterceptor {
GogirlToken gogirlToken = gogirlTokenService.getByToken(token); GogirlToken gogirlToken = gogirlTokenService.getByToken(token);
if (gogirlToken != null) { if (gogirlToken != null) {
StoreTechnician storeTechnician = storeTechnicianMapper.selectById(gogirlToken.getTechnicianId()); StoreTechnician storeTechnician = storeTechnicianMapper.selectById(gogirlToken.getTechnicianId());
if (storeTechnician != null) {
storeTechnician.setTechnicianId(storeTechnician.getId()); storeTechnician.setTechnicianId(storeTechnician.getId());
StoreManage storeManage = storeManageMapper.selectById(gogirlToken.getDepartmentId()); StoreManage storeManage = storeManageMapper.selectById(gogirlToken.getDepartmentId());
//冗余job字段
if (StringUtils.isEmpty(storeTechnician.getJobs())) { if (StringUtils.isEmpty(storeTechnician.getJobs())) {
StoreUser storeUser = storeUserMapper.selectById(storeTechnician.getUserId()); StoreUser storeUser = storeUserMapper.selectById(storeTechnician.getUserId());
storeTechnician.setJobs(storeUser.getJobs()); storeTechnician.setJobs(storeUser.getJobs());
storeTechnicianMapper.updateById(storeTechnician); storeTechnicianMapper.updateById(storeTechnician);
} }
//
if (storeManage != null) { if (storeManage != null) {
storeTechnician.setDepartmentId(gogirlToken.getDepartmentId()); storeTechnician.setDepartmentId(gogirlToken.getDepartmentId());
storeTechnician.setDepartmentName(storeManage.getName()); storeTechnician.setDepartmentName(storeManage.getName());
...@@ -68,6 +71,7 @@ public class SessionHandlerInterceptor implements HandlerInterceptor { ...@@ -68,6 +71,7 @@ public class SessionHandlerInterceptor implements HandlerInterceptor {
SessionUtils.putStoreTechnician(storeTechnician); SessionUtils.putStoreTechnician(storeTechnician);
} }
} }
}
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment