diff --git a/epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java b/epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java new file mode 100644 index 0000000000..cd3c5543e6 --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/controller/IcLoinController.java @@ -0,0 +1,162 @@ +package com.epmet.controller; + +import cn.hutool.core.bean.BeanUtil; +import com.epmet.commons.tools.constant.AppClientConstant; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.feign.ResultDataResolver; +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.commons.tools.security.password.PasswordUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.CustomerStaffDTO; +import com.epmet.dto.form.LoginByPassWordFormDTO; +import com.epmet.dto.form.RootOrgListByStaffIdFormDTO; +import com.epmet.dto.result.StaffOrgsResultDTO; +import com.epmet.dto.result.UserTokenResultDTO; +import com.epmet.feign.EpmetUserFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.redis.CaptchaRedis; +import com.epmet.redis.IcLoginTicketCacheBean; +import com.epmet.service.IcLoginService; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.*; + +@RestController +@RequestMapping("ic") +public class IcLoinController implements ResultDataResolver { + + public static final long IC_LOGIN_TICKET_EXPIRE_SECONDS = 2 * 60l; + + @Autowired + private EpmetUserFeignClient epmetUserFeignClient; + + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + + @Autowired + private CaptchaRedis captchaRedis; + + @Autowired + private IcLoginService icLoginService; + + @Autowired + private RedisUtils redisUtils; + + /** + * @description 基层治理赋能平台-根据手机号密码获取组织列表 + * + * @param input + * @return + * @author wxz + * @date 2021.10.25 09:56:33 + */ + @PostMapping("getmyorgsbypassword") + public Result> getMyOrgsByPassword(@RequestBody LoginByPassWordFormDTO input) { + ValidatorUtils.validateEntity(input, LoginByPassWordFormDTO.IcGetOrgsByPwdGroup.class); + String captcha = input.getCaptcha(); + String mobile = input.getMobile(); + String password = input.getPassword(); + String uuid = input.getUuid(); + + // 图片验证码 + String captchaInCache = captchaRedis.getIcLoginCaptcha(uuid); + if (StringUtils.isBlank(captchaInCache) || !captcha.equals(captchaInCache)) { + throw new RenException(EpmetErrorCode.ERR10019.getCode()); + } + + // 获取用户信息 + Result> staffResult = epmetUserFeignClient.checkCustomerStaff(mobile); + List staffList = getResultDataOrThrowsException(staffResult, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】获取用户信息失败"); + if (CollectionUtils.isEmpty(staffList)) { + throw new RenException(EpmetErrorCode.ERR10003.getCode()); + } + + CustomerStaffDTO staffInfo = staffList.get(0); + + if (!PasswordUtils.matches(password, staffInfo.getPassword())) { + throw new RenException(EpmetErrorCode.ERR10004.getCode()); + } + + String staffId = staffInfo.getUserId(); + + // 查询跟组织列表 + RootOrgListByStaffIdFormDTO orgListForm = new RootOrgListByStaffIdFormDTO(); + orgListForm.setStaffId(staffId); + Result> orgListResult = govOrgOpenFeignClient.getStaffOrgListByStaffId(orgListForm); + List orgs = getResultDataOrThrowsException(orgListResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】根据staffId查询所属客户跟组织列表失败"); + + // 生成登录票据 + String ticket = UUID.randomUUID().toString().replace("-", ""); + IcLoginTicketCacheBean ticketCacheBean = new IcLoginTicketCacheBean(); + ticketCacheBean.setMobile(mobile); + ticketCacheBean.setStaffId(staffId); + cacheTicket(ticket, ticketCacheBean); + + HashMap resultMap = new HashMap<>(); + resultMap.put("staffId", staffId); + resultMap.put("ticket", ticket); + resultMap.put("orgs", orgs); + + return new Result>().ok(resultMap); + } + + /** + * @description IC登录 + * + * @param input + * @return + * @author wxz + * @date 2021.10.25 21:14:22 + */ + @PostMapping("login") + public Result login(@RequestBody LoginByPassWordFormDTO input) { + ValidatorUtils.validateEntity(input, LoginByPassWordFormDTO.IcLoginGroup.class); + String ticket = input.getTicket(); + String orgId = input.getRootAgencyId(); + String staffId = input.getStaffId(); + + // ticket校验 + IcLoginTicketCacheBean ticketCache = getTicketCache(ticket); + if (ticketCache == null || !ticketCache.getStaffId().equals(staffId)) { + // ticket&userId不对应 + throw new RenException(EpmetErrorCode.ERR10008.getCode()); + } + + UserTokenResultDTO tokenInfo = icLoginService.login(staffId, orgId); + return new Result().ok(tokenInfo); + } + + private void cacheTicket(String ticket, IcLoginTicketCacheBean cacheBean) { + Map stringObjectMap = BeanUtil.beanToMap(cacheBean, false, true); + redisUtils.hMSet(RedisKeys.loginTicket(AppClientConstant.APP_IC, ticket), stringObjectMap, IC_LOGIN_TICKET_EXPIRE_SECONDS); + } + + /** + * @description 从缓存中取出ticket,并删除 + * + * @param ticket + * @return + * @author wxz + * @date 2021.10.26 08:58:27 + */ + private IcLoginTicketCacheBean getTicketCache(String ticket) { + String key = RedisKeys.loginTicket(AppClientConstant.APP_IC, ticket); + Map map = redisUtils.hGetAll(key); + if (CollectionUtils.sizeIsEmpty(map)) { + return null; + } + redisUtils.expire(key, 0); + return BeanUtil.mapToBean(map, IcLoginTicketCacheBean.class, false); + } + +} diff --git a/epmet-auth/src/main/java/com/epmet/controller/LoginController.java b/epmet-auth/src/main/java/com/epmet/controller/LoginController.java index f70495eb51..03a3139df2 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/LoginController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/LoginController.java @@ -65,6 +65,30 @@ public class LoginController { } } + /** + * @description 基层治理平台登录验证码 + * + * @param response + * @return + * @author wxz + * @date 2021.10.25 14:19:40 + */ + @GetMapping("ic-login-captcha") + public void icLoginCaptcha(HttpServletResponse response, String uuid) throws IOException { + try { + //生成图片验证码 + BufferedImage image = captchaService.createIcLoginCaptcha(uuid); + response.reset(); + response.setHeader("Cache-Control", "no-store, no-cache"); + response.setContentType("image/jpeg"); + ServletOutputStream out = response.getOutputStream(); + ImageIO.write(image, "jpg", out); + out.close(); + } catch (IOException e) { + log.error("获取登陆验证码异常", e); + } + } + /** * @param formDTO * @return com.epmet.commons.tools.utils.Result diff --git a/epmet-auth/src/main/java/com/epmet/dto/form/LoginByPassWordFormDTO.java b/epmet-auth/src/main/java/com/epmet/dto/form/LoginByPassWordFormDTO.java index 0e05cb7787..8a603012ac 100644 --- a/epmet-auth/src/main/java/com/epmet/dto/form/LoginByPassWordFormDTO.java +++ b/epmet-auth/src/main/java/com/epmet/dto/form/LoginByPassWordFormDTO.java @@ -14,27 +14,53 @@ import java.io.Serializable; public class LoginByPassWordFormDTO extends LoginCommonFormDTO implements Serializable { private static final long serialVersionUID = -7507437651048051183L; + // 基层治理平台账号密码获取组织列表分组 + public interface IcGetOrgsByPwdGroup {} + // 基层治理平台登录分组 + public interface IcLoginGroup {} + /** * 手机号 */ @NotBlank(message = "手机号不能为空",groups = {AddUserShowGroup.class}) private String phone; + @NotBlank(message = "手机号不能为空",groups = {IcGetOrgsByPwdGroup.class}) + private String mobile; + /** * 密码 */ - @NotBlank(message = "密码不能为空",groups = {AddUserShowGroup.class}) + @NotBlank(message = "密码不能为空",groups = {AddUserShowGroup.class, IcGetOrgsByPwdGroup.class}) private String password; /** * 验证码 */ - @NotBlank(message="验证码不能为空",groups = {AddUserShowGroup.class}) + @NotBlank(message="验证码不能为空",groups = {AddUserShowGroup.class, IcGetOrgsByPwdGroup.class}) private String captcha; /** * 唯一标识 */ - @NotBlank(message="唯一标识不能为空",groups = {AddUserInternalGroup.class}) + @NotBlank(message="唯一标识不能为空",groups = {AddUserInternalGroup.class, IcGetOrgsByPwdGroup.class}) private String uuid; + + /** + * 登录票据,目前ic基层治理平台用到了 + */ + @NotBlank(message="登录票据ticket不能为空", groups = {IcLoginGroup.class}) + private String ticket; + + /** + * 所选的要登录的组织id + */ + @NotBlank(message = "要登录的orgId不能为空", groups = { IcLoginGroup.class }) + private String rootAgencyId; + + /** + * 工作人员id + */ + @NotBlank(message = "人员Id不能为空", groups = { IcLoginGroup.class }) + private String staffId; } diff --git a/epmet-auth/src/main/java/com/epmet/redis/CaptchaRedis.java b/epmet-auth/src/main/java/com/epmet/redis/CaptchaRedis.java index 50433bdaf0..1544c9d07f 100644 --- a/epmet-auth/src/main/java/com/epmet/redis/CaptchaRedis.java +++ b/epmet-auth/src/main/java/com/epmet/redis/CaptchaRedis.java @@ -45,6 +45,12 @@ public class CaptchaRedis { redisUtils.set(key, captcha, EXPIRE); } + public void setIcLoginCaptcha(String uuid, String captcha) { + String key = RedisKeys.getIcLoginCaptchaKey(uuid); + logger.info("保存验证码key=["+key+"]"); + redisUtils.set(key, captcha, EXPIRE); + } + public String get(String uuid){ String key = RedisKeys.getLoginCaptchaKey(uuid); String captcha = (String)redisUtils.get(key); @@ -57,6 +63,25 @@ public class CaptchaRedis { return captcha; } + /** + * @description 基层治理平台登录验证码查询 + * + * @param uuid + * @return + * @author wxz + * @date 2021.10.25 14:28:28 + */ + public String getIcLoginCaptcha(String uuid) { + String key = RedisKeys.getIcLoginCaptchaKey(uuid); + String captcha = (String)redisUtils.get(key); + //删除验证码 + if(captcha != null){ + redisUtils.delete(key); + } + + return captcha; + } + /** * @param sendSmsCodeFormDTO app、client、phone * @param smsCode 验证码 diff --git a/epmet-auth/src/main/java/com/epmet/redis/IcLoginTicketCacheBean.java b/epmet-auth/src/main/java/com/epmet/redis/IcLoginTicketCacheBean.java new file mode 100644 index 0000000000..4e483be294 --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/redis/IcLoginTicketCacheBean.java @@ -0,0 +1,9 @@ +package com.epmet.redis; + +import lombok.Data; + +@Data +public class IcLoginTicketCacheBean { + private String staffId; + private String mobile; +} diff --git a/epmet-auth/src/main/java/com/epmet/service/CaptchaService.java b/epmet-auth/src/main/java/com/epmet/service/CaptchaService.java index d6f8573e65..812a586dcb 100644 --- a/epmet-auth/src/main/java/com/epmet/service/CaptchaService.java +++ b/epmet-auth/src/main/java/com/epmet/service/CaptchaService.java @@ -23,6 +23,16 @@ public interface CaptchaService { */ BufferedImage create(String uuid); + /** + * @description 基层治理平台登录验证码 + * + * @param + * @return + * @author wxz + * @date 2021.10.25 14:15:30 + */ + BufferedImage createIcLoginCaptcha(String uuid); + /** * 验证码效验 * @param uuid uuid diff --git a/epmet-auth/src/main/java/com/epmet/service/IcLoginService.java b/epmet-auth/src/main/java/com/epmet/service/IcLoginService.java new file mode 100644 index 0000000000..d473f58a7f --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/service/IcLoginService.java @@ -0,0 +1,9 @@ +package com.epmet.service; + +import com.epmet.dto.result.UserTokenResultDTO; + +public interface IcLoginService { + + + UserTokenResultDTO login(String staffId, String orgId); +} diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java index 835c9aab3a..cbb68142ee 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java @@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.awt.image.BufferedImage; +import java.util.UUID; /** * 验证码 @@ -43,6 +44,17 @@ public class CaptchaServiceImpl implements CaptchaService { return producer.createImage(captcha); } + @Override + public BufferedImage createIcLoginCaptcha(String uuid) { + //生成验证码 + String captchaText = producer.createText(); + //logger.info("uuid:"+uuid+",生成的验证码:"+captcha); + //保存验证码 + captchaRedis.setIcLoginCaptcha(uuid, captchaText); + + return producer.createImage(captchaText); + } + @Override public boolean validate(String uuid, String code) { String captcha = captchaRedis.get(uuid); diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java new file mode 100644 index 0000000000..d14db75885 --- /dev/null +++ b/epmet-auth/src/main/java/com/epmet/service/impl/IcLoginServiceImpl.java @@ -0,0 +1,177 @@ +package com.epmet.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import com.epmet.auth.constants.AuthOperationConstants; +import com.epmet.commons.rocketmq.messages.LoginMQMsg; +import com.epmet.commons.tools.constant.AppClientConstant; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.feign.ResultDataResolver; +import com.epmet.commons.tools.redis.RedisKeys; +import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.commons.tools.security.dto.IcTokenDto; +import com.epmet.commons.tools.utils.CpUserDetailRedis; +import com.epmet.commons.tools.utils.IpUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.CustomerAgencyDTO; +import com.epmet.dto.form.SystemMsgFormDTO; +import com.epmet.dto.result.UserTokenResultDTO; +import com.epmet.feign.EpmetMessageOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.jwt.JwtTokenProperties; +import com.epmet.jwt.JwtTokenUtils; +import com.epmet.service.IcLoginService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import java.util.*; + +@Service +@Slf4j +public class IcLoginServiceImpl implements IcLoginService, ResultDataResolver { + + @Autowired + private JwtTokenUtils jwtTokenUtils; + + @Autowired + private RedisUtils redisUtils; + + @Autowired + private CpUserDetailRedis cpUserDetailRedis; + + @Autowired + private JwtTokenProperties jwtTokenProperties; + + @Autowired + private EpmetMessageOpenFeignClient messageOpenFeignClient; + + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + + @Autowired + private ThirdLoginServiceImpl thirdLoginService; + + @Override + public UserTokenResultDTO login(String staffId, String orgId) { + String app = AppClientConstant.APP_IC; + String client = AppClientConstant.CLIENT_WEB; + + // 1.获取用户token + String token = this.generateIcToken(staffId, app, client); + + Result agencyResult = govOrgOpenFeignClient.getAgencyById(orgId); + CustomerAgencyDTO agencyInfo = getResultDataOrThrowsException(agencyResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【IC平台登录】获取组织信息失败"); + + // 2.缓存token + cacheToken(app, client, staffId, token, orgId, agencyInfo.getCustomerId()); + + UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO(); + userTokenResultDTO.setToken(token); + userTokenResultDTO.setCustomerId(agencyInfo.getCustomerId()); + + //7.发送登录事件 + try { + sendLoginEvent(staffId, app, client); + } catch (RenException e) { + log.error(e.getInternalMsg()); + } catch (Exception e) { + log.error("【工作端workLogin登录】发送登录事件失败,程序继续执行。"); + } + + return userTokenResultDTO; + } + + /** + * @param staffId + * @return + * @description 生成Ic平台的Token + * @author wxz + * @date 2021.10.26 13:42:36 + */ + private String generateIcToken(String staffId, String app, String client) { + Map map = new HashMap<>(); + map.put("app", app); + map.put("client", client); + map.put("userId", staffId); + String token = jwtTokenUtils.createToken(map); + return token; + } + + /** + * @param userId + * @param fromApp + * @param fromClient + * @return + * @description 发布登录时间 + * @author wxz + * @date 2021.10.26 13:45:59 + */ + private void sendLoginEvent(String userId, String fromApp, String fromClient) { + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + + LoginMQMsg loginMQMsg = new LoginMQMsg(); + loginMQMsg.setUserId(userId); + loginMQMsg.setLoginTime(new Date()); + loginMQMsg.setIp(IpUtils.getIpAddr(request)); + loginMQMsg.setFromApp(fromApp); + loginMQMsg.setFromClient(fromClient); + + SystemMsgFormDTO form = new SystemMsgFormDTO(); + form.setMessageType(AuthOperationConstants.LOGIN); + form.setContent(loginMQMsg); + messageOpenFeignClient.sendSystemMsgByMQ(form); + } + + /** + * @description 缓存token到redis + * + * @param app + * @param client + * @param userId + * @param token + * @param rootAgencyId + * @return + * @author wxz + * @date 2021.10.26 14:19:07 + */ + private void cacheToken(String app, + String client, + String userId, + String token, + String rootAgencyId, + String customerId) { + + IcTokenDto tokenDto = new IcTokenDto(); + int expire = jwtTokenProperties.getExpire(); + long expireTime = jwtTokenUtils.getExpiration(token).getTime(); + + tokenDto.setApp(app); + tokenDto.setClient(client); + tokenDto.setUserId(userId); + tokenDto.setToken(token); + tokenDto.setExpireTime(expireTime); + tokenDto.setRootAgencyId(rootAgencyId); + tokenDto.setCustomerId(customerId); + + //设置部门,网格,角色列表 + tokenDto.setDeptIdList(thirdLoginService.getDeptartmentIdList(userId)); + tokenDto.setGridIdList(thirdLoginService.getGridIdList(userId)); + CustomerAgencyDTO agency = thirdLoginService.getAgencyByStaffId(userId); + if (agency != null) { + tokenDto.setAgencyId(agency.getId()); + tokenDto.setRoleList(thirdLoginService.queryGovStaffRoles(userId, agency.getId())); + } + tokenDto.setOrgIdPath(thirdLoginService.getOrgIdPath(userId)); + + String key = RedisKeys.getCpUserKey(app, client, userId); + Map map = BeanUtil.beanToMap(tokenDto, false, true); + redisUtils.hMSet(key, map, expire); + } + + +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/AppClientConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/AppClientConstant.java index 7b08e851d5..0b42461f6e 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/AppClientConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/AppClientConstant.java @@ -17,6 +17,12 @@ public interface AppClientConstant { * app类型-运营端 */ String APP_OPER = "oper"; + + /** + * 基层治理平台端 + */ + String APP_IC = "ic"; + /** * PC端:web */ diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java new file mode 100644 index 0000000000..30c786a539 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/result/OptionResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.commons.tools.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/10/26 13:53 + */ +@Data +public class OptionResultDTO implements Serializable { + private static final long serialVersionUID = 8618231166600518980L; + private String label; + private String value; + private List children; +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 77818b2916..fa30ff3a3c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -19,6 +19,7 @@ public enum EpmetErrorCode { ERR10005(10005, "token不能为空"), ERR10006(10006, "登录超时,请重新登录"), ERR10007(10007, "当前帐号已在别处登录"), + ERR10008(10008, "Ticket错误"), ERR10019(10019, "验证码不正确"), SYSTEM_MQ_MSG_SEND_FAIL(10020, "MQ消息发送失败"), ERR401(401, "未授权"), diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 388927ce5a..fe293c5288 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -38,6 +38,13 @@ public class RedisKeys { return rootPrefix.concat("sys:captcha:").concat(uuid); } + /** + * 登录验证码Key + */ + public static String getIcLoginCaptchaKey(String uuid) { + return rootPrefix.concat("sys:captcha:iclogin:").concat(uuid); + } + /** * 登录用户Key */ @@ -559,4 +566,17 @@ public class RedisKeys { public static String blockedMqMsgKey(String blockedMsgLabel) { return rootPrefix.concat("message:mq:blocked:").concat(blockedMsgLabel); } + + /** + * @description 登录票据。目前只有IC基层治理平台用到 + * + * @param app + * @param ticket + * @return + * @author wxz + * @date 2021.10.25 17:49:43 + */ + public static String loginTicket(String app, String ticket) { + return rootPrefix.concat("sys:security:ticket:").concat(app).concat(":").concat(ticket); + } } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/IcTokenDto.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/IcTokenDto.java new file mode 100644 index 0000000000..de61615504 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/IcTokenDto.java @@ -0,0 +1,81 @@ +package com.epmet.commons.tools.security.dto; + +import com.alibaba.fastjson.JSON; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; +import java.util.Set; + +/** + * @Description ic平台token + * @author wxz + * @date 2021.10.26 13:58:03 +*/ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class IcTokenDto extends BaseTokenDto { + + /** + * 当前登录的组织id(顶级) + */ + private String rootAgencyId; + + /** + * 当前用户所属的机关单位id + */ + private String agencyId; + + /** + * 当前网格对应的组织结构id的全路径用:隔开 + */ + private String orgIdPath; + + /** + * 当前所在网格id + */ + private String gridId; + + /*** + * 所在网格列表 + */ + private Set gridIdList; + + /** + * 部门id列表 + */ + private Set deptIdList; + + /** + * 功能权限列表,实际上是gov_staff => staff_role => role_operation查询到的operationKey + */ + private Set permissions; + + /** + * 角色ID列表 + */ + private List roleList; + + /** + * 过期时间戳 + */ + private Long expireTime; + + @Data + public static class Role { + + private String id; + private String roleKey; + private String roleName; + + public Role() { + } + } + + @Override + public String toString() { + return JSON.toJSONString(this); + } +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AgencyIdFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AgencyIdFormDTO.java index 44777f5886..cd0b55bbc8 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AgencyIdFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AgencyIdFormDTO.java @@ -2,6 +2,7 @@ package com.epmet.dto.form; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -16,5 +17,6 @@ public class AgencyIdFormDTO implements Serializable { /** * 部门Id */ + @NotBlank(message = "组织机构ID不能为空") private String agencyId; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseFormDTO.java new file mode 100644 index 0000000000..304bce36b9 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseFormDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/10/25 17:03 + */ +@Data +public class HouseFormDTO implements Serializable { + private static final long serialVersionUID = 2636608477324780974L; + private String buildingId; + private String unitId; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/RootOrgListByStaffIdFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/RootOrgListByStaffIdFormDTO.java new file mode 100644 index 0000000000..ca4e3153f3 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/RootOrgListByStaffIdFormDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.form; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Description 客户id查询跟组织列表 + * @author wxz + * @date 2021.10.25 14:53:09 +*/ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class RootOrgListByStaffIdFormDTO { + + private String staffId; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingDTO.java new file mode 100644 index 0000000000..a076376543 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/10/25 15:03 + */ +@Data +public class BuildingDTO implements Serializable { + private static final long serialVersionUID = -2129418426919785999L; + private String buildingId; + private String buildingName; + private List unitList; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridTreeResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridTreeResultDTO.java new file mode 100644 index 0000000000..608b9428e5 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridTreeResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/10/25 15:08 + */ +@Data +public class GridTreeResultDTO implements Serializable { + private static final long serialVersionUID = -6506457371074529990L; + private String gridId; + private String gridName; + private List neighborHoodList; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseResultDTO.java new file mode 100644 index 0000000000..58a07c8bbc --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/HouseResultDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/10/25 16:58 + */ +@Data +public class HouseResultDTO implements Serializable { + private static final long serialVersionUID = 8054109017922254586L; + private String houseId; + private String houseName; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodDTO.java new file mode 100644 index 0000000000..6a561c6e8e --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/10/25 15:06 + */ +@Data +public class NeighborHoodDTO implements Serializable { + private static final long serialVersionUID = 1644088283259175745L; + private String neighborHoodId; + private String neighborHoodName; + private List buildingList; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitDTO.java new file mode 100644 index 0000000000..77b51dfca0 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitDTO.java @@ -0,0 +1,18 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2021/10/25 15:04 + */ +@Data +public class UnitDTO implements Serializable { + private static final long serialVersionUID = -919268879670510057L; + private String unitId; + private String unitName; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index 39d15fb9a5..dbf264940b 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -187,6 +187,17 @@ public interface GovOrgOpenFeignClient { @PostMapping(value = "/gov/org/customeragency/getStaffOrgList",consumes = MediaType.APPLICATION_JSON_VALUE) Result> getStaffOrgList(StaffOrgFormDTO staffOrgFormDTO); + /** + * @description 通过staffId查询跟组织列表 + * + * @param input + * @return + * @author wxz + * @date 2021.10.25 14:53:53 + */ + @PostMapping("/gov/org/customeragency/root-orglist-by-staffid") + Result> getStaffOrgListByStaffId(@RequestBody RootOrgListByStaffIdFormDTO input); + /** * @Description 查询一个网格下的所有工作人员 * @param gridIdFormDTO diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java index 306ea49022..8c66ac8787 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java @@ -113,6 +113,11 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getStaffOrgList", staffOrgFormDTO); } + @Override + public Result> getStaffOrgListByStaffId(RootOrgListByStaffIdFormDTO input) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getStaffOrgListByStaffId", input); + } + @Override public Result> getGridStaffs(CommonGridIdFormDTO gridIdFormDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridStaffs", gridIdFormDTO); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index c3937127ba..065c819c82 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -339,4 +339,22 @@ public class CustomerAgencyController { return new Result().ok(customerAgencyService.getAgencyList(formDTO)); } + /** + * @description 通过staffId查询跟组织列表 + * + * @param input + * @return + * @author wxz + * @date 2021.10.25 14:53:53 + */ + @PostMapping("root-orglist-by-staffid") + public Result> getStaffOrgListByStaffId(@RequestBody RootOrgListByStaffIdFormDTO input) { + + ValidatorUtils.validateEntity(input); + String staffId = input.getStaffId(); + + List orgList = customerAgencyService.getStaffOrgListByStaffId(staffId); + return new Result>().ok(orgList); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java index c765a58962..eccbc2860f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java @@ -17,6 +17,7 @@ package com.epmet.controller; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; @@ -286,4 +287,17 @@ public class CustomerGridController { return new Result>().ok(customerGridService.selectOrgsByUserId(userId)); } + /** + * @Description 获取组织下网格选项 + * @Param formDTO + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2021/10/26 14:02 + */ + @PostMapping("gridoption") + public Result> getGridOption(@RequestBody AgencyIdFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(customerGridService.getGridOption(formDTO.getAgencyId())); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java index f9cc5c1b54..737c378af3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java @@ -184,4 +184,10 @@ public class GridController { CustomerGridDTO gridInfo = customerGridService.getBaseInfo(customerGridFormDTO); return new Result().ok(gridInfo); } + + @PostMapping("gridtree") + public Result> getGridTree(@RequestBody AgencyIdFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); + return new Result>().ok(customerGridService.getGridTree(formDTO)); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcBuildingController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcBuildingController.java index aae2c36569..565b66c23f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcBuildingController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcBuildingController.java @@ -17,6 +17,7 @@ package com.epmet.controller; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -29,6 +30,7 @@ import com.epmet.service.IcBuildingService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.List; import java.util.Map; @@ -81,5 +83,15 @@ public class IcBuildingController { return new Result(); } - + /** + * @Description 获取小区内的楼栋 + * @Param dto + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2021/10/26 14:46 + */ + @PostMapping("buildingoption") + public Result> getBuildingOptions(IcBuildingDTO dto) { + return new Result>().ok(icBuildingService.getBuildingOptions(dto.getNeighborHoodId())); + } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcBuildingUnitController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcBuildingUnitController.java index 93e3f11314..6d0a832a3c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcBuildingUnitController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcBuildingUnitController.java @@ -17,20 +17,19 @@ package com.epmet.controller; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcBuildingUnitDTO; import com.epmet.service.IcBuildingUnitService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; @@ -83,5 +82,15 @@ public class IcBuildingUnitController { icBuildingUnitService.delete(ids); return new Result(); } - + /** + * @Description 获取楼栋内单元 + * @Param dto + * @Return {@link Result>} + * @Author zhaoqifeng + * @Date 2021/10/26 14:46 + */ + @PostMapping("unitoption") + public Result> getUnitOptions(IcBuildingUnitDTO dto) { + return new Result>().ok(icBuildingUnitService.getUnitOptions(dto.getBuildingId())); + } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java index 5d649ce45b..982bf33835 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java @@ -17,6 +17,7 @@ package com.epmet.controller; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -25,10 +26,12 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcHouseDTO; +import com.epmet.dto.form.HouseFormDTO; import com.epmet.service.IcHouseService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.List; import java.util.Map; @@ -80,6 +83,9 @@ public class IcHouseController { icHouseService.delete(ids); return new Result(); } - + @PostMapping("houseoption") + public Result> getHouseOption(@RequestBody HouseFormDTO formDTO){ + return new Result>().ok(icHouseService.getHouseOption(formDTO)); + } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java index 0cf22c6da7..69b1775641 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcNeighborHoodController.java @@ -17,20 +17,19 @@ package com.epmet.controller; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; -import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; -import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.service.IcNeighborHoodService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; @@ -84,4 +83,16 @@ public class IcNeighborHoodController { return new Result(); } + /** + * @Description 获取网格下小区列表 + * @Param dto + * @Return {@link Result< List< OptionResultDTO>>} + * @Author zhaoqifeng + * @Date 2021/10/26 14:38 + */ + @PostMapping("neighborhoodoption") + public Result> getNeighborHoodOptions(IcNeighborHoodDTO dto) { + return new Result>().ok(icNeighborHoodService.getNeighborHoodOptions(dto.getGridId())); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index 3f98a2f847..187a964973 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -244,6 +244,8 @@ public interface CustomerAgencyDao extends BaseDao { List getSubAgencyList(@Param("pid") String pid); + List getStaffOrgListByStaffId(@Param("staffId") String staffId); + /** * @Description 【地图配置】删除 * @param orgId diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java index fae6640a7d..34534391c3 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java @@ -300,4 +300,40 @@ public interface CustomerGridDao extends BaseDao { * @date 2021/8/5 10:08 上午 */ List selectOrgsByUserId(@Param("userId") String userId); + + /** + * @Description 查询组织下的网格及网格下的小区、单元、楼栋 + * @Param agencyId + * @Return {@link List< GridTreeResultDTO>} + * @Author zhaoqifeng + * @Date 2021/10/25 15:19 + */ + List selectGridTree(@Param("agencyId") String agencyId); + + /** + * @Description 网格下小区列表 + * @Param gridId + * @Return {@link List< NeighborHoodDTO>} + * @Author zhaoqifeng + * @Date 2021/10/25 16:04 + */ + List selectNeighborHoodList(@Param("gridId") String gridId); + + /** + * @Description 小区下楼栋列表 + * @Param neighborHoodId + * @Return {@link List< BuildingDTO>} + * @Author zhaoqifeng + * @Date 2021/10/25 16:04 + */ + List selectBuildingList(@Param("neighborHoodId") String neighborHoodId); + + /** + * @Description 楼栋下单元列表 + * @Param buildingId + * @Return {@link List< UnitDTO>} + * @Author zhaoqifeng + * @Date 2021/10/25 16:04 + */ + List selectUnitList(@Param("buildingId") String buildingId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index b13bae23e7..3eb6585c03 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -255,4 +255,6 @@ public interface CustomerAgencyService extends BaseService * @Date 2021/9/8 15:21 */ AgencyTreeResultDTO getAgencyList(GetAgencyListFormDTO formDTO); + + List getStaffOrgListByStaffId(String staffId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java index 91525436ba..453c81f256 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java @@ -18,6 +18,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; @@ -319,4 +320,22 @@ public interface CustomerGridService extends BaseService { * @date 2021/8/5 10:08 上午 */ List selectOrgsByUserId(String userId); + + /** + * @Description 获取组织下网格树 + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2021/10/25 16:28 + */ + List getGridTree(AgencyIdFormDTO formDTO); + + /** + * @Description 获取组织下网格选项 + * @Param agencyId + * @Return {@link List< OptionResultDTO>} + * @Author zhaoqifeng + * @Date 2021/10/26 14:01 + */ + List getGridOption(String agencyId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java index afe8f11567..5b5ff7d05d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingService.java @@ -18,6 +18,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcBuildingDTO; import com.epmet.entity.IcBuildingEntity; @@ -92,4 +93,13 @@ public interface IcBuildingService extends BaseService { * @date 2021-10-25 */ void delete(String[] ids); + + /** + * @Description 获取小区内的楼栋 + * @Param neighborHoodId + * @Return {@link List< OptionResultDTO>} + * @Author zhaoqifeng + * @Date 2021/10/26 14:43 + */ + List getBuildingOptions(String neighborHoodId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java index 59b1546ed3..40045f2b75 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcBuildingUnitService.java @@ -18,6 +18,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcBuildingUnitDTO; import com.epmet.entity.IcBuildingUnitEntity; @@ -92,4 +93,13 @@ public interface IcBuildingUnitService extends BaseService * @date 2021-10-25 */ void delete(String[] ids); + + /** + * @Description 获取楼栋内单元 + * @Param buildingId + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2021/10/26 14:49 + */ + List getUnitOptions(String buildingId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java index e59122f103..471007a582 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java @@ -18,8 +18,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcHouseDTO; +import com.epmet.dto.form.HouseFormDTO; import com.epmet.entity.IcHouseEntity; import java.util.List; @@ -92,4 +94,13 @@ public interface IcHouseService extends BaseService { * @date 2021-10-25 */ void delete(String[] ids); + + /** + * @Description 获取楼栋房屋列表 + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2021/10/25 17:04 + */ + List getHouseOption(HouseFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java index 15f4624cba..1ef5c981fc 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcNeighborHoodService.java @@ -18,6 +18,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.entity.IcNeighborHoodEntity; @@ -92,4 +93,13 @@ public interface IcNeighborHoodService extends BaseService * @date 2021-10-25 */ void delete(String[] ids); + + /** + * @Description 获取网格下小区列表 + * @Param gridId + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2021/10/26 14:32 + */ + List getNeighborHoodOptions(String gridId); } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index fc9f181a20..836bbbb355 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -1124,4 +1124,8 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl getStaffOrgListByStaffId(String staffId) { + return baseDao.getStaffOrgListByStaffId(staffId); + } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java index d5497b8a08..43a73d3b46 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java @@ -18,6 +18,7 @@ package com.epmet.service.impl; import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -25,6 +26,7 @@ import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; @@ -50,6 +52,7 @@ import com.epmet.service.CustomerAgencyService; import com.epmet.service.CustomerGridService; import com.epmet.util.ModuleConstant; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -818,4 +821,42 @@ public class CustomerGridServiceImpl extends BaseServiceImpl selectOrgsByUserId(String userId) { return baseDao.selectOrgsByUserId(userId); } + + /** + * @param formDTO + * @Description 获取组织下网格树 + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2021/10/25 16:28 + */ + @Override + public List getGridTree(AgencyIdFormDTO formDTO) { + return baseDao.selectGridTree(formDTO.getAgencyId()); + } + + /** + * @param agencyId + * @Description 获取组织下网格选项 + * @Param agencyId + * @Return {@link List< OptionResultDTO >} + * @Author zhaoqifeng + * @Date 2021/10/26 14:01 + */ + @Override + public List getGridOption(String agencyId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(CustomerGridEntity::getPid, agencyId); + wrapper.last("ORDER BY CONVERT ( GRID_NAME USING gbk ) ASC"); + List list = baseDao.selectList(wrapper); + if (CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return list.stream().map(item -> { + OptionResultDTO dto = new OptionResultDTO(); + dto.setLabel(item.getGridName()); + dto.setValue(item.getId()); + return dto; + }).collect(Collectors.toList()); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java index 5a4c3ae38c..a5bdf574c8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingServiceImpl.java @@ -17,24 +17,28 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.IcBuildingDao; import com.epmet.dto.IcBuildingDTO; import com.epmet.entity.IcBuildingEntity; import com.epmet.service.IcBuildingService; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 楼栋信息 @@ -98,4 +102,32 @@ public class IcBuildingServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2021/10/26 14:43 + */ + @Override + public List getBuildingOptions(String neighborHoodId) { + if (StringUtils.isBlank(neighborHoodId)) { + return Collections.emptyList(); + } + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcBuildingEntity::getNeighborHoodId, neighborHoodId); + wrapper.last("ORDER BY CONVERT ( BUILDING_NAME USING gbk ) ASC"); + List list = baseDao.selectList(wrapper); + if(CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return list.stream().map(item -> { + OptionResultDTO dto = new OptionResultDTO(); + dto.setValue(item.getId()); + dto.setLabel(item.getBuildingName()); + return dto; + }).collect(Collectors.toList()); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java index c5cc404638..c192edad70 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcBuildingUnitServiceImpl.java @@ -17,24 +17,28 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.IcBuildingUnitDao; import com.epmet.dto.IcBuildingUnitDTO; import com.epmet.entity.IcBuildingUnitEntity; import com.epmet.service.IcBuildingUnitService; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 楼栋单元信息 @@ -98,4 +102,32 @@ public class IcBuildingUnitServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2021/10/26 14:49 + */ + @Override + public List getUnitOptions(String buildingId) { + if (StringUtils.isBlank(buildingId)) { + return Collections.emptyList(); + } + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcBuildingUnitEntity::getBuildingId, buildingId); + wrapper.last("ORDER BY CONVERT ( UNIT_NAME USING gbk ) ASC"); + List list = baseDao.selectList(wrapper); + if(CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return list.stream().map(item -> { + OptionResultDTO dto = new OptionResultDTO(); + dto.setValue(item.getId()); + dto.setLabel(item.getUnitName()); + return dto; + }).collect(Collectors.toList()); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java index db80c7ee31..83400c63ab 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java @@ -17,23 +17,29 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IcHouseDao; import com.epmet.dto.IcHouseDTO; +import com.epmet.dto.form.HouseFormDTO; import com.epmet.entity.IcHouseEntity; import com.epmet.service.IcHouseService; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 房屋信息 @@ -97,4 +103,33 @@ public class IcHouseServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2021/10/25 17:04 + */ + @Override + public List getHouseOption(HouseFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getBuildingId()) && StringUtils.isBlank(formDTO.getUnitId())) { + return Collections.emptyList(); + } + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(formDTO.getBuildingId()), IcHouseEntity::getBuildingId, formDTO.getBuildingId()); + wrapper.eq(StringUtils.isNotBlank(formDTO.getUnitId()), IcHouseEntity::getBuildingUnitId, formDTO.getUnitId()); + wrapper.last("ORDER BY CONVERT ( HOUSE_NAME USING gbk ) ASC"); + List list = baseDao.selectList(wrapper); + if(CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return list.stream().map(item -> { + OptionResultDTO dto = new OptionResultDTO(); + dto.setValue(item.getId()); + dto.setLabel(item.getHouseName()); + return dto; + }).collect(Collectors.toList()); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java index 1585fe99e4..5723490984 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.java @@ -17,24 +17,28 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.IcNeighborHoodDao; import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.entity.IcNeighborHoodEntity; import com.epmet.service.IcNeighborHoodService; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 小区表 @@ -98,4 +102,32 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2021/10/26 14:32 + */ + @Override + public List getNeighborHoodOptions(String gridId) { + if (StringUtils.isBlank(gridId)) { + return Collections.emptyList(); + } + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcNeighborHoodEntity::getGridId, gridId); + wrapper.last("ORDER BY CONVERT ( NEIGHBOR_HOOD_NAME USING gbk ) ASC"); + List list = baseDao.selectList(wrapper); + if(CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return list.stream().map(item -> { + OptionResultDTO dto = new OptionResultDTO(); + dto.setValue(item.getId()); + dto.setLabel(item.getNeighborHoodName()); + return dto; + }).collect(Collectors.toList()); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index 81696777f2..be6423e487 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -577,6 +577,17 @@ AND CUSTOMER_ID = #{customerId} + + + ++ ++ + +\ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index 0667d009c4..a3aba7122e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -618,4 +618,67 @@ union ALL SELECT agency_id AS orgId FROM customer_staff_agency WHERE del_flag = '0' and USER_ID = #{userId} + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StaffBasicInfoByMobileFromDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StaffBasicInfoByMobileFromDTO.java new file mode 100644 index 0000000000..116310f61b --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StaffBasicInfoByMobileFromDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description + * @author wxz + * @date 2021.10.25 14:00:11 +*/ +@Data +public class StaffBasicInfoByMobileFromDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @NotBlank(message = "缺少手机号码信息") + private String mobile; + + @NotBlank(message = "缺少密码") + private String password; + +}