| | |
| | | import com.java110.doc.annotation.*; |
| | | import com.java110.dto.store.StoreUserDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.userLogin.UserLoginDto; |
| | | import com.java110.dto.user.UserLoginDto; |
| | | import com.java110.intf.store.IStoreInnerServiceSMO; |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.intf.user.IUserLoginInnerServiceSMO; |
| | | import com.java110.po.userLogin.UserLoginPo; |
| | | import com.java110.po.user.UserLoginPo; |
| | | import com.java110.utils.cache.CommonCache; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.CommonConstant; |
| | |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.exception.SMOException; |
| | | import com.java110.utils.util.*; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | |
| | | @Java110CmdDoc(title = "单点登录accessToken自登陆(自用)", |
| | | description = "1、通过接口/app/login.getAccessToken 获取到accessToken,<br/>" + |
| | | "2、三方系统通过302 跳转的方式调转到物业系统 http://wuye.xx.com/sso.html?hcAccessToken={accessToken}&targetUrl=您要跳转的页面<br/>" + |
| | | "3、物业系统即可完成自登陆功能<br/> " , |
| | | "3、物业系统即可完成自登陆功能</br>"+ |
| | | "注意:系统默认情况下是不启用单点登录功能的,请联系开发,配置中心中启用(SSO_SWITCH 的值改为ON)</br>", |
| | | httpMethod = "post", |
| | | url = "http://{ip}:{port}/app/login.accessTokenLogin", |
| | | resource = "userDoc", |
| | | author = "吴学文", |
| | | serviceCode = "login.accessTokenLogin", |
| | | seq = 1 |
| | | seq = 18 |
| | | ) |
| | | |
| | | @Java110ParamsDoc( |
| | |
| | | userLoginPo.setUserId(userDto.getUserId()); |
| | | userLoginPo.setUserName(userDto.getUserName()); |
| | | userLoginInnerServiceSMOImpl.saveUserLogin(userLoginPo); |
| | | responseEntity = new ResponseEntity<String>(user.toJSONString(), HttpStatus.OK); |
| | | context.setResponseEntity(responseEntity); |
| | | context.setResponseEntity(ResultVo.createResponseEntity(user)); |
| | | } catch (Exception e) { |
| | | logger.error("登录异常:", e); |
| | | throw new SMOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "系统内部错误,请联系管理员"); |