当前位置: 首页 > wzjs >正文

盐城企业做网站多少钱网络培训机构

盐城企业做网站多少钱,网络培训机构,公司网站建设专家,网络品牌推广案例以下是基于表名dste_project_indicator(项目指标表)的完整命名示例,覆盖各类增删改查场景: 1. 表名与实体类映射 // 表名:dste_project_indicator // 实体类:DsteProjectIndicatorEntity public class Ds…

以下是基于表名dste_project_indicator(项目指标表)的完整命名示例,覆盖各类增删改查场景:

1. 表名与实体类映射

// 表名:dste_project_indicator
// 实体类:DsteProjectIndicatorEntity
public class DsteProjectIndicatorEntity {private Long id;private Long projectId;private String indicatorCode;private String indicatorName;// 其他字段...
}

2. 基础增删改查方法

// 新增
int insert(DsteProjectIndicatorEntity entity);
int save(DsteProjectIndicatorEntity entity);// 修改
int update(DsteProjectIndicatorEntity entity);
int modify(DsteProjectIndicatorEntity entity);// 逻辑删除
int logicDeleteById(Long id);
int markAsDeletedById(Long id);// 物理删除
int deleteById(Long id);
int removeById(Long id);// 查询单条
DsteProjectIndicatorEntity selectById(Long id);
DsteProjectIndicatorEntity getById(Long id);// 查询多条
List<DsteProjectIndicatorEntity> selectList(QueryParam param);
List<DsteProjectIndicatorEntity> listByCondition(QueryParam param);

3. 批量操作方法

// 批量新增
int batchInsert(List<DsteProjectIndicatorEntity> entityList);
int insertBatch(List<DsteProjectIndicatorEntity> entityList);// 批量修改
int batchUpdate(List<DsteProjectIndicatorEntity> entityList);
int updateBatch(List<DsteProjectIndicatorEntity> entityList);// 批量逻辑删除
int batchLogicDeleteByIds(List<Long> ids);
int batchMarkAsDeleted(List<Long> ids);// 批量物理删除
int batchDeleteByIds(List<Long> ids);
int batchRemoveByIds(List<Long> ids);

4. 条件操作方法

// 条件新增(根据另一个实体创建)
int insertByEntity(DsteProjectIndicatorEntity template);
int saveFromTemplate(DsteProjectIndicatorEntity template);// 条件修改(根据条件更新部分字段)
int updateByCondition(UpdateParam updateParam, QueryParam queryParam);
int modifyFieldsByCondition(Map<String, Object> fields, QueryParam condition);// 条件逻辑删除
int logicDeleteByCondition(QueryParam param);
int disableByCondition(QueryParam param);// 条件物理删除
int deleteByCondition(QueryParam param);
int removeByCondition(QueryParam param);

5. 分页与统计方法

// 分页查询
Page<DsteProjectIndicatorEntity> selectPage(PageParam pageParam, QueryParam queryParam);
IPage<DsteProjectIndicatorEntity> pageByCondition(PageParam page, QueryParam condition);// 统计查询
Long countByCondition(QueryParam param);
Integer countActiveIndicators();

6. 复杂业务方法

// 按项目ID查询指标列表
List<DsteProjectIndicatorEntity> selectByProjectId(Long projectId);
List<DsteProjectIndicatorEntity> listIndicatorsByProject(Long projectId);// 按指标编码查询(唯一键)
DsteProjectIndicatorEntity selectByCode(String indicatorCode);
DsteProjectIndicatorEntity getByUniqueCode(String code);// 逻辑删除并关联删除子指标
int logicDeleteWithChildren(Long id);
int disableIndicatorCascade(Long id);// 批量新增并返回主键
List<Long> batchInsertAndReturnIds(List<DsteProjectIndicatorEntity> entityList);

命名原则总结

  1. 动词选择

    • 新增insert/save/create
    • 修改update/modify/edit
    • 删除delete/remove(物理)、logicDelete/disable/markAsDeleted(逻辑)
    • 查询select/get/list/page
  2. 参数与返回值

    • 单数形式(如 insert)处理单个实体
    • 复数形式(如 batchInsert)处理集合
    • ByXXX 后缀表示按条件操作
  3. 业务场景

    • 包含业务对象名称(如 ProjectIndicator
    • 特殊场景使用特定动词(如 archive/invalidate/restore
  4. 代码风格一致性

    • 保持项目内方法命名统一(如统一用 insertsave
    • 使用 Entity/Param/VO 明确参数类型

示例实现(MyBatis Mapper)

public interface DsteProjectIndicatorMapper {// 单条新增@Insert("INSERT INTO dste_project_indicator (...) VALUES (...)")int insert(DsteProjectIndicatorEntity entity);// 批量新增@Insert("<script>INSERT INTO dste_project_indicator (...) VALUES " +"<foreach collection='list' item='item' separator=','>(...)</foreach></script>")int batchInsert(@Param("list") List<DsteProjectIndicatorEntity> entityList);// 条件逻辑删除@Update("UPDATE dste_project_indicator SET delete_at = NOW() WHERE project_id = #{projectId}")int logicDeleteByProjectId(@Param("projectId") Long projectId);// 分页查询List<DsteProjectIndicatorEntity> selectPage(@Param("page") PageParam pageParam, @Param("condition") QueryParam condition);
}

根据实际业务需求(如数据库类型、ORM框架、事务要求等),选择最合适的命名方式和实现策略。

http://www.dtcms.com/wzjs/269604.html

相关文章:

  • 在阿里云做网站教程网络平台推广广告费用
  • 做网站开发的公司销售网站百度收录查询
  • 英文网站设计哪里好最近国际时事热点事件
  • 旅游网站建设标书网站主页
  • 简历制作网站哪个好龙岩seo
  • 做网站的电脑自带软件是什么bt磁力猪
  • 直播网站建设书籍推广软文200字
  • 营销型网站的设计步骤百度扫一扫识别图片
  • php网站如何上传数据库留号码的广告网站不需要验证码
  • 天津网站建设政府seo外包服务
  • 网站维护运营主要是做什么的杭州网站优化
  • 网站开发公司人员配置郑州官网网站优化公司
  • 舆情网站入口网址大全名字营销型网站制作建设
  • 福州正规网站建设公司推荐搜索指数分析
  • 男人和女人做性网站上海网站优化公司
  • 打电话沟通做网站话术seo点击软件排名优化
  • 怎么做教育类型的网站淘宝店铺推广方法
  • 免费建立个人app网站免费推广的渠道有哪些
  • 手机软件制作和做网站相同百度seo点击软件
  • 做网站显示上次登录时间代码关键词排名零芯互联关键词
  • 网站抽奖模块怎么做百度提交网站收录入口
  • 设计精美的网站怎么出售友情链接
  • 做网店装修的网站有哪些内容数据分析网站
  • 代码运行框wordpress6seo排名优化培训
  • 无锡鑫融建设网站b站免费版入口
  • 手工做女宝宝衣服的网站玉林网站seo
  • 青岛市建设监督管理局网站综合搜索引擎
  • 360网站seo如何做免费友情链接网页
  • 公司做网站需要给百度交钱吗58百度搜索引擎
  • 本地网站建设公司永久免费用的在线客服系统