按用户洞察 (jxcj 端到端跑通后沉淀): - 4 个 Java 模板更新 (entity/mapper/service-impl/controller) - SKILL.md 加 § 端到端实战教训段 (6 个关键点) - v3.0 § 11.3 backend-dev 行加 'jxcj 2026-06-29 端到端验证 200' 6 个关键点 (jxcj 实战踩坑): 1. Entity 必 extends jnpf SuperBaseEntity (主键 f_id 映射, 9 系统列继承) 2. Mapper 放 jnpf.mapper (jnpf 自带 @MapperScan 扫到) 3. @DS 在 Entity/Service/Controller 三处都加 (jnpf 拦截器分别走三个代理) 4. dacli app clear 后需 dacli app create 重建 (清空 app 关联) 5. 物理表需 dacli dm create 在新 app 关联库建 (dbLinkId 改变) 6. mvn package 不重打时需 rm jar 强制重打 (mtime 检查跳过) 模板更新: - entity.java: extends SuperBaseEntity + 9 系统列继承, 去掉重复 id 字段 - controller.java: @DS + 反射设 id (避免 setId 编译错) - service.java: status Integer → String - service-impl.java: 已有 @DS + SuperServiceImpl, 加 v0.12+ 实战注释
39 lines
846 B
Java
39 lines
846 B
Java
package ssw.{app_code}.service;
|
|
|
|
import ssw.{app_code}.entity.XxxEntity;
|
|
import jnpf.base.service.SuperService;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* {业务描述} Service 接口
|
|
*
|
|
* SuperService<T> 继承自 MyBatis-Plus IService,提供了:
|
|
* - save / saveBatch
|
|
* - updateById / update
|
|
* - removeById / remove
|
|
* - getById / listOne
|
|
* - list / page
|
|
* - count
|
|
*/
|
|
public interface XxxService extends SuperService<XxxEntity> {
|
|
|
|
/** 列表查询(带筛选)*/
|
|
List<XxxEntity> getList(String keyword, String status);
|
|
|
|
/** 详情 */
|
|
XxxEntity getInfo(String id);
|
|
|
|
/** 新增 */
|
|
void create(XxxEntity entity);
|
|
|
|
/** 更新 */
|
|
boolean update(XxxEntity entity);
|
|
|
|
/** 删除 */
|
|
boolean delete(String id);
|
|
|
|
/** 统计(如需)*/
|
|
Map<String, Object> getStats();
|
|
}
|