空字符串的sql处理
充值流水id填充
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user