File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
java/org/dinky/service/impl
dinky-gateway/src/main/java/org/dinky/gateway/kubernetes Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 4545
4646import com .baomidou .mybatisplus .core .conditions .query .LambdaQueryWrapper ;
4747import com .baomidou .mybatisplus .core .conditions .query .QueryWrapper ;
48+ import com .baomidou .mybatisplus .core .conditions .update .LambdaUpdateWrapper ;
4849import com .baomidou .mybatisplus .extension .conditions .query .LambdaQueryChainWrapper ;
4950import com .fasterxml .jackson .databind .JsonNode ;
5051
@@ -175,8 +176,10 @@ public Result<Void> removeTenantById(Integer tenantId) {
175176 if (CollectionUtil .isNotEmpty (userTenants )) {
176177 return Result .failed (Status .TENANT_BINDING_USER );
177178 }
178- Integer deleteByIdResult = baseMapper .deleteById (tenantId );
179- if (deleteByIdResult > 0 ) {
179+ LambdaUpdateWrapper <Tenant > updateWrapper = new LambdaUpdateWrapper <>();
180+ updateWrapper .eq (Tenant ::getId , tenantId );
181+ updateWrapper .set (Tenant ::getIsDelete , true );
182+ if (update (updateWrapper )) {
180183 return Result .succeed (Status .DELETE_SUCCESS );
181184 } else {
182185 return Result .failed (Status .DELETE_FAILED );
Original file line number Diff line number Diff line change 6868import org .springframework .util .CollectionUtils ;
6969
7070import com .baomidou .mybatisplus .core .conditions .query .LambdaQueryWrapper ;
71+ import com .baomidou .mybatisplus .core .conditions .update .LambdaUpdateWrapper ;
7172
7273import cn .dev33 .satoken .secure .SaSecureUtil ;
7374import cn .dev33 .satoken .stp .StpUtil ;
@@ -162,7 +163,10 @@ public Boolean removeUser(Integer id) {
162163 if (user .getSuperAdminFlag ()) {
163164 throw new BusException (Status .USER_SUPERADMIN_CANNOT_DELETE );
164165 }
165- return baseMapper .deleteById (id ) > 0 ;
166+ LambdaUpdateWrapper <User > updateWrapper = new LambdaUpdateWrapper <>();
167+ updateWrapper .eq (User ::getId , id );
168+ updateWrapper .set (User ::getIsDelete , true );
169+ return update (updateWrapper );
166170 }
167171
168172 /**
Original file line number Diff line number Diff line change 4949
5050<!-- recoveryUser -->
5151 <update id =" recoveryUser" parameterType =" java.lang.Integer" >
52- update dinky_user set is_delete = 0 where id = #{id}
52+ update dinky_user set is_delete = false where id = #{id}
5353 </update >
5454
5555</mapper >
Original file line number Diff line number Diff line change @@ -118,7 +118,6 @@ protected void initConfig() {
118118 final String oldContainerImageKey = "kubernetes.container.image" ;
119119 if (k8sConfiguration .containsKey (oldContainerImageKey )) {
120120 String containerImageValue = k8sConfiguration .get (oldContainerImageKey );
121- k8sConfiguration .remove (oldContainerImageKey );
122121 k8sConfiguration .put (KubernetesConfigOptions .CONTAINER_IMAGE .key (), containerImageValue );
123122 }
124123 // -------------------Note: the sequence can not be changed, priority problem----------------
You can’t perform that action at this time.
0 commit comments