Browse Source
# Conflicts: # epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/DepartmentController.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java # epmet-user/epmet-user-server/src/main/java/com/epmet/controller/CustomerStaffController.java # epmet-user/epmet-user-server/src/main/java/com/epmet/dao/CustomerStaffDao.java # epmet-user/epmet-user-server/src/main/java/com/epmet/service/CustomerStaffService.java # epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/CustomerStaffServiceImpl.java # epmet-user/epmet-user-server/src/main/resources/mapper/CustomerStaffDao.xmlmaster
69 changed files with 2006 additions and 255 deletions
@ -0,0 +1,63 @@ |
|||
package com.epmet; |
|||
|
|||
import com.epmet.common.token.constant.LoginConstant; |
|||
import com.epmet.commons.tools.security.dto.GovTokenDto; |
|||
import com.epmet.commons.tools.utils.CpUserDetailRedis; |
|||
import com.epmet.jwt.JwtTokenProperties; |
|||
import com.epmet.jwt.JwtTokenUtils; |
|||
import org.junit.Test; |
|||
import org.junit.runner.RunWith; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
import org.springframework.test.context.junit4.SpringRunner; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
@RunWith(SpringRunner.class) |
|||
@SpringBootTest |
|||
public class TokenGenTest { |
|||
|
|||
@Autowired |
|||
private JwtTokenProperties jwtTokenProperties; |
|||
|
|||
@Autowired |
|||
private JwtTokenUtils jwtTokenUtils; |
|||
|
|||
@Autowired |
|||
private CpUserDetailRedis cpUserDetailRedis; |
|||
|
|||
@Test |
|||
public void genToken() { |
|||
String staffId = "wxz"; |
|||
String tokenStr = generateGovWxmpToken(staffId); |
|||
int expire = jwtTokenProperties.getExpire(); |
|||
GovTokenDto govTokenDto = new GovTokenDto(); |
|||
govTokenDto.setApp(LoginConstant.APP_GOV); |
|||
govTokenDto.setClient(LoginConstant.CLIENT_WXMP); |
|||
govTokenDto.setUserId(staffId); |
|||
govTokenDto.setOpenId(""); |
|||
govTokenDto.setSessionKey(""); |
|||
govTokenDto.setUnionId(""); |
|||
govTokenDto.setToken(tokenStr); |
|||
govTokenDto.setUpdateTime(System.currentTimeMillis()); |
|||
govTokenDto.setExpireTime(jwtTokenUtils.getExpiration(tokenStr).getTime()); |
|||
govTokenDto.setAgencyId("1"); |
|||
govTokenDto.setCustomerId("f76def116c9c2dc0269cc17867af122c"); |
|||
cpUserDetailRedis.set(govTokenDto, expire); |
|||
} |
|||
|
|||
/** |
|||
* @Description 生成token |
|||
* @Date 2020/4/18 23:04 |
|||
**/ |
|||
private String generateGovWxmpToken(String staffId) { |
|||
Map<String, Object> map = new HashMap<>(); |
|||
map.put("app", LoginConstant.APP_GOV); |
|||
map.put("client", LoginConstant.CLIENT_WXMP); |
|||
map.put("userId", staffId); |
|||
String token = jwtTokenUtils.createToken(map); |
|||
return token; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,106 @@ |
|||
///**
|
|||
// * Copyright (c) 2018 人人开源 All rights reserved.
|
|||
// *
|
|||
// * https://www.renren.io
|
|||
// *
|
|||
// * 版权所有,侵权必究!
|
|||
// */
|
|||
//
|
|||
//package com.epmet.commons.mybatis.aspect;
|
|||
//
|
|||
//import cn.hutool.core.collection.CollUtil;
|
|||
//import com.epmet.commons.mybatis.annotation.DataFilter;
|
|||
//import com.epmet.commons.mybatis.entity.DataScope;
|
|||
//import com.epmet.commons.tools.constant.Constant;
|
|||
//import com.epmet.commons.tools.enums.SuperAdminEnum;
|
|||
//import com.epmet.commons.tools.exception.ErrorCode;
|
|||
//import com.epmet.commons.tools.exception.RenException;
|
|||
//import com.epmet.commons.tools.security.user.SecurityUser;
|
|||
//import com.epmet.commons.tools.security.user.UserDetail;
|
|||
//import org.apache.commons.lang3.StringUtils;
|
|||
//import org.aspectj.lang.JoinPoint;
|
|||
//import org.aspectj.lang.annotation.Aspect;
|
|||
//import org.aspectj.lang.annotation.Before;
|
|||
//import org.aspectj.lang.annotation.Pointcut;
|
|||
//import org.aspectj.lang.reflect.MethodSignature;
|
|||
//import org.springframework.stereotype.Component;
|
|||
//
|
|||
//import java.util.Arrays;
|
|||
//import java.util.List;
|
|||
//import java.util.Map;
|
|||
//
|
|||
///**
|
|||
// * 数据过滤,切面处理类
|
|||
// *
|
|||
// * @author Mark sunlightcs@gmail.com
|
|||
// * @since 1.0.0
|
|||
// */
|
|||
//@Aspect
|
|||
//@Component
|
|||
//public class DataFilterAspectBak {
|
|||
// @Pointcut("@annotation(com.epmet.commons.mybatis.annotation.DataFilter)")
|
|||
// public void dataFilterCut() {
|
|||
//
|
|||
// }
|
|||
//
|
|||
// @Before("dataFilterCut()")
|
|||
// public void dataFilter(JoinPoint point) {
|
|||
// Object params = point.getArgs()[0];
|
|||
// if(params != null && params instanceof Map){
|
|||
// UserDetail user = SecurityUser.getUser();
|
|||
//
|
|||
// //如果不是超级管理员,则进行数据过滤
|
|||
// if(user.getSuperAdmin() == SuperAdminEnum.NO.value()){
|
|||
// Map map = (Map)params;
|
|||
// String sqlFilter = getSqlFilter(user, point);
|
|||
// map.put(Constant.SQL_FILTER, new DataScope(sqlFilter));
|
|||
// }
|
|||
//
|
|||
// return ;
|
|||
// }
|
|||
//
|
|||
// throw new RenException(ErrorCode.DATA_SCOPE_PARAMS_ERROR);
|
|||
// }
|
|||
//
|
|||
// /**
|
|||
// * 获取数据过滤的SQL
|
|||
// */
|
|||
// private String getSqlFilter(UserDetail user, JoinPoint point){
|
|||
// MethodSignature signature = (MethodSignature) point.getSignature();
|
|||
// DataFilter dataFilter = signature.getMethod().getAnnotation(DataFilter.class);
|
|||
// //获取表的别名
|
|||
// String tableAlias = dataFilter.tableAlias();
|
|||
// if(StringUtils.isNotBlank(tableAlias)){
|
|||
// tableAlias += ".";
|
|||
// }
|
|||
//
|
|||
// StringBuilder sqlFilter = new StringBuilder();
|
|||
//
|
|||
// //查询条件前缀
|
|||
// String prefix = dataFilter.prefix();
|
|||
// if(StringUtils.isNotBlank(prefix)){
|
|||
// sqlFilter.append(" ").append(prefix);
|
|||
// }
|
|||
//
|
|||
// sqlFilter.append(" (");
|
|||
//
|
|||
// //部门ID列表
|
|||
// List<Long> deptIdList = user.getDeptIdList();
|
|||
// if(CollUtil.isNotEmpty(deptIdList)){
|
|||
// sqlFilter.append(tableAlias).append(dataFilter.deptId());
|
|||
//
|
|||
// sqlFilter.append(" in(").append(StringUtils.join(deptIdList, ",")).append(")");
|
|||
// }
|
|||
//
|
|||
// //查询本人数据
|
|||
// if (dataFilter.isPendingCreator()) {
|
|||
// if(CollUtil.isNotEmpty(deptIdList)){
|
|||
// sqlFilter.append(" or ");
|
|||
// }
|
|||
// sqlFilter.append(tableAlias).append(dataFilter.userId()).append("=").append(user.getId());
|
|||
// }
|
|||
// sqlFilter.append(")");
|
|||
//
|
|||
// return sqlFilter.toString();
|
|||
// }
|
|||
//}
|
@ -0,0 +1,26 @@ |
|||
package com.epmet.commons.mybatis.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.util.Set; |
|||
|
|||
@Data |
|||
public class StaffPermissionFormDTO { |
|||
|
|||
/** |
|||
* 工作人员 id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 登录头信息app |
|||
*/ |
|||
private String app; |
|||
|
|||
/** |
|||
* 登录头信息client |
|||
*/ |
|||
private String client; |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.epmet.commons.mybatis.feign; |
|||
|
|||
import com.epmet.commons.mybatis.dto.form.StaffPermissionFormDTO; |
|||
import com.epmet.commons.mybatis.feign.fallback.GovAccessFeignClientFallback; |
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
|
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* @Description |
|||
* @Author sun |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.GOV_ACCESS_SERVER, fallback = GovAccessFeignClientFallback.class) |
|||
public interface GovAccessFeignClient { |
|||
|
|||
/** |
|||
* 查询用户当前权限列表(DataFilterAspect中用到) |
|||
* @return |
|||
*/ |
|||
@PostMapping("/gov/access/access/getcurrpermissions") |
|||
Result<Set<String>> getStaffCurrPermissions(StaffPermissionFormDTO dto); |
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.commons.mybatis.feign.fallback; |
|||
|
|||
import com.epmet.commons.mybatis.dto.form.StaffPermissionFormDTO; |
|||
import com.epmet.commons.mybatis.feign.GovAccessFeignClient; |
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* 调用政府端权限 |
|||
* @Author wxz |
|||
* @Description |
|||
* @Date 2020/4/24 11:17 |
|||
**/ |
|||
@Component |
|||
public class GovAccessFeignClientFallback implements GovAccessFeignClient { |
|||
|
|||
@Override |
|||
public Result<Set<String>> getStaffCurrPermissions(StaffPermissionFormDTO dto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.GOV_ACCESS_SERVER, "getStaffCurrPermissions", dto); |
|||
} |
|||
} |
@ -0,0 +1,100 @@ |
|||
///**
|
|||
// * Copyright (c) 2018 人人开源 All rights reserved.
|
|||
// * <p>
|
|||
// * https://www.renren.io
|
|||
// * <p>
|
|||
// * 版权所有,侵权必究!
|
|||
// */
|
|||
//
|
|||
//package com.epmet.commons.mybatis.interceptor;
|
|||
//
|
|||
//import com.baomidou.mybatisplus.core.toolkit.PluginUtils;
|
|||
//import com.baomidou.mybatisplus.extension.handlers.AbstractSqlParserHandler;
|
|||
//import com.epmet.commons.mybatis.entity.DataScope;
|
|||
//import org.apache.ibatis.executor.statement.StatementHandler;
|
|||
//import org.apache.ibatis.mapping.BoundSql;
|
|||
//import org.apache.ibatis.mapping.MappedStatement;
|
|||
//import org.apache.ibatis.mapping.SqlCommandType;
|
|||
//import org.apache.ibatis.plugin.*;
|
|||
//import org.apache.ibatis.reflection.MetaObject;
|
|||
//import org.apache.ibatis.reflection.SystemMetaObject;
|
|||
//
|
|||
//import java.sql.Connection;
|
|||
//import java.util.Map;
|
|||
//import java.util.Properties;
|
|||
//
|
|||
///**
|
|||
// * 数据过滤
|
|||
// *
|
|||
// * @author Mark sunlightcs@gmail.com
|
|||
// * @since 1.0.0
|
|||
// */
|
|||
//@Intercepts({@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class, Integer.class})})
|
|||
//public class DataFilterInterceptorBak extends AbstractSqlParserHandler implements Interceptor {
|
|||
//
|
|||
// @Override
|
|||
// public Object intercept(Invocation invocation) throws Throwable {
|
|||
// StatementHandler statementHandler = (StatementHandler) PluginUtils.realTarget(invocation.getTarget());
|
|||
// MetaObject metaObject = SystemMetaObject.forObject(statementHandler);
|
|||
//
|
|||
// // SQL解析
|
|||
// this.sqlParser(metaObject);
|
|||
//
|
|||
// // 先判断是不是SELECT操作
|
|||
// MappedStatement mappedStatement = (MappedStatement) metaObject.getValue("delegate.mappedStatement");
|
|||
// if (!SqlCommandType.SELECT.equals(mappedStatement.getSqlCommandType())) {
|
|||
// return invocation.proceed();
|
|||
// }
|
|||
//
|
|||
// // 针对定义了rowBounds,做为mapper接口方法的参数
|
|||
// BoundSql boundSql = (BoundSql) metaObject.getValue("delegate.boundSql");
|
|||
// String originalSql = boundSql.getSql();
|
|||
// Object paramObj = boundSql.getParameterObject();
|
|||
//
|
|||
// // 判断参数里是否有DataScope对象
|
|||
// DataScope scope = null;
|
|||
// if (paramObj instanceof DataScope) {
|
|||
// scope = (DataScope) paramObj;
|
|||
// } else if (paramObj instanceof Map) {
|
|||
// for (Object arg : ((Map) paramObj).values()) {
|
|||
// if (arg instanceof DataScope) {
|
|||
// scope = (DataScope) arg;
|
|||
// break;
|
|||
// }
|
|||
// }
|
|||
// }
|
|||
//
|
|||
// // 不用数据过滤
|
|||
// if (scope == null) {
|
|||
// return invocation.proceed();
|
|||
// }
|
|||
//
|
|||
// // 拼接新SQL
|
|||
// String orderBy = "ORDER BY";
|
|||
// String groupBy = "GROUP BY";
|
|||
// if (originalSql.indexOf(groupBy) > -1) {
|
|||
// originalSql = originalSql.replace(groupBy, scope.getSqlFilter() + groupBy);
|
|||
// } else if (originalSql.indexOf(orderBy) > -1) {
|
|||
// originalSql = originalSql.replace(orderBy, scope.getSqlFilter() + orderBy);
|
|||
// } else {
|
|||
// originalSql = originalSql + scope.getSqlFilter();
|
|||
// }
|
|||
//
|
|||
// // 重写SQL
|
|||
// metaObject.setValue("delegate.boundSql.sql", originalSql);
|
|||
// return invocation.proceed();
|
|||
// }
|
|||
//
|
|||
// @Override
|
|||
// public Object plugin(Object target) {
|
|||
// if (target instanceof StatementHandler) {
|
|||
// return Plugin.wrap(target, this);
|
|||
// }
|
|||
// return target;
|
|||
// }
|
|||
//
|
|||
// @Override
|
|||
// public void setProperties(Properties properties) {
|
|||
//
|
|||
// }
|
|||
//}
|
@ -0,0 +1,36 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 http://www.renren.io
|
|||
* <p> |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not |
|||
* use this file except in compliance with the License. You may obtain a copy of |
|||
* the License at |
|||
* <p> |
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
|||
* <p> |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
|||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
|||
* License for the specific language governing permissions and limitations under |
|||
* the License. |
|||
*/ |
|||
|
|||
package com.epmet.commons.tools.annotation; |
|||
|
|||
import java.lang.annotation.*; |
|||
|
|||
/** |
|||
* 权限注解 |
|||
* @Author wxz |
|||
* @Description |
|||
* @Date 2020/4/23 16:17 |
|||
**/ |
|||
@Target(ElementType.METHOD) |
|||
@Retention(RetentionPolicy.RUNTIME) |
|||
@Documented |
|||
public @interface RequirePermission { |
|||
|
|||
String key() default ""; |
|||
|
|||
String desc() default ""; |
|||
|
|||
} |
@ -0,0 +1,46 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* |
|||
* https://www.renren.io
|
|||
* |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.epmet.commons.tools.aspect; |
|||
|
|||
import com.epmet.commons.tools.annotation.RequirePermission; |
|||
import org.aspectj.lang.JoinPoint; |
|||
import org.aspectj.lang.annotation.Aspect; |
|||
import org.aspectj.lang.annotation.Before; |
|||
import org.aspectj.lang.reflect.MethodSignature; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 每次请求,过滤Api中配置的权限key出来 |
|||
* @Author wxz |
|||
* @Description |
|||
* @Date 2020/4/23 16:16 |
|||
**/ |
|||
@Aspect |
|||
@Component |
|||
public class AccessOpeAspect { |
|||
|
|||
/** |
|||
* 存储所需操作权限的 ThreadLocal |
|||
*/ |
|||
public static final ThreadLocal<String> requirePermissionTl = new ThreadLocal<>(); |
|||
|
|||
@Before("@annotation(com.epmet.commons.tools.annotation.RequirePermission)") |
|||
public void before(JoinPoint point) throws Throwable { |
|||
// 取RequirePermission注解
|
|||
MethodSignature methodSignature = (MethodSignature) point.getSignature(); |
|||
RequirePermission requirePermissionAnno = methodSignature.getMethod().getAnnotation(RequirePermission.class); |
|||
String key = requirePermissionAnno.key(); |
|||
String desc = requirePermissionAnno.desc(); |
|||
System.out.println(key); |
|||
System.out.println(desc); |
|||
|
|||
// 放入ThreadLocal,供DataFilterAspect中使用
|
|||
requirePermissionTl.set(key); |
|||
} |
|||
} |
@ -1,33 +1,82 @@ |
|||
package com.epmet.commons.tools.security.user; |
|||
|
|||
import com.epmet.commons.tools.constant.Constant; |
|||
import com.epmet.commons.tools.constant.AppClientConstant; |
|||
import com.epmet.commons.tools.utils.HttpContextUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.web.context.request.RequestAttributes; |
|||
import org.springframework.web.context.request.RequestContextHolder; |
|||
import org.springframework.web.context.request.ServletRequestAttributes; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 登录用户相关工具 |
|||
*/ |
|||
@Component |
|||
public class LoginUserUtil { |
|||
|
|||
//@Autowired
|
|||
//private
|
|||
|
|||
/** |
|||
* 查询登录用户的id |
|||
* @return |
|||
*/ |
|||
public static String getLoginUserId() { |
|||
public String getLoginUserId() { |
|||
HttpServletRequest request = HttpContextUtils.getHttpServletRequest(); |
|||
if (request == null) { |
|||
return null; |
|||
} |
|||
|
|||
String userId = request.getHeader(Constant.USER_KEY); |
|||
String userId = request.getHeader(AppClientConstant.USER_ID); |
|||
if (StringUtils.isBlank(userId)) { |
|||
return null; |
|||
} |
|||
return userId; |
|||
} |
|||
|
|||
/** |
|||
* 登录用户的App头信息 |
|||
* @return |
|||
*/ |
|||
public String getLoginUserApp() { |
|||
HttpServletRequest request = HttpContextUtils.getHttpServletRequest(); |
|||
if (request == null) { |
|||
return null; |
|||
} |
|||
|
|||
String app = request.getHeader(AppClientConstant.APP); |
|||
if (StringUtils.isBlank(app)) { |
|||
return null; |
|||
} |
|||
return app; |
|||
} |
|||
|
|||
/** |
|||
* 获取登录用户client头信息 |
|||
* @return |
|||
*/ |
|||
public String getLoginUserClient() { |
|||
HttpServletRequest request = HttpContextUtils.getHttpServletRequest(); |
|||
if (request == null) { |
|||
return null; |
|||
} |
|||
|
|||
String client = request.getHeader(AppClientConstant.CLIENT); |
|||
if (StringUtils.isBlank(client)) { |
|||
return null; |
|||
} |
|||
return client; |
|||
} |
|||
|
|||
/** |
|||
* 获取用户的部门ID列表 |
|||
* @return |
|||
*/ |
|||
public List<String> getLoginUserDepartments() { |
|||
String loginUserId = getLoginUserId(); |
|||
String loginUserApp = getLoginUserApp(); |
|||
String loginUserClient = getLoginUserClient(); |
|||
// todo
|
|||
return null; |
|||
} |
|||
} |
|||
|
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Auther zxc |
|||
* @Create 2020-04-24 9:13 |
|||
*/ |
|||
@Data |
|||
public class GridStaffCountDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 网格下未被禁用的工作人员数量 |
|||
*/ |
|||
private Integer enableCount; |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Auther zxc |
|||
* @Create 2020-04-24 9:06 |
|||
*/ |
|||
@Data |
|||
public class UserIdDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* userId |
|||
*/ |
|||
private String userId; |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Auther zxc |
|||
* @Create 2020-04-23 16:42 |
|||
*/ |
|||
@Data |
|||
public class AddGridFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 机构id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 新建网格名称 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 管辖区域 |
|||
*/ |
|||
private String manageDistrict; |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Auther zxc |
|||
* @Create 2020-04-23 19:18 |
|||
*/ |
|||
@Data |
|||
public class DeleteGridFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 工作人员id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* userId |
|||
*/ |
|||
private String userId; |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Auther zxc |
|||
* @Create 2020-04-23 19:12 |
|||
*/ |
|||
@Data |
|||
public class EditGridFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* gridId 网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 管理区域 |
|||
*/ |
|||
private String manageDistrict; |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/24 10:12 |
|||
*/ |
|||
|
|||
@Data |
|||
public class StaffInfoFromDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
@NotBlank(message = "机关ID不能为空") |
|||
private String agencyId; |
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
String staffId; |
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/24 10:43 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class StaffSubmitFromDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 机关ID |
|||
*/ |
|||
@NotBlank(message = "机关ID不能为空") |
|||
private String agencyId; |
|||
/** |
|||
* 人员ID |
|||
*/ |
|||
private String staffId; |
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
@NotBlank(message = "姓名不能为空") |
|||
private String name; |
|||
/** |
|||
* 手机 |
|||
*/ |
|||
@NotBlank(message = "手机号不能为空") |
|||
private String mobile; |
|||
/** |
|||
* 性别 |
|||
*/ |
|||
@NotBlank(message = "性别不能为空") |
|||
private Integer gender; |
|||
/** |
|||
* 专兼职 |
|||
*/ |
|||
@NotBlank(message = "专兼职不能为空") |
|||
private String workType; |
|||
/** |
|||
* 角色id列表 |
|||
*/ |
|||
@NotBlank(message = "角色不能为空") |
|||
private List<String> roles; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Auther zxc |
|||
* @Create 2020-04-23 16:45 |
|||
*/ |
|||
@Data |
|||
public class AddGridResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* gridId 网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/24 10:50 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class StaffDetailResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 人员ID |
|||
*/ |
|||
private String staffId; |
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 头像 |
|||
*/ |
|||
private String headPhoto; |
|||
/** |
|||
* 激活状态:inactive未激活,active已激活 |
|||
*/ |
|||
private String activeFlag; |
|||
/** |
|||
* 激活时间 |
|||
*/ |
|||
private String activeTime; |
|||
/** |
|||
* 性别 |
|||
*/ |
|||
private Integer gender; |
|||
/** |
|||
* 是否禁用(未禁用enable,已禁用disabled) |
|||
*/ |
|||
private String enableFlag; |
|||
/** |
|||
* 职责名称列表 |
|||
*/ |
|||
private List<String> roles; |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/24 10:14 |
|||
*/ |
|||
@Data |
|||
public class StaffInitResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 人员ID |
|||
*/ |
|||
private String staffId; |
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
/** |
|||
* 性别 |
|||
*/ |
|||
private Integer gender; |
|||
/** |
|||
* 专兼职 |
|||
*/ |
|||
private String workType; |
|||
/** |
|||
* 职责列表 |
|||
*/ |
|||
private List<StaffRoleResultDTO> roleList; |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Builder; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/24 10:18 |
|||
*/ |
|||
@Data |
|||
public class StaffRoleResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 角色ID |
|||
*/ |
|||
private String roleId; |
|||
/** |
|||
* 角色名称 |
|||
*/ |
|||
private String roleName; |
|||
/** |
|||
* 是否选中(选中的是true) |
|||
*/ |
|||
private Boolean selected; |
|||
} |
@ -0,0 +1,56 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 政府端角色表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-04-22 |
|||
*/ |
|||
@Data |
|||
public class GovStaffRoleResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 角色ID |
|||
*/ |
|||
private String roleId; |
|||
|
|||
/** |
|||
* 人员id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 角色key |
|||
*/ |
|||
private String roleKey; |
|||
|
|||
/** |
|||
* 角色名称 |
|||
*/ |
|||
private String roleName; |
|||
} |
Loading…
Reference in new issue