厂商信息
This commit is contained in:
parent
664cc4e3bf
commit
da6669362a
@ -49,6 +49,18 @@ public class DeviceManufacturersController extends BaseController
|
|||||||
List<DeviceManufacturers> list = deviceManufacturersService.selectDeviceManufacturersList(deviceManufacturers);
|
List<DeviceManufacturers> list = deviceManufacturersService.selectDeviceManufacturersList(deviceManufacturers);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查询设备厂家信息列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('renke:manufacturers:list')")
|
||||||
|
@GetMapping("/type")
|
||||||
|
@ApiOperation("查询设备厂家信息列表")
|
||||||
|
public TableDataInfo listType(String type)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<DeviceManufacturers> list = deviceManufacturersService.selectDeviceManufacturersListType(type);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出设备厂家信息列表
|
* 导出设备厂家信息列表
|
||||||
|
@ -13,7 +13,7 @@ import com.fastbee.common.core.domain.BaseEntity;
|
|||||||
* 设备厂家信息对象 iot_device_manufacturers
|
* 设备厂家信息对象 iot_device_manufacturers
|
||||||
*
|
*
|
||||||
* @author kerwincui
|
* @author kerwincui
|
||||||
* @date 2024-12-06
|
* @date 2024-12-21
|
||||||
*/
|
*/
|
||||||
@ApiModel(value = "DeviceManufacturers",description = "设备厂家信息 iot_device_manufacturers")
|
@ApiModel(value = "DeviceManufacturers",description = "设备厂家信息 iot_device_manufacturers")
|
||||||
@Data
|
@Data
|
||||||
@ -78,4 +78,9 @@ public class DeviceManufacturers extends BaseEntity
|
|||||||
@ApiModelProperty("厂家类型")
|
@ApiModelProperty("厂家类型")
|
||||||
private String manufacturerType;
|
private String manufacturerType;
|
||||||
|
|
||||||
|
/** 厂家代码 */
|
||||||
|
@Excel(name = "厂家代码")
|
||||||
|
@ApiModelProperty("厂家代码")
|
||||||
|
private Long code;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
package com.fastbee.deviceData.mapper;
|
package com.fastbee.deviceData.mapper;
|
||||||
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.fastbee.deviceData.domain.DeviceManufacturers;
|
import com.fastbee.deviceData.domain.DeviceManufacturers;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备厂家信息Mapper接口
|
* 设备厂家信息Mapper接口
|
||||||
*
|
*
|
||||||
* @author kerwincui
|
* @author kerwincui
|
||||||
* @date 2024-11-13
|
* @date 2024-12-21
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface DeviceManufacturersMapper
|
public interface DeviceManufacturersMapper
|
||||||
@ -28,6 +30,14 @@ public interface DeviceManufacturersMapper
|
|||||||
* @return 设备厂家信息集合
|
* @return 设备厂家信息集合
|
||||||
*/
|
*/
|
||||||
public List<DeviceManufacturers> selectDeviceManufacturersList(DeviceManufacturers deviceManufacturers);
|
public List<DeviceManufacturers> selectDeviceManufacturersList(DeviceManufacturers deviceManufacturers);
|
||||||
|
/**
|
||||||
|
* 根据type查询设备厂家信息列表
|
||||||
|
*
|
||||||
|
* @param manufacturerType type值
|
||||||
|
* @return 设备厂家信息
|
||||||
|
*/
|
||||||
|
@Select("SELECT * FROM iot_device_manufacturers WHERE manufacturer_type = #{manufacturerType}")
|
||||||
|
public List<DeviceManufacturers> selectDeviceManufacturersListType(String manufacturerType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增设备厂家信息
|
* 新增设备厂家信息
|
||||||
|
@ -6,15 +6,15 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备厂家信息Service接口
|
* 设备厂家信息Service接口
|
||||||
*
|
*
|
||||||
* @author kerwincui
|
* @author kerwincui
|
||||||
* @date 2024-11-13
|
* @date 2024-12-21
|
||||||
*/
|
*/
|
||||||
public interface IDeviceManufacturersService
|
public interface IDeviceManufacturersService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询设备厂家信息
|
* 查询设备厂家信息
|
||||||
*
|
*
|
||||||
* @param id 设备厂家信息主键
|
* @param id 设备厂家信息主键
|
||||||
* @return 设备厂家信息
|
* @return 设备厂家信息
|
||||||
*/
|
*/
|
||||||
@ -22,15 +22,21 @@ public interface IDeviceManufacturersService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询设备厂家信息列表
|
* 查询设备厂家信息列表
|
||||||
*
|
*
|
||||||
* @param deviceManufacturers 设备厂家信息
|
* @param deviceManufacturers 设备厂家信息
|
||||||
* @return 设备厂家信息集合
|
* @return 设备厂家信息集合
|
||||||
*/
|
*/
|
||||||
public List<DeviceManufacturers> selectDeviceManufacturersList(DeviceManufacturers deviceManufacturers);
|
public List<DeviceManufacturers> selectDeviceManufacturersList(DeviceManufacturers deviceManufacturers);
|
||||||
|
/**
|
||||||
|
* 根据type查询设备厂家信息列表
|
||||||
|
*
|
||||||
|
* @param manufacturerType type值
|
||||||
|
* @return 设备厂家信息
|
||||||
|
*/
|
||||||
|
public List<DeviceManufacturers> selectDeviceManufacturersListType(String manufacturerType);
|
||||||
/**
|
/**
|
||||||
* 新增设备厂家信息
|
* 新增设备厂家信息
|
||||||
*
|
*
|
||||||
* @param deviceManufacturers 设备厂家信息
|
* @param deviceManufacturers 设备厂家信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -38,7 +44,7 @@ public interface IDeviceManufacturersService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改设备厂家信息
|
* 修改设备厂家信息
|
||||||
*
|
*
|
||||||
* @param deviceManufacturers 设备厂家信息
|
* @param deviceManufacturers 设备厂家信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -46,7 +52,7 @@ public interface IDeviceManufacturersService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除设备厂家信息
|
* 批量删除设备厂家信息
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的设备厂家信息主键集合
|
* @param ids 需要删除的设备厂家信息主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -54,9 +60,10 @@ public interface IDeviceManufacturersService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除设备厂家信息信息
|
* 删除设备厂家信息信息
|
||||||
*
|
*
|
||||||
* @param id 设备厂家信息主键
|
* @param id 设备厂家信息主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteDeviceManufacturersById(Long id);
|
public int deleteDeviceManufacturersById(Long id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.fastbee.deviceData.service.impl;
|
package com.fastbee.deviceData.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fastbee.common.exception.ServiceException;
|
||||||
import com.fastbee.common.utils.DateUtils;
|
import com.fastbee.common.utils.DateUtils;
|
||||||
import com.fastbee.deviceData.domain.DeviceManufacturers;
|
import com.fastbee.deviceData.domain.DeviceManufacturers;
|
||||||
import com.fastbee.deviceData.mapper.DeviceManufacturersMapper;
|
import com.fastbee.deviceData.mapper.DeviceManufacturersMapper;
|
||||||
@ -8,11 +10,12 @@ import com.fastbee.deviceData.service.IDeviceManufacturersService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备厂家信息Service业务层处理
|
* 设备厂家信息Service业务层处理
|
||||||
*
|
*
|
||||||
* @author kerwincui
|
* @author kerwincui
|
||||||
* @date 2024-11-13
|
* @date 2024-12-21
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class DeviceManufacturersServiceImpl implements IDeviceManufacturersService
|
public class DeviceManufacturersServiceImpl implements IDeviceManufacturersService
|
||||||
@ -22,7 +25,7 @@ public class DeviceManufacturersServiceImpl implements IDeviceManufacturersServi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询设备厂家信息
|
* 查询设备厂家信息
|
||||||
*
|
*
|
||||||
* @param id 设备厂家信息主键
|
* @param id 设备厂家信息主键
|
||||||
* @return 设备厂家信息
|
* @return 设备厂家信息
|
||||||
*/
|
*/
|
||||||
@ -34,7 +37,7 @@ public class DeviceManufacturersServiceImpl implements IDeviceManufacturersServi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询设备厂家信息列表
|
* 查询设备厂家信息列表
|
||||||
*
|
*
|
||||||
* @param deviceManufacturers 设备厂家信息
|
* @param deviceManufacturers 设备厂家信息
|
||||||
* @return 设备厂家信息
|
* @return 设备厂家信息
|
||||||
*/
|
*/
|
||||||
@ -44,9 +47,24 @@ public class DeviceManufacturersServiceImpl implements IDeviceManufacturersServi
|
|||||||
return deviceManufacturersMapper.selectDeviceManufacturersList(deviceManufacturers);
|
return deviceManufacturersMapper.selectDeviceManufacturersList(deviceManufacturers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据type查询设备厂家信息列表
|
||||||
|
*
|
||||||
|
* @param manufacturerType type值
|
||||||
|
* @return 设备厂家信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<DeviceManufacturers> selectDeviceManufacturersListType(String manufacturerType)
|
||||||
|
{
|
||||||
|
if (manufacturerType==null||manufacturerType.isEmpty()){
|
||||||
|
throw new ServiceException("类型数据不能为空");
|
||||||
|
}
|
||||||
|
return deviceManufacturersMapper.selectDeviceManufacturersListType(manufacturerType);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增设备厂家信息
|
* 新增设备厂家信息
|
||||||
*
|
*
|
||||||
* @param deviceManufacturers 设备厂家信息
|
* @param deviceManufacturers 设备厂家信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -59,7 +77,7 @@ public class DeviceManufacturersServiceImpl implements IDeviceManufacturersServi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改设备厂家信息
|
* 修改设备厂家信息
|
||||||
*
|
*
|
||||||
* @param deviceManufacturers 设备厂家信息
|
* @param deviceManufacturers 设备厂家信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -72,7 +90,7 @@ public class DeviceManufacturersServiceImpl implements IDeviceManufacturersServi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除设备厂家信息
|
* 批量删除设备厂家信息
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的设备厂家信息主键
|
* @param ids 需要删除的设备厂家信息主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -84,7 +102,7 @@ public class DeviceManufacturersServiceImpl implements IDeviceManufacturersServi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除设备厂家信息信息
|
* 删除设备厂家信息信息
|
||||||
*
|
*
|
||||||
* @param id 设备厂家信息主键
|
* @param id 设备厂家信息主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -93,4 +111,6 @@ public class DeviceManufacturersServiceImpl implements IDeviceManufacturersServi
|
|||||||
{
|
{
|
||||||
return deviceManufacturersMapper.deleteDeviceManufacturersById(id);
|
return deviceManufacturersMapper.deleteDeviceManufacturersById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.fastbee.deviceData.mapper.DeviceManufacturersMapper">
|
<mapper namespace="com.fastbee.deviceData.mapper.DeviceManufacturersMapper">
|
||||||
|
|
||||||
<resultMap type="DeviceManufacturers" id="DeviceManufacturersResult">
|
<resultMap type="DeviceManufacturers" id="DeviceManufacturersResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="endpoint" column="endpoint" />
|
<result property="endpoint" column="endpoint" />
|
||||||
@ -20,10 +21,11 @@
|
|||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="manufacturerType" column="manufacturer_type" />
|
<result property="manufacturerType" column="manufacturer_type" />
|
||||||
|
<result property="code" column="code" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDeviceManufacturersVo">
|
<sql id="selectDeviceManufacturersVo">
|
||||||
select id, endpoint, manufacturer_name, account, password, interface_documentation, api_key, authId, secret_key, tokenEndpoint, del_flag, create_time, create_by, update_time, update_by, manufacturer_type from iot_device_manufacturers
|
select id, endpoint, manufacturer_name, account, password, interface_documentation, api_key, authId, secret_key, tokenEndpoint, del_flag, create_time, create_by, update_time, update_by, manufacturer_type, code from iot_device_manufacturers
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDeviceManufacturersList" parameterType="DeviceManufacturers" resultMap="DeviceManufacturersResult">
|
<select id="selectDeviceManufacturersList" parameterType="DeviceManufacturers" resultMap="DeviceManufacturersResult">
|
||||||
@ -39,6 +41,7 @@
|
|||||||
<if test="secretKey != null and secretKey != ''"> and secret_key = #{secretKey}</if>
|
<if test="secretKey != null and secretKey != ''"> and secret_key = #{secretKey}</if>
|
||||||
<if test="tokenendpoint != null and tokenendpoint != ''"> and tokenEndpoint = #{tokenendpoint}</if>
|
<if test="tokenendpoint != null and tokenendpoint != ''"> and tokenEndpoint = #{tokenendpoint}</if>
|
||||||
<if test="manufacturerType != null and manufacturerType != ''"> and manufacturer_type = #{manufacturerType}</if>
|
<if test="manufacturerType != null and manufacturerType != ''"> and manufacturer_type = #{manufacturerType}</if>
|
||||||
|
<if test="code != null "> and code = #{code}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -65,6 +68,7 @@
|
|||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="manufacturerType != null">manufacturer_type,</if>
|
<if test="manufacturerType != null">manufacturer_type,</if>
|
||||||
|
<if test="code != null">code,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="endpoint != null">#{endpoint},</if>
|
<if test="endpoint != null">#{endpoint},</if>
|
||||||
@ -82,6 +86,7 @@
|
|||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="manufacturerType != null">#{manufacturerType},</if>
|
<if test="manufacturerType != null">#{manufacturerType},</if>
|
||||||
|
<if test="code != null">#{code},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -103,6 +108,7 @@
|
|||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="manufacturerType != null">manufacturer_type = #{manufacturerType},</if>
|
<if test="manufacturerType != null">manufacturer_type = #{manufacturerType},</if>
|
||||||
|
<if test="code != null">code = #{code},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user