You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

992 B

  • 所有业务实体必须继承 BaseEntity,主键使用雪花算法生成的 Long id,审计字段由 MetaObjectFillHandler 自动填充,禁止业务代码手动赋值。
  • 所有 Service 接口继承 IBaseService<T>,实现类继承 BaseServiceImpl<M,T>,并通过 saveDTO/updateDTO/getByIdOrThrow 等默认方法统一 CRUD 流程。
  • 所有 Controller 返回值统一包装为 Result<T>,HTTP 状态码除框架级错误外一律返回 200,业务成败通过 code/success 字段区分。
  • 所有业务 Mapper 继承 CrmBaseMapper<T> 而非直接继承 BaseMapper,以复用 CrmSqlInjector 注入的 batchUpsert 扩展方法。
  • 数据权限通过 DataVisibilityContext 的 ThreadLocal 传递,请求入口 load、出口 clear,异步场景需显式重新装入,上下文不跨线程传播。
  • 分页参数通过 PageConverter.toMpPage(BaseParam) 转换,orderBy 字段经正则白名单校验防止 SQL 注入,size 上限受 CommonConstants 约束。