fix
This commit is contained in:
parent
ce8e5aac7d
commit
8853d69234
|
|
@ -25,6 +25,8 @@ public interface DevInfoMapper
|
|||
*/
|
||||
public DevInfoVo selectDevInfoByMaId(Long maId);
|
||||
|
||||
public int getHotSearchCountByMaId(Long maId);
|
||||
public int insertHotSearch(Long maId);
|
||||
public int updateHotSearchByMaId(Long maId);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class DevInfoServiceImpl implements IDevInfoService
|
|||
{
|
||||
DevInfoVo devInfoVo = devInfoMapper.selectDevInfoByMaId(maId);
|
||||
//更新搜索量
|
||||
devInfoMapper.updateHotSearchByMaId(maId);
|
||||
updateHotSearch(maId);
|
||||
try {
|
||||
List<SysFile> files = devInfoMapper.getFilesByMaId(maId);
|
||||
if (!CollectionUtils.isEmpty(files) && files.get(0) != null) {
|
||||
|
|
@ -103,6 +103,15 @@ public class DevInfoServiceImpl implements IDevInfoService
|
|||
return devInfoVo;
|
||||
}
|
||||
|
||||
private void updateHotSearch(Long maId) {
|
||||
int count = devInfoMapper.getHotSearchCountByMaId(maId);
|
||||
if (count == 0) {
|
||||
devInfoMapper.insertHotSearch(maId);
|
||||
} else {
|
||||
devInfoMapper.updateHotSearchByMaId(maId);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备信息列表
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue