trade: 优化修改推广员接口字段名称

This commit is contained in:
owen 2023-09-08 22:40:49 +08:00
parent b85d660a5c
commit f36a6c5d6c
4 changed files with 6 additions and 8 deletions

View File

@ -62,7 +62,7 @@ public class BrokerageUserController {
@Operation(summary = "修改推广资格")
@PreAuthorize("@ss.hasPermission('trade:brokerage-user:update-brokerage-enable')")
public CommonResult<Boolean> updateBrokerageEnabled(@Valid @RequestBody BrokerageUserUpdateBrokerageEnabledReqVO updateReqVO) {
brokerageUserService.updateBrokerageEnabled(updateReqVO.getId(), updateReqVO.getBrokerageEnabled());
brokerageUserService.updateBrokerageEnabled(updateReqVO.getId(), updateReqVO.getEnabled());
return success(true);
}

View File

@ -15,10 +15,8 @@ public class BrokerageUserUpdateBrokerageEnabledReqVO {
@NotNull(message = "用户编号不能为空")
private Long id;
// TODO @疯狂是不是这个字段可以改成 enabled
@Schema(description = "推广资格", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "推广资格不能为空")
private Boolean brokerageEnabled;
private Boolean enabled;
}

View File

@ -49,10 +49,10 @@ public interface BrokerageUserService {
/**
* 修改推广资格
*
* @param id 用户编号
* @param brokerageEnabled 推广资格
* @param id 用户编号
* @param enabled 推广资格
*/
void updateBrokerageEnabled(Long id, Boolean brokerageEnabled);
void updateBrokerageEnabled(Long id, Boolean enabled);
/**
* 获得用户的推广人

View File

@ -52,7 +52,7 @@ public class BrokerageUserServiceImpl implements BrokerageUserService {
}
@Override
public void updateBrokerageEnabled(Long id, Boolean brokerageEnabled) {
public void updateBrokerageEnabled(Long id, Boolean enabled) {
// 校验存在
validateBrokerageUserExists(id);
// TODO @疯狂貌似没实现完