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.6 KiB

/**
* 增加${comment}
<#list params as param>
* @param ${param.key} ${param.comment}
</#list>
*/
@Before({POST.class})
@JwtCheckInterface({})
public void add${beanNameWithoutT}(${fullParameters}){
${daoName}.add${beanNameWithoutT}(${parameters});
renderJson(RetKit.renderSuccess());
}
/**
* 删除${comment}
<#list params as param>
* @param ${param.key} ${param.comment}
</#list>
*/
@Before({POST.class})
@JwtCheckInterface({})
@IsNumericInterface({"${key}"})
public void del${beanNameWithoutT}ById(${key_type} ${key}){
${daoName}.del${beanNameWithoutT}ById(${key});
renderJson(RetKit.renderSuccess());
}
/**按ID修改${comment}
<#list params as param>
* @param ${param.key} ${param.comment}
</#list>
*/
@Before({POST.class})
@JwtCheckInterface({})
@IsNumericInterface({${key})
public void update${beanNameWithoutT}ById(${key_type} ${key} , ${fullParameters}){
${daoName}.update${beanNameWithoutT}ById(${key} , ${parameters});
renderJson(RetKit.renderSuccess());
}
/**按ID查询${comment}
* @para ${key} 主键
*/
@Before({GET.class})
@JwtCheckInterface({})
@IsNumericInterface("{${key}}")
public void get${beanNameWithoutT}ById(${key_type} ${key}){
renderJson(RetKit.renderSuccess(${daoName}.get${beanNameWithoutT}ById(${key})));
}
/** 分页查询${comment}
*/
@Before({GET.class})
@JwtCheckInterface({})
public void get${beanNameWithoutT}List(int pageNum, int pageSize){
Page<Record> listPage = ${daoName}.get${beanNameWithoutT}List(pageNum, pageSize);
renderJson(RetKit.renderSuccess(listPage));
}