You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.5 KiB
58 lines
1.5 KiB
/**
|
|
* 增加${comment}
|
|
<#list paraList as param>
|
|
* @param ${param.key} ${param.comment}
|
|
</#list>
|
|
*/
|
|
@Before({POST.class})
|
|
@JwtCheckInterface({})
|
|
public void add${beanName}(${parasWithoutPrimaryKey}){
|
|
${daoName}.add${beanName}(${parasWithoutPrimaryKeyAndDataType});
|
|
renderJson(RetKit.renderSuccess());
|
|
}
|
|
|
|
/**
|
|
* 删除${comment}
|
|
<#list paraList as param>
|
|
* @param ${param.key} ${param.comment}
|
|
</#list>
|
|
*/
|
|
@Before({POST.class})
|
|
@JwtCheckInterface({})
|
|
@IsNumericInterface({"${key}"})
|
|
public void del${beanName}ById(${key_type} ${key}){
|
|
${daoName}.del${beanName}ById(${key});
|
|
renderJson(RetKit.renderSuccess());
|
|
}
|
|
|
|
/**按ID修改${comment}
|
|
<#list paraList as param>
|
|
* @param ${param.key} ${param.comment}
|
|
</#list>
|
|
*/
|
|
@Before({POST.class})
|
|
@JwtCheckInterface({})
|
|
@IsNumericInterface({${key})
|
|
public void update${beanName}ById(${key_type} ${key} , ${parasWithoutPrimaryKey}){
|
|
${daoName}.update${beanName}ById(${key} , ${parasWithoutPrimaryKeyAndDataType});
|
|
renderJson(RetKit.renderSuccess());
|
|
}
|
|
|
|
/**按ID查询${comment}
|
|
* @para ${key} 主键
|
|
*/
|
|
@Before({GET.class})
|
|
@JwtCheckInterface({})
|
|
@IsNumericInterface("{${key}}")
|
|
public void get${beanName}ById(${key_type} ${key}){
|
|
renderJson(RetKit.renderSuccess(${daoName}.get${beanName}ById(${key})));
|
|
}
|
|
|
|
/** 分页查询${comment}
|
|
*/
|
|
@Before({GET.class})
|
|
@JwtCheckInterface({})
|
|
public void get${beanName}List(int pageNum, int pageSize){
|
|
Page<Record> listPage = ${daoName}.get${beanName}List(pageNum, pageSize);
|
|
renderJson(RetKit.renderSuccess(listPage));
|
|
} |