service.java.ftl 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package ${package.Service};
  2. import ${package.Entity}.${entity};
  3. import ${superServiceClassPackage};
  4. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  5. import com.xunmei.common.core.web.domain.AjaxResult;
  6. /**
  7. * <p>
  8. * ${table.comment!} 服务类
  9. * </p>
  10. *
  11. * @author ${author}
  12. * @since ${date}
  13. */
  14. <#if kotlin>
  15. interface ${table.serviceName} : ${superServiceClass}<${entity}>
  16. <#else>
  17. public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {
  18. /**
  19. * 查询${table.comment!}分页数据
  20. *
  21. * @param page 页码
  22. * @param ${entity?uncap_first} 每页条数
  23. * @return AjaxResult
  24. */
  25. AjaxResult findListByPage(Page<${entity}> page,${entity} ${entity?uncap_first});
  26. /**
  27. * 添加${table.comment!}
  28. *
  29. * @param ${entity?uncap_first} ${table.comment!}
  30. * @return JsonBean
  31. */
  32. AjaxResult add(${entity} ${entity?uncap_first});
  33. /**
  34. * 删除${table.comment!}
  35. *
  36. * @param id 主键
  37. * @return AjaxResult
  38. */
  39. AjaxResult delete(Long id);
  40. /**
  41. * 修改${table.comment!}
  42. *
  43. * @param ${entity?uncap_first} ${table.comment!}
  44. * @return AjaxResult
  45. */
  46. AjaxResult updateData(${entity} ${entity?uncap_first});
  47. /**
  48. * id查询数据
  49. *
  50. * @param id id
  51. * @return AjaxResult
  52. */
  53. AjaxResult findById(Long id);
  54. }
  55. </#if>