Commit e5a1f880 by 吴迪

【新增】修改文件

parent 8be94c8c
......@@ -2,6 +2,7 @@ package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -14,6 +15,7 @@ import io.office.modules.manage.service.ShortCodeService;
import io.office.modules.manage.utils.SearchLimitUtil;
import io.office.modules.manage.vo.request.ShortCodeVo;
import io.office.modules.sys.service.SysCaptchaService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -116,12 +118,9 @@ public class ShortCodeController {
SearchgtinlogEntity searchgtinlogEntity = new SearchgtinlogEntity();
searchgtinlogEntity.setCreatedate(new Date());
searchgtinlogEntity.setIp(IPUtils.getIpAddr(request));
if(StringUtils.isBlank(shortCodeVo.getShortCode())&&StringUtils.isBlank(shortCodeVo.getFirmName())&&StringUtils.isBlank(shortCodeVo.getRegisterAddress())) {
return R.error("请输入查询条件!");
}
if(StringUtils.isNotBlank(shortCodeVo.getShortCode())) {
searchgtinlogEntity.setKeyword(shortCodeVo.getShortCode());
searchgtinlogEntity.setClassStr("缩短码查询:缩短码查询");
......@@ -131,19 +130,15 @@ public class ShortCodeController {
if(shortCodeVo.getShortCode().length()==8) {
shortCodeVo.setShortCode(shortCodeVo.getShortCode().substring(0,7));
}
}
if(StringUtils.isNotBlank(shortCodeVo.getFirmName())) {
searchgtinlogEntity.setKeyword(shortCodeVo.getFirmName());
searchgtinlogEntity.setClassStr("缩短码查询:厂商名称查询");
}
if(StringUtils.isNotBlank(shortCodeVo.getRegisterAddress())) {
searchgtinlogEntity.setKeyword(shortCodeVo.getRegisterAddress());
searchgtinlogEntity.setClassStr("缩短码查询:厂商地址查询");
}
searchgtinlogEntity.setSearchsource(0);
//新增查询日志
searchgtinlogService.save(searchgtinlogEntity);
......@@ -152,7 +147,11 @@ public class ShortCodeController {
if(StringUtils.isNotBlank(searchLimitStr)) {
return R.error(searchLimitStr);
}
return R.ok().put("data",shortCodeService.getList(shortCodeVo));
List<ShortCodeVo> list = shortCodeService.getList(shortCodeVo);
if(CollectionUtils.isEmpty(list)) {
return R.error("没有符合条件的记录!");
}
return R.ok().put("data",list);
}
......
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