Commit 9777cf3b authored by yff's avatar yff

登录包含url和moduleid

parent 2a08c1ae
...@@ -47,6 +47,7 @@ import com.gavel.kwell.utils.HzGylxEnum; ...@@ -47,6 +47,7 @@ import com.gavel.kwell.utils.HzGylxEnum;
import com.gavel.kwell.utils.KwellParamEnum; import com.gavel.kwell.utils.KwellParamEnum;
import com.gavel.kwell.utils.SmCodeEnum; import com.gavel.kwell.utils.SmCodeEnum;
import com.gavel.kwell.utils.SmCodeModel; import com.gavel.kwell.utils.SmCodeModel;
import com.gavel.kwell.utils.YymkFKEnum;
import com.gavel.kwell.vo.GpResVO; import com.gavel.kwell.vo.GpResVO;
import com.gavel.kwell.vo.GpWoCondition; import com.gavel.kwell.vo.GpWoCondition;
import com.gavel.kwell.vo.GpbhgfkCondition; import com.gavel.kwell.vo.GpbhgfkCondition;
...@@ -56,9 +57,13 @@ import com.gavel.kwell.vo.GpfkVO; ...@@ -56,9 +57,13 @@ import com.gavel.kwell.vo.GpfkVO;
import com.gavel.kwell.vo.HzWoVO; import com.gavel.kwell.vo.HzWoVO;
import com.gavel.kzzx.dao.UserDao; import com.gavel.kzzx.dao.UserDao;
import com.gavel.kzzx.persistent.User; import com.gavel.kzzx.persistent.User;
import com.gavel.kzzx.persistent.Yymk;
import com.gavel.kzzx.service.UserRoleService; import com.gavel.kzzx.service.UserRoleService;
import com.gavel.kzzx.service.YymkService;
import com.gavel.kzzx.vo.UserRoleCondition; import com.gavel.kzzx.vo.UserRoleCondition;
import com.gavel.kzzx.vo.UserRoleVO; import com.gavel.kzzx.vo.UserRoleVO;
import com.gavel.kzzx.vo.YymkCondition;
import com.gavel.kzzx.vo.YymkVO;
import com.gavel.persistence.sql.RecordSet; import com.gavel.persistence.sql.RecordSet;
import com.gavel.wo.vo.WobomVO; import com.gavel.wo.vo.WobomVO;
...@@ -66,6 +71,10 @@ import com.gavel.wo.vo.WobomVO; ...@@ -66,6 +71,10 @@ import com.gavel.wo.vo.WobomVO;
@Service("gpfkService") @Service("gpfkService")
@Transactional @Transactional
public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService { public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService {
private static final String ZP_CODE ="ZP";
private static final String JY_CODE ="JY";
private static final String WX_CODE ="WX";
@Autowired @Autowired
private GpfkDao gpfkDao; private GpfkDao gpfkDao;
...@@ -82,6 +91,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -82,6 +91,9 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
@Autowired @Autowired
private UserRoleService userRoleService; private UserRoleService userRoleService;
@Autowired
private YymkService yymkService;
@Autowired @Autowired
private UserDao userDao; private UserDao userDao;
...@@ -964,7 +976,17 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService ...@@ -964,7 +976,17 @@ public class GpfkServiceImpl extends BaseEditServiceImpl implements GpfkService
UserInfoUtil.tokenUserMap.put(token, userInfo); UserInfoUtil.tokenUserMap.put(token, userInfo);
UsernamePasswordToken usernamePasswordToken = new UsernamePasswordToken(StringUtils.upperCase(user.getUserid()), user.getPassword()); UsernamePasswordToken usernamePasswordToken = new UsernamePasswordToken(StringUtils.upperCase(user.getUserid()), user.getPassword());
SecurityUtils.getSubject().login(usernamePasswordToken); SecurityUtils.getSubject().login(usernamePasswordToken);
return bzgxVOs.get(0); BzgxVO bzgxVO= bzgxVOs.get(0);
if(StringUtils.isNotEmpty(YymkFKEnum.getNameById(bzgxVO.getGxlx()))) {
YymkCondition yymkCondition = new YymkCondition();
yymkCondition.setMkid(YymkFKEnum.getNameById(bzgxVO.getGxlx()));
List<YymkVO> yymkVos =yymkService.query(yymkCondition).getRecords();
if(yymkVos!=null&&yymkVos.size()>0) {
bzgxVO.setFkurl(yymkVos.get(0).getUrl());
bzgxVO.setModulecode(yymkVos.get(0).getMkid());
}
}
return bzgxVO;
} }
} }
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