|
|
|
@ -27,50 +27,43 @@ public class ${table.getCName()}Ajax{
|
|
|
|
|
private ${table.getCName()}Manager ${table.getFName()}Manager;
|
|
|
|
|
|
|
|
|
|
<#if table.getCreate()>
|
|
|
|
|
public ${table.getCName()}CreateResponse create(TreeNode jsonParam) {
|
|
|
|
|
${table.getCName()}CreateRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}CreateRequest.class);
|
|
|
|
|
public ${table.getCName()}CreateResponse create(${table.getCName()}CreateRequest request) {
|
|
|
|
|
return ${table.getFName()}Manager.create(request, LocalData.getToken());
|
|
|
|
|
}
|
|
|
|
|
</#if>
|
|
|
|
|
<#if table.getDelete()>
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}DeleteResponse delete(TreeNode jsonParam) {
|
|
|
|
|
${table.getCName()}DeleteRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}DeleteRequest.class);
|
|
|
|
|
public ${table.getCName()}DeleteResponse delete(${table.getCName()}DeleteRequest request) {
|
|
|
|
|
return ${table.getFName()}Manager.delete(request, LocalData.getToken());
|
|
|
|
|
}
|
|
|
|
|
</#if>
|
|
|
|
|
<#if table.getUpdate()>
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}UpdateResponse update(TreeNode jsonParam) {
|
|
|
|
|
${table.getCName()}UpdateRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}UpdateRequest.class);
|
|
|
|
|
public ${table.getCName()}UpdateResponse update(${table.getCName()}UpdateRequest request) {
|
|
|
|
|
return ${table.getFName()}Manager.update(request, LocalData.getToken());
|
|
|
|
|
}
|
|
|
|
|
</#if>
|
|
|
|
|
<#if table.getFind()>
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}FindResponse find(TreeNode jsonParam) {
|
|
|
|
|
${table.getCName()}FindRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}FindRequest.class);
|
|
|
|
|
public ${table.getCName()}FindResponse find(${table.getCName()}FindRequest request) {
|
|
|
|
|
return ${table.getFName()}Manager.find(request, LocalData.getToken());
|
|
|
|
|
}
|
|
|
|
|
</#if>
|
|
|
|
|
<#if table.getGet()>
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}GetResponse get(TreeNode jsonParam) {
|
|
|
|
|
${table.getCName()}GetRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}GetRequest.class);
|
|
|
|
|
public ${table.getCName()}GetResponse get(${table.getCName()}GetRequest request) {
|
|
|
|
|
return ${table.getFName()}Manager.get(request, LocalData.getToken());
|
|
|
|
|
}
|
|
|
|
|
</#if>
|
|
|
|
|
<#if table.getSearch()>
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}SearchResponse search(TreeNode jsonParam) {
|
|
|
|
|
${table.getCName()}SearchRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}SearchRequest.class);
|
|
|
|
|
public ${table.getCName()}SearchResponse search(${table.getCName()}SearchRequest request) {
|
|
|
|
|
return ${table.getFName()}Manager.search(request, LocalData.getToken());
|
|
|
|
|
}
|
|
|
|
|
</#if>
|
|
|
|
|
<#if table.getGetAll()>
|
|
|
|
|
|
|
|
|
|
public ${table.getCName()}GetAllResponse getAll(TreeNode jsonParam) {
|
|
|
|
|
${table.getCName()}GetAllRequest request = MapperUtil.toJava(jsonParam, ${table.getCName()}GetAllRequest.class);
|
|
|
|
|
public ${table.getCName()}GetAllResponse getAll(${table.getCName()}GetAllRequest request) {
|
|
|
|
|
return ${table.getFName()}Manager.getAll(request, LocalData.getToken());
|
|
|
|
|
}
|
|
|
|
|
</#if>
|
|
|
|
|