This commit is contained in:
sxu 2023-12-05 13:22:36 +08:00
parent 4873995fc8
commit 813348c42b
5 changed files with 41 additions and 2 deletions

View File

@ -21,5 +21,6 @@ public class DevInfoVo extends DevInfo {
private String companyName;
/* 联系商家,被授权人手机号 */
private String authPhone;
private String[] pictures;
private String keyWord;
}

View File

@ -21,6 +21,14 @@ public interface DevInfoMapper
*/
public DevInfoVo selectDevInfoByMaId(Long maId);
/**
* 查询设备图片集
*
* @param maId 设备信息主键
* @return 设备图片集
*/
public String getPicturesByMaId(Long maId);
/**
* 查询设备信息列表
*

View File

@ -22,6 +22,14 @@ public interface IDevInfoService
*/
public DevInfoVo selectDevInfoByMaId(Long maId);
/**
* 查询设备图片集
*
* @param maId 设备信息主键
* @return 设备图片集
*/
public String getPicturesByMaId(Long maId);
/**
* 查询设备信息列表
*

View File

@ -38,10 +38,24 @@ public class DevInfoServiceImpl implements IDevInfoService
@Override
public DevInfoVo selectDevInfoByMaId(Long maId)
{
return devInfoMapper.selectDevInfoByMaId(maId);
DevInfoVo devInfoVo = devInfoMapper.selectDevInfoByMaId(maId);
String pictures = devInfoMapper.getPicturesByMaId(maId);
String[] pictureArray = pictures.split(",");
devInfoVo.setPictures(pictureArray);
return devInfoVo;
}
/**
* 查询设备图片集
*
* @param maId 设备信息主键
* @return 设备图片集
*/
@Override
public String getPicturesByMaId(Long maId)
{
return devInfoMapper.getPicturesByMaId(maId);
}
/**
* 查询设备信息列表

View File

@ -93,6 +93,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
) ty on d.type_id=ty.type_id
where d.ma_id = #{maId}
</select>
<select id="getPicturesByMaId" parameterType="Long" resultType="String">
SELECT GROUP_CONCAT(sys.file_url)
from ma_dev_info d
left join sys_file_info sys on d.ma_id = sys.model_id
WHERE d.ma_id = #{maId}
GROUP BY d.ma_id
</select>
<insert id="insertDevInfo" parameterType="com.bonus.zlpt.common.core.domain.equip.DevInfo">
insert into ma_dev_info