GitHub user VampireAchao added a comment to the discussion: StreamPark 
code-style-and-quality Improve

命名规范比较混乱,变量名使用名词优先,方法名使用动词开头优先

db 层(非service层)的基础CRUD有 getBy ... selectBy queryBy 等,现统一规范按照
com.baomidou.mybatisplus.core.mapper.BaseMapper 进行命名:
查询记录 使用select开头 ,如selectById、selectByXxx、selectPageByXxx
进行数据库UPDATE语句操作 使用update开头
进行数据库INSERT语句操作 使用insert开头
进行数据库DELETE语句操作 使用delete开头

service层的基础CRUD按照com.baomidou.mybatisplus.extension.service.IService 进行命名:
查询多条记录 使用list开头 ,如listByIds、listByXxx
查询单条记录 使用get开头,如getByName、getOne
进行数据库UPDATE语句操作 使用update开头
进行数据库INSERT语句操作 使用save开头
进行数据库DELETE语句操作 使用remove开头

GitHub link: 
https://github.com/apache/incubator-streampark/discussions/2915#discussioncomment-6623974

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to