java的PO类,supdateTime字段评审有问题 #599
Unanswered
nonothingless
asked this question in
Q&A
Replies: 1 comment 2 replies
|
感谢反馈! 从您提供的源代码来看:
三者之间的命名完全一致,符合 MyBatis Generator 的标准驼峰命名转换规则( 我们推测这是模型幻觉引发的误报——模型可能误将 感谢您提供这一 case,对我们改进评审准确性很有帮助。另外,方便的话能否告知您本次评审使用的是哪个模型?这有助于我们进一步定位和优化。 |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
对于文件评审意见有误,字段声明是supdateTime,建议修改为supdateTime
─── src/InspectionResultPO.java:17-17 ───
[maintainability · high] 字段命名不一致/拼写错误:字段声明为
supdateTime,而 getter/setter 方法名为getSupdateTime()/setSupdateTime(),且方法内部引用的字段名也存在拼写矛盾。多处命名互相矛盾,极易造成混淆和调用错误。建议统一命名,例如将字段名改为supdateTime,与数据库列supdate_time保持一致。实际源代码
import java.io.Serializable;
import java.util.Date;
public class SmempInspectionResultPO implements Serializable {
/**
* 主键ID
* id
* id
*/
private Integer id;
}
All reactions