Commit fc3ba90b by 吴迪

【新增】缩短码查询修改

parent 1879d591
......@@ -114,9 +114,21 @@ public class ShortCodeController {
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("缩短码查询:缩短码查询");
if(shortCodeVo.getShortCode().length()<7) {
return R.error("条码位数太少!请输入正确的8位商品条码!");
}
if(shortCodeVo.getShortCode().length()==8) {
shortCodeVo.setShortCode(shortCodeVo.getShortCode().substring(0,7));
}
}
if(StringUtils.isNotBlank(shortCodeVo.getFirmName())) {
searchgtinlogEntity.setKeyword(shortCodeVo.getFirmName());
......@@ -127,6 +139,8 @@ public class ShortCodeController {
searchgtinlogEntity.setKeyword(shortCodeVo.getRegisterAddress());
searchgtinlogEntity.setClassStr("缩短码查询:厂商地址查询");
}
searchgtinlogEntity.setSearchsource(0);
//新增查询日志
searchgtinlogService.save(searchgtinlogEntity);
......
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