空字符串的sql处理

充值流水id填充
This commit is contained in:
2025-02-18 10:26:17 +08:00
parent 28b5a7d2d4
commit b0dc49e770
7 changed files with 49 additions and 13 deletions

View File

@@ -0,0 +1,18 @@
package com.czg.utils;
import cn.hutool.core.util.StrUtil;
/**
* @author ww
* @description
*/
public class CzgStrUtils {
/**
* 如果str为空返回null否则返回str
* flex sql查询时 自动忽略null 不忽略''
*/
public static String getStrOrNull(String str) {
return StrUtil.isNotBlank(str) ? str : null;
}
}