| | |
| | | return ResultMessage.ok(); |
| | | } |
| | | |
| | | /** |
| | | * @Description: 获取验证码是否开启 |
| | | * @Param: [] |
| | | * @return: com.moral.constant.ResultMessage |
| | | * @Author: 陈凯裕 |
| | | * @Date: 2021/3/18 |
| | | */ |
| | | |
| | | @ApiOperation(value = "获取验证码是否开启", notes = "获取验证码是否开启") |
| | | @RequestMapping(value = "verificationCode/config", method = RequestMethod.GET) |
| | | public void verifyConfig(HttpServletResponse response) { |
| | | public ResultMessage verifyConfig(HttpServletResponse response) { |
| | | QueryWrapper<SysConfig> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("type", Constants.VERIFICATION_TYPE); |
| | | queryWrapper.eq(Constants.FRONT_VERIFICATIONCODE_COLUMN, Constants.FRONT_ERIFICATIONCODE_VALUE); |
| | | SysConfig sysConfig = sysConfigService.getOne(queryWrapper); |
| | | String code = sysConfig.getCode(); |
| | | if (Constants.VERFICATIONCODE_OPEN.equals(code)) { |
| | | try { |
| | | response.sendRedirect("/verificationCode/get"); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if (Constants.VERFICATIONCODE_OPEN.equals(sysConfig.getCode())) { |
| | | return new ResultMessage(ResponseCodeEnum.VERIFICATION_OPEN,null); |
| | | } |
| | | return new ResultMessage(ResponseCodeEnum.VERIFICATION_CLOSE,null); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取验证码", notes = "获取验证码") |
| | |
| | | <result column="id" property="id" jdbcType="INTEGER"/> |
| | | <result column="name" property="name" jdbcType="VARCHAR"/> |
| | | <result column="location_level_code" property="locationLevelCode"/> |
| | | <result column="org_expire_ime" property="expireTime"/> |
| | | <result column="org_expire_time" property="expireTime"/> |
| | | </association> |
| | | <!--用户组--> |
| | | <collection property="groups" ofType="com.moral.api.entity.Group" javaType="java.util.ArrayList"> |
| | |
| | | <!--查询用户信息,包含组织,角色--> |
| | | <select id="selectUserInfo" resultMap="userInfoMap"> |
| | | SELECT u.id, u.account, u.password, u.user_name, u.email, u.mobile, u.wechat ,u.organization_id, u.expire_time, u.is_delete,u.is_Admin, |
| | | o.name, o.location_level_code, o.expire_time org_expire_ime, |
| | | o.name, o.location_level_code, o.expire_time org_expire_time, |
| | | a.id group_id , a.group_name |
| | | FROM `user` u |
| | | LEFT JOIN |
| | |
| | | public static final String MANAGE_VERIFICATIONCODE_COLUMN = "type"; |
| | | |
| | | /* |
| | | * web端系统验证码配置列名 |
| | | * */ |
| | | public static final String FRONT_VERIFICATIONCODE_COLUMN = "type"; |
| | | |
| | | /* |
| | | * 后台系统验证码列对应的值 |
| | | * */ |
| | | public static final String MANAGE_VERIFICATIONCODE_VALUE = "manage_verificationCode"; |
| | | |
| | | /* |
| | | * web端验证码配置列名 |
| | | * */ |
| | | public static final String FRONT_ERIFICATIONCODE_VALUE = "front_verificationCode"; |
| | | |
| | | /* |
| | | * 验证码开启标识 |
| | |
| | | public static final Integer WEB_CHANNEL = 1; |
| | | |
| | | /* |
| | | * web端验证码配置列名 |
| | | * */ |
| | | public static final String VERIFICATION_TYPE = "front_verificationCode"; |
| | | |
| | | /* |
| | | * 登陆操作类型 |
| | | * */ |
| | | public static final String LOGIN_OPERTATE_TYPE = "0"; |
| | |
| | | * 删除操作类型 |
| | | * */ |
| | | public static final String DELETE_OPERATE_TYPE = "3"; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |