|
@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@ -51,9 +52,9 @@ public class BaseSensitiveEndpoint extends EnvelopRestEndpoint {
|
|
@ApiParam(name = "explanation", value = "说明")
|
|
@ApiParam(name = "explanation", value = "说明")
|
|
@RequestParam(value = "explanation", required = false) String explanation,
|
|
@RequestParam(value = "explanation", required = false) String explanation,
|
|
@ApiParam(name = "status", value = "status")
|
|
@ApiParam(name = "status", value = "status")
|
|
@RequestParam(value = "status", required = false,defaultValue = "1") String status) throws Exception {
|
|
|
|
|
|
@RequestParam(value = "status", required = false,defaultValue = "1") Integer status) throws Exception {
|
|
try {
|
|
try {
|
|
baseSensitiveService.createSensitiveWords(words,explanation,status,getUID(),getUNAME());
|
|
|
|
|
|
baseSensitiveService.createSensitiveWords(words,explanation,status+"",getUID(),getUNAME());
|
|
return MixEnvelop.getSuccess("创建成功");
|
|
return MixEnvelop.getSuccess("创建成功");
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
return MixEnvelop.getError(e.getMessage());
|
|
return MixEnvelop.getError(e.getMessage());
|
|
@ -100,12 +101,12 @@ public class BaseSensitiveEndpoint extends EnvelopRestEndpoint {
|
|
@GetMapping(value = BaseRequestMapping.BaseSensitive.updateSensitiveWordsStatus)
|
|
@GetMapping(value = BaseRequestMapping.BaseSensitive.updateSensitiveWordsStatus)
|
|
@ApiOperation(value = "修改敏感词汇状态")
|
|
@ApiOperation(value = "修改敏感词汇状态")
|
|
public MixEnvelop updateSensitiveWordsStatus (
|
|
public MixEnvelop updateSensitiveWordsStatus (
|
|
@ApiParam(name = "id", value = "id")
|
|
|
|
@RequestParam(value = "id", required = false) String id,
|
|
|
|
|
|
@ApiParam(name = "ids", value = "ids")
|
|
|
|
@RequestParam(value = "ids", required = false) String ids,
|
|
@ApiParam(name = "status", value = "status")
|
|
@ApiParam(name = "status", value = "status")
|
|
@RequestParam(value = "status", required = false) String status) throws Exception {
|
|
|
|
|
|
@RequestParam(value = "status", required = false,defaultValue = "1") Integer status) throws Exception {
|
|
try {
|
|
try {
|
|
baseSensitiveService.updateSensitiveWordsStatus(id,status,getUID(),getUNAME());
|
|
|
|
|
|
baseSensitiveService.updateSensitiveWordsStatus(ids,status+"",getUID(),getUNAME());
|
|
return MixEnvelop.getSuccess("修改成功");
|
|
return MixEnvelop.getSuccess("修改成功");
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
return MixEnvelop.getError(e.getMessage());
|
|
return MixEnvelop.getError(e.getMessage());
|
|
@ -120,11 +121,11 @@ public class BaseSensitiveEndpoint extends EnvelopRestEndpoint {
|
|
@ApiParam(name = "pageSize", value = "pageSize")
|
|
@ApiParam(name = "pageSize", value = "pageSize")
|
|
@RequestParam(value = "pageSize", required = false,defaultValue = "15") Integer pageSize,
|
|
@RequestParam(value = "pageSize", required = false,defaultValue = "15") Integer pageSize,
|
|
@ApiParam(name = "status", value = "status")
|
|
@ApiParam(name = "status", value = "status")
|
|
@RequestParam(value = "status", required = false) String status,
|
|
|
|
|
|
@RequestParam(value = "status", required = false) Integer status,
|
|
@ApiParam(name = "words", value = "words")
|
|
@ApiParam(name = "words", value = "words")
|
|
@RequestParam(value = "words", required = false) String words) throws Exception {
|
|
@RequestParam(value = "words", required = false) String words) throws Exception {
|
|
try {
|
|
try {
|
|
return baseSensitiveService.findSensitiveWords(status,words,page,pageSize);
|
|
|
|
|
|
return baseSensitiveService.findSensitiveWords(status+"",words,page,pageSize);
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
return MixEnvelop.getError(e.getMessage());
|
|
return MixEnvelop.getError(e.getMessage());
|
|
@ -147,8 +148,8 @@ public class BaseSensitiveEndpoint extends EnvelopRestEndpoint {
|
|
|
|
|
|
@GetMapping(value = BaseRequestMapping.BaseSensitive.exportSensitiveWordsLog)
|
|
@GetMapping(value = BaseRequestMapping.BaseSensitive.exportSensitiveWordsLog)
|
|
@ApiOperation(value = "导出日志")
|
|
@ApiOperation(value = "导出日志")
|
|
public MixEnvelop exportSensitiveWordsLog () throws Exception {
|
|
|
|
return baseSensitiveService.exportSensitiveWordsLog(fastdfs_file_url,getUID());
|
|
|
|
|
|
public MixEnvelop exportSensitiveWordsLog (HttpServletResponse response) throws Exception {
|
|
|
|
return baseSensitiveService.exportSensitiveWordsLog(response,getUID());
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseRequestMapping.BaseSensitive.importSensitiveWords)
|
|
@GetMapping(value = BaseRequestMapping.BaseSensitive.importSensitiveWords)
|