删除所有 as any.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.orion.ops.module.asset.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.orion.ops.framework.mybatis.core.mapper.IMapper;
|
||||
import com.orion.ops.module.asset.entity.domain.HostIdentityDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -21,6 +23,11 @@ public interface HostIdentityDAO extends IMapper<HostIdentityDO> {
|
||||
* @param keyId keyId
|
||||
* @return effect
|
||||
*/
|
||||
int setKeyWithNull(@Param("keyId") Long keyId);
|
||||
default int setKeyWithNull(@Param("keyId") Long keyId) {
|
||||
LambdaUpdateWrapper<HostIdentityDO> updateWrapper = Wrappers.<HostIdentityDO>lambdaUpdate()
|
||||
.set(HostIdentityDO::getKeyId, null)
|
||||
.eq(HostIdentityDO::getKeyId, keyId);
|
||||
return this.update(null, updateWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,10 +21,4 @@
|
||||
id, name, username, password, key_id, create_time, update_time, creator, updater, deleted
|
||||
</sql>
|
||||
|
||||
<update id="setKeyWithNull">
|
||||
UPDATE host_identity
|
||||
SET key_id = NULL
|
||||
WHERE key_id = #{keyId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user