From cd5d181b0ad60ab144deb5ea38e36c35161c69aa Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Mon, 6 Nov 2023 19:58:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E9=87=8D=E5=BB=BA?= =?UTF-8?q?=E5=B7=A6=E5=8F=B3=E7=BC=96=E7=A0=81=E6=8E=A5=E5=8F=A3=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8A=A8=E6=80=81=E8=AE=BE=E7=BD=AE=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1018910025940992]重建左右编码接口增加动态设置排序字段 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1018910025940992 --- .../module/tenant/api/util/LRCodeRebuildApi.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/neatlogic/module/tenant/api/util/LRCodeRebuildApi.java b/src/main/java/neatlogic/module/tenant/api/util/LRCodeRebuildApi.java index 68b22859..5b447a48 100644 --- a/src/main/java/neatlogic/module/tenant/api/util/LRCodeRebuildApi.java +++ b/src/main/java/neatlogic/module/tenant/api/util/LRCodeRebuildApi.java @@ -33,7 +33,7 @@ import org.springframework.transaction.annotation.Transactional; @Service @Transactional @AuthAction(action = ADMIN.class) -@OperationType(type = OperationTypeEnum.OPERATE) +@OperationType(type = OperationTypeEnum.UPDATE) public class LRCodeRebuildApi extends PrivateApiComponentBase { @@ -52,16 +52,22 @@ public class LRCodeRebuildApi extends PrivateApiComponentBase { return null; } - @Input({@Param(name = "tableName", type = ApiParamType.STRING, isRequired = true, desc = "表名"), + @Input({ + @Param(name = "tableName", type = ApiParamType.STRING, isRequired = true, desc = "表名"), @Param(name = "idKey", type = ApiParamType.STRING, isRequired = true, desc = "id字段名"), - @Param(name = "parentIdKey", type = ApiParamType.STRING, isRequired = true, desc = "父id字段名")}) + @Param(name = "parentIdKey", type = ApiParamType.STRING, isRequired = true, desc = "父id字段名"), + @Param(name = "sortKey", type = ApiParamType.STRING, desc = "排序字段名"), + @Param(name = "condition", type = ApiParamType.STRING, desc = "条件") + }) @Description(desc = "重建左右编码接口") @Override public Object myDoService(JSONObject jsonObj) throws Exception { String tableName = jsonObj.getString("tableName"); String idKey = jsonObj.getString("idKey"); String parentIdKey = jsonObj.getString("parentIdKey"); - LRCodeManager.rebuildLeftRightCode(tableName, idKey, parentIdKey); + String sortKey = jsonObj.getString("sortKey"); + String condition = jsonObj.getString("condition"); + LRCodeManager.rebuildLeftRightCodeOrderBySortKey(tableName, idKey, parentIdKey, condition, sortKey); return null; } -- Gitee