Merge branch 'master' of https://gitee.com/youlaiorg/youlai-boot
This commit is contained in:
@@ -57,7 +57,7 @@ public class ConfigController {
|
||||
}
|
||||
|
||||
@Operation(summary = "刷新系统配置缓存")
|
||||
@PutMapping(value = "/refresh")
|
||||
@PutMapping("/refresh")
|
||||
@PreAuthorize("@ss.hasPerm('sys:config:refresh')")
|
||||
public Result<ConfigForm> refreshCache() {
|
||||
return Result.judge(configService.refreshCache());
|
||||
|
||||
@@ -83,8 +83,7 @@ public class NoticeController {
|
||||
}
|
||||
|
||||
@Operation(summary = "发布通知公告")
|
||||
@PatchMapping(value = "/{id}/publish")
|
||||
@PutMapping(value = "/{id}/publish")
|
||||
@PutMapping("/{id}/publish")
|
||||
@PreAuthorize("@ss.hasPerm('sys:notice:publish')")
|
||||
public Result<Void> publishNotice(
|
||||
@Parameter(description = "通知公告ID") @PathVariable Long id
|
||||
@@ -94,8 +93,7 @@ public class NoticeController {
|
||||
}
|
||||
|
||||
@Operation(summary = "撤回通知公告")
|
||||
@PutMapping(value = "/{id}/revoke")
|
||||
@PatchMapping(value = "/{id}/revoke")
|
||||
@PutMapping("/{id}/revoke")
|
||||
@PreAuthorize("@ss.hasPerm('sys:notice:revoke')")
|
||||
public Result<Void> revokeNotice(
|
||||
@Parameter(description = "通知公告ID") @PathVariable Long id
|
||||
|
||||
@@ -72,4 +72,9 @@ public class User extends BaseEntity {
|
||||
* 是否删除(0-否 1-是)
|
||||
*/
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
* 微信openid
|
||||
*/
|
||||
private String openId;
|
||||
}
|
||||
@@ -56,4 +56,7 @@ public class UserForm {
|
||||
@NotEmpty(message = "用户角色不能为空")
|
||||
private List<Long> roleIds;
|
||||
|
||||
@Schema(description="微信openId")
|
||||
private String openId;
|
||||
|
||||
}
|
||||
|
||||
@@ -158,4 +158,12 @@ public interface UserService extends IService<User> {
|
||||
* @return {@link List<Option<String>>} 用户选项列表
|
||||
*/
|
||||
List<Option<String>> listUserOptions();
|
||||
|
||||
/**
|
||||
* 根据openId获取用户信息
|
||||
*
|
||||
* @param openId openId
|
||||
* @return {@link User}
|
||||
*/
|
||||
User getUserByOpenId(String openId);
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> impleme
|
||||
"配置键已存在");
|
||||
Config config = configConverter.toEntity(configForm);
|
||||
config.setCreateBy(SecurityUtils.getUserId());
|
||||
config.setIsDeleted(0);
|
||||
return this.save(config);
|
||||
}
|
||||
|
||||
|
||||
@@ -457,4 +457,15 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据openId获取用户信息
|
||||
*
|
||||
* @param openId openId
|
||||
* @return {@link User}
|
||||
*/
|
||||
@Override
|
||||
public User getUserByOpenId(String openId) {
|
||||
return this.getOne(new LambdaQueryWrapper<User>().eq(User::getOpenId, openId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user