parent
b52a38d297
commit
cca4c9fceb
@ -1,37 +1,27 @@
|
||||
package cn.iocoder.yudao.module.system.api.sms.dto.send;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.validation.Mobile;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 短信发送给 Admin 或者 Member 用户
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@ApiModel("RPC 服务 - 短信发送给 Admin 或者 Member 用户 Request DTO")
|
||||
@Data
|
||||
public class SmsSendSingleToUserReqDTO {
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@ApiModelProperty(value = "用户编号", example = "1024")
|
||||
private Long userId;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@ApiModelProperty(value = "手机号", required = true, example = "15601691300")
|
||||
@Mobile
|
||||
private String mobile;
|
||||
/**
|
||||
* 短信模板编号
|
||||
*/
|
||||
@ApiModelProperty(value = "用户编号", required = true, example = "USER_SEND")
|
||||
@NotEmpty(message = "短信模板编号不能为空")
|
||||
private String templateCode;
|
||||
/**
|
||||
* 短信模板参数
|
||||
*/
|
||||
@ApiModelProperty(value = "短信模板参数")
|
||||
private Map<String, Object> templateParams;
|
||||
|
||||
}
|
||||
|
||||
@ -1,29 +1,34 @@
|
||||
package cn.iocoder.yudao.module.system.api.sensitiveword;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.system.service.sensitiveword.SensitiveWordService;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 敏感词 API 实现类
|
||||
*
|
||||
* @author 永不言败
|
||||
*/
|
||||
@Service
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.module.system.enums.ApiConstants.VERSION;
|
||||
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@DubboService(version = VERSION) // 提供 Dubbo RPC 接口,给 Dubbo Consumer 调用
|
||||
@Validated
|
||||
public class SensitiveWordApiImpl implements SensitiveWordApi {
|
||||
|
||||
@Resource
|
||||
private SensitiveWordService sensitiveWordService;
|
||||
|
||||
@Override
|
||||
public List<String> validateText(String text, List<String> tags) {
|
||||
return sensitiveWordService.validateText(text, tags);
|
||||
public CommonResult<List<String>> validateText(String text, List<String> tags) {
|
||||
return success(sensitiveWordService.validateText(text, tags));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTextValid(String text, List<String> tags) {
|
||||
return sensitiveWordService.isTextValid(text, tags);
|
||||
public CommonResult<Boolean> isTextValid(String text, List<String> tags) {
|
||||
return success(sensitiveWordService.isTextValid(text, tags));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in new issue