Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
e3e65ef562
|
|
@ -25,6 +25,8 @@ public interface DevInfoMapper
|
||||||
*/
|
*/
|
||||||
public DevInfoVo selectDevInfoByMaId(Long maId);
|
public DevInfoVo selectDevInfoByMaId(Long maId);
|
||||||
|
|
||||||
|
public int getHotSearchCountByMaId(Long maId);
|
||||||
|
public int insertHotSearch(Long maId);
|
||||||
public int updateHotSearchByMaId(Long maId);
|
public int updateHotSearchByMaId(Long maId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ public class DevInfoServiceImpl implements IDevInfoService
|
||||||
{
|
{
|
||||||
DevInfoVo devInfoVo = devInfoMapper.selectDevInfoByMaId(maId);
|
DevInfoVo devInfoVo = devInfoMapper.selectDevInfoByMaId(maId);
|
||||||
//更新搜索量
|
//更新搜索量
|
||||||
devInfoMapper.updateHotSearchByMaId(maId);
|
updateHotSearch(maId);
|
||||||
try {
|
try {
|
||||||
List<SysFile> files = devInfoMapper.getFilesByMaId(maId);
|
List<SysFile> files = devInfoMapper.getFilesByMaId(maId);
|
||||||
if (!CollectionUtils.isEmpty(files) && files.get(0) != null) {
|
if (!CollectionUtils.isEmpty(files) && files.get(0) != null) {
|
||||||
|
|
@ -103,6 +103,15 @@ public class DevInfoServiceImpl implements IDevInfoService
|
||||||
return devInfoVo;
|
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