|
|
@ -1,14 +1,13 @@
|
|
|
|
package ${basePackage}.action.ajax.system;
|
|
|
|
package ${basePackage}.action.ajax.${module};
|
|
|
|
|
|
|
|
|
|
|
|
import ${basePackage}.frame.auth.LocalData;
|
|
|
|
import ${basePackage}.frame.auth.LocalData;
|
|
|
|
import ${basePackage}.frame.base.Ajax;
|
|
|
|
|
|
|
|
import ${basePackage}.frame.utils.MapperUtil;
|
|
|
|
import ${basePackage}.frame.utils.MapperUtil;
|
|
|
|
import ${basePackage}.module.system.mgr.UserManager;
|
|
|
|
import ${basePackage}.module.${module}.mgr.${table.getCName()}Manager;
|
|
|
|
import ${basePackage}.module.system.req.*;
|
|
|
|
import ${basePackage}.module.${module}.req.*;
|
|
|
|
import ${basePackage}.module.system.rsp.*;
|
|
|
|
import ${basePackage}.module.${module}.rsp.*;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
|
|
|
|
|
|
|
public class ${table.getCName()}Ajax extends Ajax {
|
|
|
|
public class ${table.getCName()}Ajax{
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private ${table.getCName()}Manager ${table.getFName()}Manager;
|
|
|
|
private ${table.getCName()}Manager ${table.getFName()}Manager;
|
|
|
@ -19,43 +18,43 @@ public class ${table.getCName()}Ajax extends Ajax {
|
|
|
|
return ${table.getFName()}Manager.create(request, LocalData.getToken());
|
|
|
|
return ${table.getFName()}Manager.create(request, LocalData.getToken());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</#if>
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
|
|
<#if table.getDelete()>
|
|
|
|
<#if table.getDelete()>
|
|
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}DeleteResponse delete(String jsonParam) {
|
|
|
|
public ${table.getCName()}DeleteResponse delete(String jsonParam) {
|
|
|
|
${table.getCName()}DeleteRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}DeleteRequest.class);
|
|
|
|
${table.getCName()}DeleteRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}DeleteRequest.class);
|
|
|
|
return ${table.getFName()}Manager.delete(request, LocalData.getToken());
|
|
|
|
return ${table.getFName()}Manager.delete(request, LocalData.getToken());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</#if>
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
|
|
<#if table.getUpdate()>
|
|
|
|
<#if table.getUpdate()>
|
|
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}UpdateResponse update(String jsonParam) {
|
|
|
|
public ${table.getCName()}UpdateResponse update(String jsonParam) {
|
|
|
|
${table.getCName()}UpdateRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}UpdateRequest.class);
|
|
|
|
${table.getCName()}UpdateRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}UpdateRequest.class);
|
|
|
|
return ${table.getFName()}Manager.update(request, LocalData.getToken());
|
|
|
|
return ${table.getFName()}Manager.update(request, LocalData.getToken());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</#if>
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
|
|
<#if table.getFind()>
|
|
|
|
<#if table.getFind()>
|
|
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}FindResponse find(String jsonParam) {
|
|
|
|
public ${table.getCName()}FindResponse find(String jsonParam) {
|
|
|
|
${table.getCName()}FindRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}FindRequest.class);
|
|
|
|
${table.getCName()}FindRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}FindRequest.class);
|
|
|
|
return ${table.getFName()}Manager.find(request, LocalData.getToken());
|
|
|
|
return ${table.getFName()}Manager.find(request, LocalData.getToken());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</#if>
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
|
|
<#if table.getGet()>
|
|
|
|
<#if table.getGet()>
|
|
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}GetResponse get(String jsonParam) {
|
|
|
|
public ${table.getCName()}GetResponse get(String jsonParam) {
|
|
|
|
${table.getCName()}GetRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}GetRequest.class);
|
|
|
|
${table.getCName()}GetRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}GetRequest.class);
|
|
|
|
return ${table.getFName()}Manager.get(request, LocalData.getToken());
|
|
|
|
return ${table.getFName()}Manager.get(request, LocalData.getToken());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</#if>
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
|
|
<#if table.getSearch()>
|
|
|
|
<#if table.getSearch()>
|
|
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}SearchResponse search(String jsonParam) {
|
|
|
|
public ${table.getCName()}SearchResponse search(String jsonParam) {
|
|
|
|
${table.getCName()}SearchRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}SearchRequest.class);
|
|
|
|
${table.getCName()}SearchRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}SearchRequest.class);
|
|
|
|
return ${table.getFName()}Manager.search(request, LocalData.getToken());
|
|
|
|
return ${table.getFName()}Manager.search(request, LocalData.getToken());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</#if>
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
|
|
<#if table.getGetAll()>
|
|
|
|
<#if table.getGetAll()>
|
|
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}GetAllResponse getAll(String jsonParam) {
|
|
|
|
public ${table.getCName()}GetAllResponse getAll(String jsonParam) {
|
|
|
|
${table.getCName()}GetAllRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}GetAllRequest.class);
|
|
|
|
${table.getCName()}GetAllRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}GetAllRequest.class);
|
|
|
|
return ${table.getFName()}Manager.getAll(request, LocalData.getToken());
|
|
|
|
return ${table.getFName()}Manager.getAll(request, LocalData.getToken());
|
|
|
|