40 lines
1.4 KiB
Java
Raw Normal View History

package cd.casic.server.controller;
import cd.casic.framework.commons.pojo.CommonResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import static cd.casic.framework.commons.exception.enums.GlobalErrorCodeConstants.NOT_IMPLEMENTED;
/**
* 默认 Controller解决部分 module 未开启时的 404 提示
* 例如说/xx/** 路径工作流
*
* @author mianbin
*/
@RestController
public class DefaultController {
@RequestMapping(value = {"/admin-api/product/**", // 商品中心
"/admin-api/trade/**", // 交易中心
"/admin-api/promotion/**"}) // 营销中心
public CommonResult<Boolean> mall404() {
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
"[商城系统 yudao-module-mall - 已禁用][参考 https://doc.iocoder.cn/mall/build/ 开启]");
}
@RequestMapping(value = {"/admin-api/report/**"})
public CommonResult<Boolean> report404() {
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
"[报表模块 ops-module-report - 已禁用][参考 https://doc.iocoder.cn/report/ 开启]");
}
@RequestMapping(value = {"/admin-api/ai/**"})
public CommonResult<Boolean> ai404() {
return CommonResult.error(NOT_IMPLEMENTED.getCode(),
"[AI 大模型 ops-module-ai - 已禁用][参考 https://doc.iocoder.cn/ai/build/ 开启]");
}
}