网站添加 备案网络营销网站设计

张小明 2026/1/13 21:52:04
网站添加 备案,网络营销网站设计,汽车销售管理系统,二手车网站模板阿里巴巴 Select 查询命名规范大全 1. 基础命名模式 核心公式#xff1a;动词 名词 限定条件 返回类型部分阿里巴巴常用词示例动词select, find, get, queryselect#xff08;最正式#xff09;名词表名或实体名User, Order, Product限定ByXxx, ByXxxAndYyy, ForXxxById,…阿里巴巴 Select 查询命名规范大全1. 基础命名模式核心公式动词 名词 限定条件 返回类型部分阿里巴巴常用词示例动词select,find,get,queryselect最正式名词表名或实体名User,Order,Product限定ByXxx,ByXxxAndYyy,ForXxxById,ByNameAndStatus返回可省略或加List,Page,CountList,Page,One,Count2. 各种场景的具体命名场景1单条记录查询// 根据ID查询UserDOselectById(Param(id)Longid);UserDOfindById(Param(id)Longid);UserDOgetById(Param(id)Longid);// 根据唯一键查询UserDOselectByUsername(Param(username)Stringusername);UserDOselectByEmail(Param(email)Stringemail);UserDOselectByMobile(Param(mobile)Stringmobile);// 查询单个字段值StringselectNameById(Param(id)Longid);IntegerselectStatusById(Param(id)Longid);场景2列表查询// 查询所有ListUserDOselectAll();ListUserDOfindAll();ListUserDOlistAll();// 条件查询列表ListUserDOselectByStatus(Param(status)Integerstatus);ListUserDOselectByDeptId(Param(deptId)LongdeptId);ListUserDOselectByNameLike(Param(name)Stringname);// 多条件查询ListUserDOselectByStatusAndDeptId(Param(status)Integerstatus,Param(deptId)LongdeptId);ListUserDOselectByCreateTimeBetween(Param(startTime)DatestartTime,Param(endTime)DateendTime);场景3分页查询// 分页查询所有PageUserDOselectPage(PageUserDOpage);// 条件分页查询PageUserDOselectPageByStatus(PageUserDOpage,Param(status)Integerstatus);PageUserDOselectPageByCondition(PageUserDOpage,Param(condition)UserQueryConditioncondition);场景4统计查询// 计数LongselectCount();Integercount();LongcountAll();// 条件计数LongselectCountByStatus(Param(status)Integerstatus);LongcountByDeptId(Param(deptId)LongdeptId);// 存在性检查BooleanexistsByUsername(Param(username)Stringusername);BooleanexistsByEmail(Param(email)Stringemail);场景5Map格式查询// 单条MapMapString,ObjectselectAsMapById(Param(id)Longid);MapString,ObjectselectUserMap(Param(id)Longid);// 列表MapListMapString,ObjectselectListAsMaps();ListMapString,ObjectselectMapsByStatus(Param(status)Integerstatus);ListMapString,ObjectselectAllAsMaps();// 指定字段MapListMapString,ObjectselectIdAndNameAsMaps();ListMapString,ObjectselectSimpleInfoAsMaps();3. 你的业务场景专用命名飞行数据相关查询// 基础查询ListFlightDataDOselectByFlightRecordId(Param(flightRecordId)LongflightRecordId);ListFlightDataDOselectByRecordIdAndType(Param(recordId)LongrecordId,Param(dataType)StringdataType);// Map格式ListMapString,ObjectselectFlightDataAsMaps(Param(flightRecordId)LongflightRecordId);ListMapString,ObjectselectHeightDataAsMaps(Param(flightRecordId)LongflightRecordId);ListMapString,ObjectselectSpeedDataAsMaps(Param(flightRecordId)LongflightRecordId);// 统计LongcountByFlightRecordId(Param(flightRecordId)LongflightRecordId);MapString,ObjectselectStatsByFlightRecordId(Param(flightRecordId)LongflightRecordId);告警规则相关查询// 规则查询ListAlarmRuleDOselectByConfigId(Param(configId)LongconfigId);ListAlarmRuleDOselectEnabledByConfigId(Param(configId)LongconfigId);ListAlarmRuleDOselectByConfigIdAndType(Param(configId)LongconfigId,Param(ruleType)StringruleType);// Map格式ListMapString,ObjectselectRulesAsMaps(Param(configId)LongconfigId);MapString,ListMapString,ObjectselectRulesGroupByType(Param(configId)LongconfigId);告警分析业务查询// 分析相关ListMapString,ObjectselectForAlarmAnalysis(Param(configId)LongconfigId,Param(flightRecordId)LongflightRecordId);ListMapString,ObjectselectAnalysisResult(Param(analysisId)StringanalysisId);PageMapString,ObjectselectAnalysisHistory(Page?page,Param(query)AnalysisQueryquery);4. 阿里巴巴内部特殊命名复杂查询命名// 联表查询ListUserWithDeptDOselectUserWithDeptByUserId(Param(userId)LonguserId);ListMapString,ObjectselectUserJoinDept(Param(deptId)LongdeptId);// 嵌套查询ListUserDOselectWithSubQuery(Param(minOrderCount)IntegerminOrderCount);// 聚合查询MapString,ObjectselectUserStats(Param(deptId)LongdeptId);ListMapString,ObjectselectGroupByDept();// 窗口函数ListMapString,ObjectselectWithRank(Param(deptId)LongdeptId);批量查询命名// IN查询ListUserDOselectByIds(Param(ids)ListLongids);ListUserDOselectByUsernames(Param(usernames)ListStringusernames);// 批量Map查询ListMapString,ObjectselectMapsByIds(Param(ids)ListLongids);MapLong,UserDOselectMapByIds(Param(ids)ListLongids);// 返回Map结构5. 阿里巴巴的命名约定俗成前缀约定// select 系列最规范UserDOselectById(Longid);ListUserDOselectListByStatus(Integerstatus);// find 系列查询语义UserDOfindById(Longid);ListUserDOfindAll();// get 系列获取语义UserDOgetById(Longid);ListUserDOgetAll();// query 系列复杂查询PageUserDOqueryPage(UserQueryquery);ListUserDOqueryByCondition(UserConditioncondition);后缀约定// List - 返回列表ListUserDOselectListByDeptId(LongdeptId);// Page - 返回分页PageUserDOselectPageByStatus(Page?page,Integerstatus);// Count - 返回数量LongselectCountByStatus(Integerstatus);// One - 返回单个UserDOselectOneByUsername(Stringusername);// Map - 返回Map格式MapString,ObjectselectMapById(Longid);ListMapString,ObjectselectMapListByStatus(Integerstatus);6. 实战中的最佳实践原则1保持一致性// ✅ 好统一风格UserDOselectById(Longid);ListUserDOselectByStatus(Integerstatus);PageUserDOselectPage(PageUserDOpage);// ❌ 不好风格混乱UserDOgetById(Longid);ListUserDOfindListByStatus(Integerstatus);PageUserDOqueryPage(PageUserDOpage);原则2方法名自解释// ✅ 好清晰明了ListUserDOselectByDeptIdAndStatus(LongdeptId,Integerstatus);UserDOselectByUsernameAndPassword(Stringusername,Stringpassword);// ❌ 不好模糊不清ListUserDOselectUsers(LongdeptId,Integerstatus);// 参数意义不明UserDOselectUser(Stringparam1,Stringparam2);// 参数名无意义原则3避免过长// ✅ 好适中长度ListUserDOselectByDeptId(LongdeptId);UserDOselectByUsername(Stringusername);// ❌ 不好过长ListUserDOselectAllUserRecordsByDepartmentIdentifier(LongdeptId);// 太长了7. 你的业务完整示例MapperpublicinterfaceFlightDataMapperextendsBaseMapperFlightDataDO{// 基础查询 FlightDataDOselectById(Longid);ListFlightDataDOselectByFlightRecordId(LongflightRecordId);ListFlightDataDOselectByRecordIdAndType(LongrecordId,StringdataType);// Map格式查询 MapString,ObjectselectMapById(Longid);ListMapString,ObjectselectMapsByFlightRecordId(LongflightRecordId);ListMapString,ObjectselectSimpleMapsByRecordId(LongrecordId);// 统计查询 LongcountByFlightRecordId(LongflightRecordId);IntegercountByRecordIdAndType(LongrecordId,StringdataType);MapString,ObjectselectStatsByFlightRecordId(LongflightRecordId);// 存在性检查 BooleanexistsBySeqIdAndRecordId(IntegerseqId,LongflightRecordId);// 分页查询 PageFlightDataDOselectPageByRecordId(PageFlightDataDOpage,LongflightRecordId);PageMapString,ObjectselectMapPageByRecordId(Page?page,LongflightRecordId);// 批量查询 ListFlightDataDOselectBySeqIds(Param(recordId)LongrecordId,Param(seqIds)ListIntegerseqIds);MapInteger,FlightDataDOselectMapBySeqIds(Param(recordId)LongrecordId,Param(seqIds)ListIntegerseqIds);// 业务专用查询 ListMapString,ObjectselectForAlarmAnalysis(LongflightRecordId);ListMapString,ObjectselectHeightDataForAnalysis(LongflightRecordId);ListMapString,ObjectselectSpeedDataForAnalysis(LongflightRecordId);// 扩展查询 ListMapString,ObjectselectWithFlightRecord(LongflightRecordId);ListMapString,ObjectselectDetailByRecordId(LongflightRecordId);}8. 阿里巴巴的黄金法则记住这几点用select开头- 最规范名词用实体名-User,Order,Product条件用ByXxx-ById,ByStatus返回类型可暗示-List,Page,CountMap格式加AsMaps或Map- 可选快速决策树要查什么 ├── 单条记录 → selectById / selectByXxx ├── 多条记录 → selectListByXxx / selectByXxx (返回List) ├── 分页 → selectPageByXxx ├── 统计 → selectCountByXxx / countByXxx ├── 存在 → existsByXxx ├── Map格式 → selectAsMapsByXxx / selectMapByXxx └── 复杂业务 → selectFor[业务场景]ByXxx对于你的selectFlightDataListByRecordId✅ 是阿里巴巴标准命名如果要加关联表建议selectFlightDataWithFlightRecordByRecordId
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

无锡捷搜网站建设仿百度 wordpress

如何用Linly-Talker制作科普类数字人短视频? 在抖音、B站上刷到一位“虚拟科学家”正在用生动比喻讲解黑洞,口型精准、语气自然,背景是缓缓旋转的星云——你可能会以为这是某个影视团队耗时数周制作的特效视频。但事实上,这段内容…

张小明 2026/1/10 23:43:45 网站建设

网站被镜像怎么办网站维护的工作内容

MacBook Touch Bar定制终极指南:用Pock打造专属控制中心 【免费下载链接】pock Widgets manager for MacBook Touch Bar 项目地址: https://gitcode.com/gh_mirrors/po/pock 还在为Touch Bar功能单一而烦恼吗?Pock这款免费开源的小部件管理器将彻…

张小明 2026/1/10 23:43:43 网站建设

网站用户体验度东台哪家专业做网站

ZLUDA技术解析:在AMD显卡上实现CUDA应用无缝运行 【免费下载链接】ZLUDA CUDA on AMD GPUs 项目地址: https://gitcode.com/gh_mirrors/zlu/ZLUDA ZLUDA是一个革命性的开源项目,它打破了传统GPU计算的壁垒,让用户能够在AMD GPU上直接运…

张小明 2026/1/10 23:43:41 网站建设

做网站app的工资高吗rpg制作大师

在品牌征战线上市场的过程中,天猫无疑是最为核心和复杂的战场之一。其庞大的生态、精细的规则与激烈的竞争,催生了一个高度专业化的服务行业。当品牌方,尤其是初入局或不具备成熟电商团队的品牌,在寻求外部运营支持时,…

张小明 2026/1/10 22:00:26 网站建设

东莞机电学校网站建设与管理哪些网站用echarts做的

第一章:为什么顶尖开发者都在用Open-AutoGLM顶尖开发者持续追求开发效率与模型集成能力的极致平衡,而 Open-AutoGLM 正是这一需求下的理想解决方案。它不仅提供了一套高度自动化的自然语言处理流水线,还支持灵活的插件架构,使开发…

张小明 2026/1/11 1:03:17 网站建设

做网站费手机网站案例 鸿

Onekey神器揭秘:一键获取Steam游戏清单的终极解决方案 【免费下载链接】Onekey Onekey Steam Depot Manifest Downloader 项目地址: https://gitcode.com/gh_mirrors/one/Onekey 还在为复杂的Steam游戏清单获取流程而头疼吗?Onekey这款基于Python…

张小明 2026/1/11 1:03:15 网站建设