|
|
|
@ -26,6 +26,8 @@ import lombok.AllArgsConstructor;
|
|
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
|
import org.springblade.common.exception.CustomerException; |
|
|
|
|
import org.springblade.core.boot.ctrl.BladeController; |
|
|
|
|
import org.springblade.core.secure.BladeUser; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tenant.annotation.NonDS; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
@ -40,7 +42,6 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
* @since 2023-06-06 |
|
|
|
|
*/ |
|
|
|
|
@Log4j2 |
|
|
|
|
@NonDS |
|
|
|
|
@RestController |
|
|
|
|
@AllArgsConstructor |
|
|
|
|
@RequestMapping("/factory/auth") |
|
|
|
@ -55,6 +56,8 @@ public class FactoryAuthController extends BladeController {
|
|
|
|
|
@ApiOperation(value = "获取token推送", notes = "传入factoryAccountDTO") |
|
|
|
|
public R token(@Validated @RequestBody FactoryAccountDTO factoryAccountDTO, HttpServletResponse response) { |
|
|
|
|
log.info("############token: 获取账号token "); |
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
|
log.info("############请求参数 user:{}",user); |
|
|
|
|
log.info("############请求参数 factoryAccountDTO:{}",factoryAccountDTO); |
|
|
|
|
//通过企业id 应用id 秘钥 获取对应的token
|
|
|
|
|
String corpid = factoryAccountDTO.getCorpid();//企业id
|
|
|
|
|