feat(autocall): 添加智能呼叫启用禁用日志记录- 在 AutoCallController 类中添加了日志记录功能
- 当启用或禁用智能呼叫时,会在日志中记录相应信息- 增加了对 enable 参数的非空校验,提高代码健壮性master
parent
34eed59425
commit
a69a9774eb
|
|
@ -10,6 +10,7 @@ import com.whdc.service.autocall.AutoCallApiService;
|
|||
import com.whdc.service.autocall.AutoCallTaskService2;
|
||||
import com.whdc.utils.AICCHelper;
|
||||
import com.whdc.utils.ResultJson;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -28,6 +29,7 @@ import java.util.List;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/autocall")
|
||||
@Slf4j
|
||||
public class AutoCallController {
|
||||
@Autowired
|
||||
private AutoCallApiService autoCallApiService;
|
||||
|
|
@ -82,7 +84,15 @@ public class AutoCallController {
|
|||
|
||||
@GetMapping("/setEnable")
|
||||
public ResultJson<Boolean> setEnable(@RequestParam("enable") Boolean enable) {
|
||||
if (enable == null) {
|
||||
return ResultJson.error("参数错误");
|
||||
}
|
||||
configMapper.setEnable(enable);
|
||||
if (enable) {
|
||||
log.info("启用智能呼叫");
|
||||
} else {
|
||||
log.info("禁用智能呼叫");
|
||||
}
|
||||
return ResultJson.ok(true);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue