Mapper.java.vm 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package ${package}.mapper;
  2. import ${package}.domain.${className};
  3. import java.util.List;
  4. /**
  5. * ${tableComment} 数据层
  6. *
  7. * @author ${author}
  8. * @date ${datetime}
  9. */
  10. public interface ${className}Mapper
  11. {
  12. /**
  13. * 查询${tableComment}信息
  14. *
  15. * @param ${primaryKey.attrname} ${tableComment}ID
  16. * @return ${tableComment}信息
  17. */
  18. public ${className} select${className}ById(${primaryKey.attrType} ${primaryKey.attrname});
  19. /**
  20. * 查询${tableComment}列表
  21. *
  22. * @param ${classname} ${tableComment}信息
  23. * @return ${tableComment}集合
  24. */
  25. public List<${className}> select${className}List(${className} ${classname});
  26. /**
  27. * 新增${tableComment}
  28. *
  29. * @param ${classname} ${tableComment}信息
  30. * @return 结果
  31. */
  32. public int insert${className}(${className} ${classname});
  33. /**
  34. * 修改${tableComment}
  35. *
  36. * @param ${classname} ${tableComment}信息
  37. * @return 结果
  38. */
  39. public int update${className}(${className} ${classname});
  40. /**
  41. * 删除${tableComment}
  42. *
  43. * @param ${primaryKey.attrname} ${tableComment}ID
  44. * @return 结果
  45. */
  46. public int delete${className}ById(${primaryKey.attrType} ${primaryKey.attrname});
  47. /**
  48. * 批量删除${tableComment}
  49. *
  50. * @param ${primaryKey.attrname}s 需要删除的数据ID
  51. * @return 结果
  52. */
  53. public int delete${className}ByIds(String[] ${primaryKey.attrname}s);
  54. }