Commit d9666f9e authored by chenhao's avatar chenhao

修改bug2698

parent cd064445
......@@ -155,7 +155,7 @@ public class DateUtils {
* @throws ParseException
*/
public static String dateFormat(Date date, String pattern) throws ParseException {
if (StringUtils.isNotEmpty(pattern)) {
if (StringUtils.isEmpty(pattern)) {
pattern = DateUtils.DATE_PATTERN;
}
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
......@@ -203,7 +203,7 @@ public class DateUtils {
* @throws ParseException
*/
public static Date dateParse(String dateTimeString, String pattern) throws ParseException {
if (StringUtils.isNotEmpty(pattern)) {
if (StringUtils.isEmpty(pattern)) {
pattern = DateUtils.DATE_PATTERN;
}
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
......
......@@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
......@@ -163,7 +164,7 @@ public class FirefightersThoughtController extends BaseController {
}
}else if (type.equals(Date.class)) {
Date fileValue = (Date) field.get(firefightersThought);
firefightersThoughtQueryWrapper.eq(name, fileValue);
firefightersThoughtQueryWrapper.likeRight(name,DateUtils.dateFormat(fileValue,null));
} else {
if(!name.equals(NameUtils.camel2Underline("serialVersionUID"))) {
String fileValue = (String) field.get(firefightersThought);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment