超市,食堂模块接口
This commit is contained in:
1 parent
93b4cdcf7c
commit
2ff1876f9f
5 files changed
+66
-16
No files matched your search
+23
-13
@@ -27,6 +27,7 @@ import com.bsd.pjcloud.app.service.AppUserService;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.security.annotation.Inner;
|
||||
import com.bsd.pjcloud.thirdparty.api.feign.RemoterThirdPartyAuthService;
|
||||
import com.bsd.pjcloud.thirdparty.dto.SHJNSSODTO;
|
||||
import com.bsd.pjcloud.thirdparty.dto.ZZDUserDTO;
|
||||
import com.bsd.pjcloud.thirdparty.entity.ThirdPartyUserEntity;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
@@ -34,6 +35,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.seata.spring.annotation.GlobalTransactional;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
@@ -51,7 +54,7 @@ import java.util.Map;
|
||||
/**
|
||||
* app用户表
|
||||
*
|
||||
* @author aeizzz
|
||||
* @author zjf
|
||||
* @date 2022-12-07 09:52:03
|
||||
*/
|
||||
@RestController
|
||||
@@ -178,23 +181,29 @@ public class AppUserAutoLoginController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 诗画sdk获取参数
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
// @PostMapping("/shjnsso")
|
||||
// @Inner(value = false)
|
||||
// @Operation(summary = "诗画江南单点登录")
|
||||
// public R shjnsso(@RequestBody @Valid SHJNSSOReqVO shjnsso) {
|
||||
// ZZDUserDTO zzdUserDTO=ssoApi.shjnsso(shjnsso.getAccountId(),shjnsso.getSessionId());
|
||||
// ZZDUserDTO.Ext ext = zzdUserDTO.getExt();
|
||||
// String mobile = zzdUserDTO.getMobile();
|
||||
// AdminUserRespDTO userByMobileOrEmployeeCode = adminUserApi.getUserByMobileOrEmployeeCode(null, mobile);
|
||||
// if(userByMobileOrEmployeeCode!=null){
|
||||
// return createTokenAfterLoginSuccess(userByMobileOrEmployeeCode.getId(), mobile, LoginLogTypeEnum.LOGIN_SSO);
|
||||
// }
|
||||
@PostMapping("/shjnsso")
|
||||
@Inner(value = false)
|
||||
@Operation(summary = "诗画江南单点登录")
|
||||
public R shjnsso(@RequestBody @Valid SHJNSSODTO shjnsso) {
|
||||
R rdata = remoterThirdPartyAuthService.shjnsso(shjnsso.getAccountId(), shjnsso.getSessionId());
|
||||
ZZDUserDTO zzdUserDTO = (ZZDUserDTO) rdata.getData();
|
||||
ZZDUserDTO.Ext ext = zzdUserDTO.getExt();
|
||||
String mobile = zzdUserDTO.getMobile();
|
||||
R<List<SysUser>> rListSysUser = remoteUserService.getUserByMobileOrEmployeeCode(null, mobile);
|
||||
List<SysUser> sysUsers = rListSysUser.getData();
|
||||
if(!CollectionUtils.isEmpty(sysUsers)){
|
||||
//登录成功生成token
|
||||
UserTokenDTO userTokenDTO = new UserTokenDTO();
|
||||
userTokenDTO.setSysUser(sysUsers.get(0));
|
||||
remoteTokenService.generateToken(userTokenDTO);
|
||||
}
|
||||
// log.info("用户不存在,尝试创建用户");
|
||||
// CreateUserDto createUserDto = new CreateUserDto();
|
||||
// createUserDto.setUsername(zzdUserDTO.getUsername());
|
||||
@@ -207,7 +216,8 @@ public class AppUserAutoLoginController {
|
||||
// AdminUserRespDTO adminUserRespDTONew=adminUserApi.createSysUser(createUserDto);
|
||||
// log.info("创建用户成功,用户id为:{}",adminUserRespDTONew.getId());
|
||||
// return createTokenAfterLoginSuccess(adminUserRespDTONew.getId(), mobile, LoginLogTypeEnum.LOGIN_SSO);
|
||||
// }
|
||||
return R.failed("不存在用户");
|
||||
}
|
||||
|
||||
|
||||
@Inner(value = false)
|
||||
|
||||
Reference in new issue
Block a user