|
|
@@ -271,22 +271,25 @@ public class ActivityRegistrationService extends BaseService<ActivityRegistratio
|
|
|
*/
|
|
|
public List<ActivityRegistration> getCurrRegUsers(String activity_id) {
|
|
|
|
|
|
- Integer userType = ShiroUtils.getUserType();
|
|
|
- String relationId = "";
|
|
|
- if (Objects.equals(Constant.UserType.GOVERNMENT, userType)) {
|
|
|
- relationId = "0";
|
|
|
- } else if (Objects.equals(Constant.UserType.BUILD, userType)) {
|
|
|
- relationId = ShiroUtils.getBuildId().toString();
|
|
|
- } else if (Objects.equals(Constant.UserType.STREET, userType)) {
|
|
|
- relationId = ShiroUtils.getStreetId().toString();
|
|
|
- } else if (Objects.equals(Constant.UserType.COMPANY, userType)) {
|
|
|
- relationId = ShiroUtils.getCompanyId().toString();
|
|
|
- } else if (Objects.equals(Constant.UserType.PERSONAL, userType)) {
|
|
|
- relationId = ShiroUtils.getUserId().toString();
|
|
|
- } else if (Objects.equals(Constant.UserType.WECHAT, userType)) {
|
|
|
- relationId = ShiroUtils.getUserId().toString();
|
|
|
+ if(ShiroUtils.isLogin()){
|
|
|
+ Integer userType = ShiroUtils.getUserType();
|
|
|
+ String relationId = "";
|
|
|
+ if (Objects.equals(Constant.UserType.GOVERNMENT, userType)) {
|
|
|
+ relationId = "0";
|
|
|
+ } else if (Objects.equals(Constant.UserType.BUILD, userType)) {
|
|
|
+ relationId = ShiroUtils.getBuildId().toString();
|
|
|
+ } else if (Objects.equals(Constant.UserType.STREET, userType)) {
|
|
|
+ relationId = ShiroUtils.getStreetId().toString();
|
|
|
+ } else if (Objects.equals(Constant.UserType.COMPANY, userType)) {
|
|
|
+ relationId = ShiroUtils.getCompanyId().toString();
|
|
|
+ } else if (Objects.equals(Constant.UserType.PERSONAL, userType)) {
|
|
|
+ relationId = ShiroUtils.getUserId().toString();
|
|
|
+ } else if (Objects.equals(Constant.UserType.WECHAT, userType)) {
|
|
|
+ relationId = ShiroUtils.getUserId().toString();
|
|
|
+ }
|
|
|
+ return activityRegistrationDao.findByRelationIdAndType(userType.toString(), relationId, activity_id);
|
|
|
}
|
|
|
- return activityRegistrationDao.findByRelationIdAndType(userType.toString(), relationId, activity_id);
|
|
|
+ return new ArrayList<>();
|
|
|
}
|
|
|
|
|
|
/**
|