mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
token新增,编辑,接口入参修改
This commit is contained in:
+2
-2
@@ -20,7 +20,7 @@ import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
|||||||
* @author Beal
|
* @author Beal
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@Tag(name = "机台授权")
|
@Tag(name = "组织机台授权")
|
||||||
@RequestMapping("/system/machine-auth")
|
@RequestMapping("/system/machine-auth")
|
||||||
public class MachineAuthController {
|
public class MachineAuthController {
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ public class MachineAuthController {
|
|||||||
|
|
||||||
|
|
||||||
@PostMapping("update-organ-auth")
|
@PostMapping("update-organ-auth")
|
||||||
@Operation(summary = "组织机台授权信息更新")
|
@Operation(summary = "修改组织机台数量")
|
||||||
@PreAuthorize("@ss.hasPermission('machine-auth::update')")
|
@PreAuthorize("@ss.hasPermission('machine-auth::update')")
|
||||||
public CommonResult<Boolean> authUpdate(@RequestBody MachineOrgAuthReq vo) {
|
public CommonResult<Boolean> authUpdate(@RequestBody MachineOrgAuthReq vo) {
|
||||||
return success(machineService.authUpdate(vo));
|
return success(machineService.authUpdate(vo));
|
||||||
|
|||||||
+4
@@ -42,6 +42,10 @@ public class TokenConfigRespVO {
|
|||||||
private String appToken;
|
private String appToken;
|
||||||
|
|
||||||
|
|
||||||
|
@Schema(description = "时间类型")
|
||||||
|
private String timeType;
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "过期时间")
|
@Schema(description = "过期时间")
|
||||||
@ExcelProperty("过期时间")
|
@ExcelProperty("过期时间")
|
||||||
private LocalDateTime expiresTime;
|
private LocalDateTime expiresTime;
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ public class TokenConfigSaveReqVO {
|
|||||||
|
|
||||||
|
|
||||||
@Schema(description = "有效时间类型")
|
@Schema(description = "有效时间类型")
|
||||||
private String expiresTimeType;
|
private String timeType;
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
@Schema(description = "备注")
|
||||||
|
|||||||
+5
@@ -43,6 +43,11 @@ public class TokenConfigDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private String appToken;
|
private String appToken;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间类型
|
||||||
|
*/
|
||||||
|
private String timeType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 过期时间
|
* 过期时间
|
||||||
*/
|
*/
|
||||||
|
|||||||
+7
-4
@@ -123,8 +123,8 @@ public class TokenConfigServiceImpl implements TokenConfigService{
|
|||||||
LocalDateTime localDateTime = LocalDate.parse(reqVO.getCustomizeTime()).atStartOfDay();
|
LocalDateTime localDateTime = LocalDate.parse(reqVO.getCustomizeTime()).atStartOfDay();
|
||||||
adjustedTime = localDateTime.withHour(23).withMinute(59).withSecond(59);
|
adjustedTime = localDateTime.withHour(23).withMinute(59).withSecond(59);
|
||||||
}else {
|
}else {
|
||||||
AssertUtils.notEmpty(reqVO.getExpiresTimeType(),TOKEN_EXPIRES_TIME_IS_NULL);
|
AssertUtils.notEmpty(reqVO.getTimeType(),TOKEN_EXPIRES_TIME_IS_NULL);
|
||||||
adjustedTime = TokenExpiresTimeTypeEnum.adjustTime(reqVO.getExpiresTimeType(), LocalDateTime.now());
|
adjustedTime = TokenExpiresTimeTypeEnum.adjustTime(reqVO.getTimeType(), LocalDateTime.now());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -133,6 +133,7 @@ public class TokenConfigServiceImpl implements TokenConfigService{
|
|||||||
.appToken(token)
|
.appToken(token)
|
||||||
.appType(reqVO.getAppType())
|
.appType(reqVO.getAppType())
|
||||||
.organId(organId)
|
.organId(organId)
|
||||||
|
.timeType(reqVO.getTimeType())
|
||||||
.expiresTime(adjustedTime)
|
.expiresTime(adjustedTime)
|
||||||
.remark(reqVO.getRemark())
|
.remark(reqVO.getRemark())
|
||||||
.build());
|
.build());
|
||||||
@@ -156,8 +157,8 @@ public class TokenConfigServiceImpl implements TokenConfigService{
|
|||||||
if (reqVO.getCustomizeTime() != null){
|
if (reqVO.getCustomizeTime() != null){
|
||||||
LocalDateTime localDateTime = LocalDate.parse(reqVO.getCustomizeTime()).atStartOfDay();
|
LocalDateTime localDateTime = LocalDate.parse(reqVO.getCustomizeTime()).atStartOfDay();
|
||||||
adjustedTime = localDateTime.withHour(23).withMinute(59).withSecond(59);
|
adjustedTime = localDateTime.withHour(23).withMinute(59).withSecond(59);
|
||||||
}else if(reqVO.getExpiresTimeType() != null){
|
}else if(reqVO.getTimeType() != null){
|
||||||
adjustedTime = TokenExpiresTimeTypeEnum.adjustTime(reqVO.getExpiresTimeType(), tokenConfigDO.getCreateTime());
|
adjustedTime = TokenExpiresTimeTypeEnum.adjustTime(reqVO.getTimeType(), tokenConfigDO.getCreateTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(adjustedTime != null){
|
if(adjustedTime != null){
|
||||||
@@ -171,6 +172,8 @@ public class TokenConfigServiceImpl implements TokenConfigService{
|
|||||||
|
|
||||||
tokenConfigDO.setRemark(reqVO.getRemark() == null ? tokenConfigDO.getRemark() : reqVO.getRemark());
|
tokenConfigDO.setRemark(reqVO.getRemark() == null ? tokenConfigDO.getRemark() : reqVO.getRemark());
|
||||||
|
|
||||||
|
tokenConfigDO.setTimeType(reqVO.getTimeType());
|
||||||
|
|
||||||
tokenConfigMapper.updateById(tokenConfigDO);
|
tokenConfigMapper.updateById(tokenConfigDO);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user