|
|
|
@ -244,9 +244,7 @@ public class GenerateCode {
|
|
|
|
|
}
|
|
|
|
|
sb.append(" */\n");
|
|
|
|
|
sb.append(" @Before({POST.class})\n");
|
|
|
|
|
sb.append(" //@JwtCheckInterface({})\n");
|
|
|
|
|
sb.append(" //@EmptyInterface({\"\"})\n");
|
|
|
|
|
sb.append(" //@IsNumericInterface({})\n");
|
|
|
|
|
sb.append(" @JwtCheckInterface({})\n");
|
|
|
|
|
sb.append(" public void add" + beanNameWithoutT + "(" + fullParameters + "){\n");
|
|
|
|
|
sb.append(" " + PropKit.get("daoName") + ".add" + beanNameWithoutT + "(" + parameters + ");\n");
|
|
|
|
|
sb.append(" renderJson(RetKit.renderSuccess());\n");
|
|
|
|
@ -256,9 +254,8 @@ public class GenerateCode {
|
|
|
|
|
sb.append("\n");
|
|
|
|
|
sb.append(" //按ID删除" + comment + "\n");
|
|
|
|
|
sb.append(" @Before({POST.class})\n");
|
|
|
|
|
sb.append(" //@JwtCheckInterface({})\n");
|
|
|
|
|
sb.append(" //@EmptyInterface({\"\"})\n");
|
|
|
|
|
sb.append(" //@IsNumericInterface({\"id\"})\n");
|
|
|
|
|
sb.append(" @JwtCheckInterface({})\n");
|
|
|
|
|
sb.append(" @IsNumericInterface({\""+key+"\"})\n");
|
|
|
|
|
sb.append(" public void del" + beanNameWithoutT + "ById(" + key_type + " " + key + "){\n");
|
|
|
|
|
sb.append(" " + PropKit.get("daoName") + ".del" + beanNameWithoutT + "ById(" + key + ");\n");
|
|
|
|
|
sb.append(" renderJson(RetKit.renderSuccess());\n");
|
|
|
|
@ -276,9 +273,8 @@ public class GenerateCode {
|
|
|
|
|
}
|
|
|
|
|
sb.append(" */\n");
|
|
|
|
|
sb.append(" @Before({POST.class})\n");
|
|
|
|
|
sb.append(" //@JwtCheckInterface({})\n");
|
|
|
|
|
sb.append(" //@EmptyInterface({\"\"})\n");
|
|
|
|
|
sb.append(" //@IsNumericInterface({\"id\"})\n");
|
|
|
|
|
sb.append(" @JwtCheckInterface({})\n");
|
|
|
|
|
sb.append(" //@IsNumericInterface({\""+key+"\"})\n");
|
|
|
|
|
sb.append(" public void update" + beanNameWithoutT + "ById(" + key_type + " " + key + "," + fullParameters + "){\n");
|
|
|
|
|
sb.append(" " + PropKit.get("daoName") + ".update" + beanNameWithoutT + "ById(" + key + "," + parameters + ");\n");
|
|
|
|
|
sb.append(" renderJson(RetKit.renderSuccess());\n");
|
|
|
|
@ -288,9 +284,8 @@ public class GenerateCode {
|
|
|
|
|
//4、单条查询
|
|
|
|
|
sb.append(" //按ID查询" + comment + "\n");
|
|
|
|
|
sb.append(" @Before({GET.class})\n");
|
|
|
|
|
sb.append(" //@JwtCheckInterface({})\n");
|
|
|
|
|
sb.append(" //@EmptyInterface({\"\"})\n");
|
|
|
|
|
sb.append(" //@IsNumericInterface({\"id\"})\n");
|
|
|
|
|
sb.append(" @JwtCheckInterface({})\n");
|
|
|
|
|
sb.append(" @IsNumericInterface({\""+key+"\"})\n");
|
|
|
|
|
sb.append(" public void get" + beanNameWithoutT + "ById(" + key_type + " " + key + "){\n");
|
|
|
|
|
sb.append(" renderJson(RetKit.renderSuccess(" + PropKit.get("daoName") + ".get" + beanNameWithoutT + "ById(" + key + ")));\n");
|
|
|
|
|
sb.append(" }\n");
|
|
|
|
@ -299,8 +294,7 @@ public class GenerateCode {
|
|
|
|
|
//5、分页查询
|
|
|
|
|
sb.append(" //分页查询" + comment + "\n");
|
|
|
|
|
sb.append(" @Before({GET.class})\n");
|
|
|
|
|
sb.append(" //@JwtCheckInterface({})\n");
|
|
|
|
|
sb.append(" //@EmptyInterface({\"\"})\n");
|
|
|
|
|
sb.append(" @JwtCheckInterface({})\n");
|
|
|
|
|
sb.append(" public void get" + beanNameWithoutT + "List(int pageNum, int pageSize){\n");
|
|
|
|
|
sb.append(" Page<Record> listPage = " + PropKit.get("daoName") + ".get" + beanNameWithoutT + "List(pageNum, pageSize);\n");
|
|
|
|
|
sb.append(" renderJson(RetKit.renderSuccess(listPage));\n");
|
|
|
|
|