package com.yqzx.generator.action;
|
|
import com.yqzx.generator.action.config.WebGeneratorConfig;
|
import com.yqzx.generator.action.model.GenQo;
|
import com.yqzx.common.domain.result.CommonResult;
|
import com.yqzx.common.util.CommonUtil;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/**
|
* 功能描述:代码生成器入口
|
*
|
* @author dhz
|
* @date 2024-04-16 14:54
|
* @Version 1.0
|
**/
|
@RequestMapping("/v1/base/web")
|
@RestController
|
public class WebGenerator {
|
|
@RequestMapping("/generator")
|
@ResponseBody
|
public CommonResult generator() {
|
GenQo genQo = CommonUtil.getObjFromReq(GenQo.class);
|
// genQo.setQueryTableInfo(new ArrayList<TableInfo>() {{
|
// TableInfo tableInfo = new TableInfo();
|
// tableInfo.setName("name");
|
// tableInfo.setType("String");
|
// tableInfo.setComment("姓名");
|
// tableInfo.setPropertyName("name");
|
// tableInfo.setJdbcType("VARCHAR");
|
// add(tableInfo);
|
// }});
|
WebGeneratorConfig webGeneratorConfig = new WebGeneratorConfig(genQo);
|
webGeneratorConfig.doGeneration();
|
return new CommonResult(CommonResult.CODE_OK);
|
}
|
}
|