mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
@@ -65,7 +65,7 @@ spring:
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password: wumei-smart
|
||||
# password: wumei-smart
|
||||
# password: 123456
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
|
||||
@@ -54,7 +54,7 @@ public class CategoryController extends BaseController
|
||||
{
|
||||
list = categoryService.selectCategoryList(category);
|
||||
}else {
|
||||
list = categoryService.selectCategoryList1(category);
|
||||
list = categoryService.selectCategoryListAccurate(category);
|
||||
}
|
||||
|
||||
return getDataTable(list);
|
||||
@@ -73,7 +73,7 @@ public class CategoryController extends BaseController
|
||||
{
|
||||
list = categoryService.selectCategoryShortList();
|
||||
}else {
|
||||
list = categoryService.selectCategoryShortList1(category);
|
||||
list = categoryService.selectCategoryShortListAccurate(category);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@@ -48,11 +48,9 @@ public class DeviceController extends BaseController
|
||||
if(device.getUserName()==null || device.getUserName()=="" )
|
||||
{
|
||||
list = deviceService.selectDeviceList(device);
|
||||
System.out.print("进入模糊查询");
|
||||
}else {
|
||||
// 精确查询
|
||||
System.out.print("进入精准查询"+device.getUserName());
|
||||
list = deviceService.selectDeviceList1(device);
|
||||
list = deviceService.selectDeviceListAccurate(device);
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
@@ -72,7 +70,7 @@ public class DeviceController extends BaseController
|
||||
list = deviceService.selectDeviceShortList(device);
|
||||
}else {
|
||||
// 精确查询
|
||||
list = deviceService.selectDeviceShortList1(device);
|
||||
list = deviceService.selectDeviceShortListAccurate(device);
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
@@ -85,7 +83,13 @@ public class DeviceController extends BaseController
|
||||
@ApiOperation("查询所有设备简短列表")
|
||||
public TableDataInfo allShortList(Device device)
|
||||
{
|
||||
List<DeviceAllShortOutput> list = deviceService.selectAllDeviceShortList1(device.getUserName());
|
||||
List<DeviceAllShortOutput> list = new ArrayList<>();
|
||||
if(device.getUserName()==null || device.getUserName() == "")
|
||||
{
|
||||
list = deviceService.selectAllDeviceShortList();
|
||||
}else {
|
||||
list = deviceService.selectAllDeviceShortListAccurate(device.getUserName());
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public class GroupController extends BaseController
|
||||
|
||||
}else {
|
||||
// 精准查询
|
||||
list = groupService.selectGroupList1(group);
|
||||
list = groupService.selectGroupListAccurate(group);
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ProductController extends BaseController
|
||||
{
|
||||
list = productService.selectProductList(product);
|
||||
}else {
|
||||
list = productService.selectProductList1(product);
|
||||
list = productService.selectProductListAccurate(product);
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ThingsModelTemplateController extends BaseController
|
||||
list = thingsModelTemplateService.selectThingsModelTemplateList(thingsModelTemplate);
|
||||
}else{
|
||||
// 精准查询
|
||||
list = thingsModelTemplateService.selectThingsModelTemplateList1(thingsModelTemplate);
|
||||
list = thingsModelTemplateService.selectThingsModelTemplateListAccurate(thingsModelTemplate);
|
||||
}
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public interface CategoryMapper
|
||||
*/
|
||||
public int productCountInCategorys(Long[] categoryIds);
|
||||
// 精准查询
|
||||
List<Category> selectCategoryList1(Category category);
|
||||
List<Category> selectCategoryListAccurate(Category category);
|
||||
|
||||
List<IdAndName> selectCategoryShortList1(Category category);
|
||||
List<IdAndName> selectCategoryShortListAccurate(Category category);
|
||||
}
|
||||
|
||||
@@ -162,9 +162,9 @@ public interface DeviceMapper
|
||||
*/
|
||||
public int deleteDeviceGroupByDeviceIds(Long[] deviceIds);
|
||||
// 查询所有简短设备列表
|
||||
List<DeviceAllShortOutput> selectAllDeviceShortList1(String userName);
|
||||
List<DeviceAllShortOutput> selectAllDeviceShortListAccurate(String userName);
|
||||
//精准查询
|
||||
List<Device> selectDeviceList1(Device device);
|
||||
List<Device> selectDeviceListAccurate(Device device);
|
||||
|
||||
List<DeviceShortOutput> selectDeviceShortList1(Device device);
|
||||
List<DeviceShortOutput> selectDeviceShortListAccurate(Device device);
|
||||
}
|
||||
|
||||
@@ -85,5 +85,5 @@ public interface GroupMapper
|
||||
public int deleteDeviceGroupByGroupIds(Long[] groupIds);
|
||||
|
||||
// 精准查询所有
|
||||
List<Group> selectGroupList1(Group group);
|
||||
List<Group> selectGroupListAccurate(Group group);
|
||||
}
|
||||
|
||||
@@ -117,5 +117,5 @@ public interface ProductMapper
|
||||
*/
|
||||
public int thingsCountInProduct(Long productId);
|
||||
// 精准查询
|
||||
List<Product> selectProductList1(Product product);
|
||||
List<Product> selectProductListAccurate(Product product);
|
||||
}
|
||||
|
||||
@@ -69,5 +69,5 @@ public interface ThingsModelTemplateMapper
|
||||
*/
|
||||
public int deleteThingsModelTemplateByTemplateIds(Long[] templateIds);
|
||||
// 精准查询
|
||||
List<ThingsModelTemplate> selectThingsModelTemplateList1(ThingsModelTemplate thingsModelTemplate);
|
||||
List<ThingsModelTemplate> selectThingsModelTemplateListAccurate(ThingsModelTemplate thingsModelTemplate);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public interface ICategoryService
|
||||
public int deleteCategoryByCategoryId(Long categoryId);
|
||||
|
||||
// 精准查询
|
||||
List<Category> selectCategoryList1(Category category);
|
||||
List<Category> selectCategoryListAccurate(Category category);
|
||||
|
||||
List<IdAndName> selectCategoryShortList1(Category category);
|
||||
List<IdAndName> selectCategoryShortListAccurate(Category category);
|
||||
}
|
||||
|
||||
@@ -153,11 +153,11 @@ public interface IDeviceService
|
||||
public String generationDeviceNum();
|
||||
|
||||
// 获取所有简短设备列表
|
||||
List<DeviceAllShortOutput> selectAllDeviceShortList1(String userName);
|
||||
List<DeviceAllShortOutput> selectAllDeviceShortListAccurate(String userName);
|
||||
|
||||
// 精准查询
|
||||
List<Device> selectDeviceList1(Device device);
|
||||
List<Device> selectDeviceListAccurate(Device device);
|
||||
|
||||
// 精准查询所有条件设备的简短信息
|
||||
List<DeviceShortOutput> selectDeviceShortList1(Device device);
|
||||
List<DeviceShortOutput> selectDeviceShortListAccurate(Device device);
|
||||
}
|
||||
|
||||
@@ -75,5 +75,5 @@ public interface IGroupService
|
||||
public int deleteGroupByGroupId(Long groupId);
|
||||
|
||||
// 精准查询
|
||||
List<Group> selectGroupList1(Group group);
|
||||
List<Group> selectGroupListAccurate(Group group);
|
||||
}
|
||||
|
||||
@@ -79,5 +79,5 @@ public interface IProductService
|
||||
public int deleteProductByProductId(Long productId);
|
||||
|
||||
// 精准查询
|
||||
List<Product> selectProductList1(Product product);
|
||||
List<Product> selectProductListAccurate(Product product);
|
||||
}
|
||||
|
||||
@@ -60,5 +60,5 @@ public interface IThingsModelTemplateService
|
||||
public int deleteThingsModelTemplateByTemplateId(Long templateId);
|
||||
|
||||
// 精准查询
|
||||
List<ThingsModelTemplate> selectThingsModelTemplateList1(ThingsModelTemplate thingsModelTemplate);
|
||||
List<ThingsModelTemplate> selectThingsModelTemplateListAccurate(ThingsModelTemplate thingsModelTemplate);
|
||||
}
|
||||
|
||||
@@ -98,8 +98,8 @@ public class CategoryServiceImpl implements ICategoryService
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IdAndName> selectCategoryShortList1(Category category) {
|
||||
return categoryMapper.selectCategoryShortList1(category);
|
||||
public List<IdAndName> selectCategoryShortListAccurate(Category category) {
|
||||
return categoryMapper.selectCategoryShortListAccurate(category);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,7 +134,7 @@ public class CategoryServiceImpl implements ICategoryService
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Category> selectCategoryList1(Category category) {
|
||||
return categoryMapper.selectCategoryList1(category);
|
||||
public List<Category> selectCategoryListAccurate(Category category) {
|
||||
return categoryMapper.selectCategoryListAccurate(category);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,8 +252,8 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||
|
||||
// 精准查询所有条件的设备
|
||||
@Override
|
||||
public List<DeviceShortOutput> selectDeviceShortList1(Device device) {
|
||||
return deviceMapper.selectDeviceShortList1(device);
|
||||
public List<DeviceShortOutput> selectDeviceShortListAccurate(Device device) {
|
||||
return deviceMapper.selectDeviceShortListAccurate(device);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -541,13 +541,13 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceAllShortOutput> selectAllDeviceShortList1(String userName) {
|
||||
return deviceMapper.selectAllDeviceShortList1(userName);
|
||||
public List<DeviceAllShortOutput> selectAllDeviceShortListAccurate(String userName) {
|
||||
return deviceMapper.selectAllDeviceShortListAccurate(userName);
|
||||
}
|
||||
// 精准查询
|
||||
@Override
|
||||
public List<Device> selectDeviceList1(Device device) {
|
||||
return deviceMapper.selectDeviceList1(device);
|
||||
public List<Device> selectDeviceListAccurate(Device device) {
|
||||
return deviceMapper.selectDeviceListAccurate(device);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ public class GroupServiceImpl implements IGroupService
|
||||
|
||||
// 精准查询所有
|
||||
@Override
|
||||
public List<Group> selectGroupList1(Group group) {
|
||||
return groupMapper.selectGroupList1(group);
|
||||
public List<Group> selectGroupListAccurate(Group group) {
|
||||
return groupMapper.selectGroupListAccurate(group);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ public class ProductServiceImpl implements IProductService
|
||||
}
|
||||
// 精准查询
|
||||
@Override
|
||||
public List<Product> selectProductList1(Product product) {
|
||||
return productMapper.selectProductList1(product);
|
||||
public List<Product> selectProductListAccurate(Product product) {
|
||||
return productMapper.selectProductListAccurate(product);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public class ThingsModelTemplateServiceImpl implements IThingsModelTemplateServi
|
||||
}
|
||||
// 精准查询
|
||||
@Override
|
||||
public List<ThingsModelTemplate> selectThingsModelTemplateList1(ThingsModelTemplate thingsModelTemplate) {
|
||||
return thingsModelTemplateMapper.selectThingsModelTemplateList1(thingsModelTemplate);
|
||||
public List<ThingsModelTemplate> selectThingsModelTemplateListAccurate(ThingsModelTemplate thingsModelTemplate) {
|
||||
return thingsModelTemplateMapper.selectThingsModelTemplateListAccurate(thingsModelTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by order_num
|
||||
</select>
|
||||
<select id="selectCategoryList1" parameterType="com.ruoyi.iot.domain.Category" resultMap="CategoryResult">
|
||||
<select id="selectCategoryListAccurate" parameterType="com.ruoyi.iot.domain.Category" resultMap="CategoryResult">
|
||||
<include refid="selectCategoryVo"/>
|
||||
<where>
|
||||
<if test="categoryName != null and categoryName != ''"> and category_name = #{categoryName}</if>
|
||||
@@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from iot_category
|
||||
order by order_num
|
||||
</select>
|
||||
<select id="selectCategoryShortList1" resultMap="CategoryShortResult">
|
||||
<select id="selectCategoryShortListAccurate" resultMap="CategoryShortResult">
|
||||
select category_id, category_name
|
||||
from iot_category
|
||||
<where>
|
||||
|
||||
@@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select device_id, device_name,product_id, serial_number, status,is_shadow ,is_custom_location,things_model_value, active_time from iot_device
|
||||
</sql>
|
||||
|
||||
<select id="selectAllDeviceShortList1" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceAllShortResult">
|
||||
<select id="selectAllDeviceShortListAccurate" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceAllShortResult">
|
||||
select device_id, device_name, product_name, user_name, serial_number, firmware_version, status,rssi,is_shadow ,
|
||||
is_custom_location, active_time,network_address,longitude,latitude from iot_device
|
||||
<where>
|
||||
@@ -129,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="selectDeviceList1" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceResult">
|
||||
<select id="selectDeviceListAccurate" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceResult">
|
||||
<include refid="selectDeviceVo"/>
|
||||
<where>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name = #{deviceName}</if>
|
||||
@@ -176,7 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="selectDeviceShortList1" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceShortResult">
|
||||
<select id="selectDeviceShortListAccurate" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceShortResult">
|
||||
<include refid="selectDeviceShortVo"/>
|
||||
<where>
|
||||
<if test="deviceName != null and deviceName != ''"> and device_name = #{deviceName}</if>
|
||||
|
||||
@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by group_order
|
||||
</select>
|
||||
<select id="selectGroupList1" parameterType="com.ruoyi.iot.domain.Group" resultMap="GroupResult">
|
||||
<select id="selectGroupListAccurate" parameterType="com.ruoyi.iot.domain.Group" resultMap="GroupResult">
|
||||
<include refid="selectGroupVo"/>
|
||||
<where>
|
||||
<if test="groupName != null and groupName != ''"> and group_name = #{groupName}</if>
|
||||
|
||||
@@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="selectProductList1" parameterType="com.ruoyi.iot.domain.Product" resultMap="ProductResult">
|
||||
<select id="selectProductListAccurate" parameterType="com.ruoyi.iot.domain.Product" resultMap="ProductResult">
|
||||
<include refid="selectProductVo"/>
|
||||
<where>
|
||||
<if test="productName != null and productName != ''"> and product_name=#{productName}</if>
|
||||
|
||||
@@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="selectThingsModelTemplateList1" parameterType="com.ruoyi.iot.domain.ThingsModelTemplate" resultMap="ThingsModelTemplateResult">
|
||||
<select id="selectThingsModelTemplateListAccurate" parameterType="com.ruoyi.iot.domain.ThingsModelTemplate" resultMap="ThingsModelTemplateResult">
|
||||
<include refid="selectThingsModelTemplateVo"/>
|
||||
<where>
|
||||
<if test="templateName != null and templateName != ''"> and template_name = #{templateName}</if>
|
||||
|
||||
Reference in New Issue
Block a user