|
|
@@ -5,6 +5,7 @@ import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.middle.platform.common.exception.BusinessException;
|
|
|
import com.middle.platform.common.utils.PageRes;
|
|
|
+import com.middle.platform.data.api.feign.DynamicTopicApi;
|
|
|
import com.middle.platform.manage.biz.domain.req.IotProductPara;
|
|
|
import com.middle.platform.manage.biz.domain.req.ProductPage;
|
|
|
import com.middle.platform.manage.biz.domain.vo.IotDeviceDetailVo;
|
|
|
@@ -16,7 +17,6 @@ import com.middle.platform.manage.biz.mapper.IotProductMapper;
|
|
|
import com.middle.platform.system.api.enums.DictType;
|
|
|
import com.middle.platform.system.api.feign.DictApi;
|
|
|
import com.middle.platform.system.api.feign.UserApi;
|
|
|
-import jakarta.annotation.Resource;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -38,10 +38,8 @@ public class IotProductService {
|
|
|
private final IotModService iotModService;
|
|
|
private final IotCloudService iotCloudService;
|
|
|
|
|
|
- @Resource
|
|
|
- private UserApi userApi;
|
|
|
- @Resource
|
|
|
- private DictApi dictApi;
|
|
|
+ private final UserApi userApi;
|
|
|
+ private final DictApi dictApi;
|
|
|
|
|
|
/**
|
|
|
* 分页查询产品数据
|
|
|
@@ -73,6 +71,7 @@ public class IotProductService {
|
|
|
* @param iotProductPara
|
|
|
* @return
|
|
|
*/
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public Object save(IotProductPara iotProductPara) {
|
|
|
IotProduct iotProduct = new IotProduct();
|
|
|
iotProduct.setCode(IdUtil.nanoId(12));
|