Sfoglia il codice sorgente

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	svr/svr-iot/src/main/java/com/yihu/iot/controller/platform/IotInterfaceController.java
mengkang 5 anni fa
parent
commit
a33cb08e4b

+ 18 - 0
svr/svr-iot/src/main/java/com/yihu/iot/controller/platform/IotInterfaceController.java

@ -266,6 +266,24 @@ public class IotInterfaceController extends EnvelopRestEndpoint {
    }
    @GetMapping(value = IotRequestMapping.Platform.delAppInterface)
    @ApiOperation(value = "删除应用接口", notes = "删除应用接口")
    public MixEnvelop<IotCompanyAppInterfaceDO, IotCompanyAppInterfaceDO> delAppInterface(@ApiParam(name = "id", value = "id", defaultValue = "")
                                                                                         @RequestParam(value = "id", required = true)String id) {
        try {
            return iotCompanyAppInterfaceService.delAppInterface(id);
        } catch (Exception e) {
            e.printStackTrace();
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Platform.findAppInterface)
    @ApiOperation(value = "查看应用接口", notes = "查看应用接口")
    public MixEnvelop<IotAppInterfacesVO, IotAppInterfacesVO> findAppInterface(@ApiParam(name = "appId", value = "应用id", defaultValue = "")

+ 1 - 0
svr/svr-iot/src/main/java/com/yihu/iot/dao/platform/IotCompanyAppInterfaceDao.java

@ -17,5 +17,6 @@ public interface IotCompanyAppInterfaceDao extends PagingAndSortingRepository<Io
    @Query("from IotCompanyAppInterfaceDO w where w.appId=?1 and w.del=0")
    List<IotCompanyAppInterfaceDO> findByAppId(String appId);
}

+ 0 - 1
svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotDeviceQualityInspectionPlanService.java

@ -56,7 +56,6 @@ public class IotDeviceQualityInspectionPlanService extends BaseJpaService<IotDev
        IotOrderPurchaseDO purchaseDO = iotOrderPurchaseDao.findByOrderNo(iotDeviceQualityInspectionPlan.getOrderNo());
        iotDeviceQualityInspectionPlan.setPurchaseId(purchaseDO.getId());
        iotDeviceQualityInspectionPlan.setDeviceId(purchaseDO.getProductId());
        iotDeviceQualityInspectionPlan.setOrderNo(purchaseDO.getOrderNo());
        iotDeviceQualityInspectionPlan.setDeviceId(purchaseDO.getProductId());

+ 18 - 0
svr/svr-iot/src/main/java/com/yihu/iot/service/platform/IotCompanyAppInterfaceService.java

@ -7,6 +7,8 @@ import com.yihu.iot.dao.platform.IotShareInterfaceDao;
import com.yihu.jw.entity.iot.platform.IotCompanyAppInterfaceDO;
import com.yihu.jw.entity.iot.platform.IotShareInterfaceDO;
import com.yihu.jw.restmodel.iot.platform.IotAppInterfacesVO;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.IotRequestMapping;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -75,4 +77,20 @@ public class IotCompanyAppInterfaceService extends BaseJpaService<IotCompanyAppI
        return list;
    }
    /**
     * 删除应用接口
     * @param id
     */
    public MixEnvelop<IotCompanyAppInterfaceDO, IotCompanyAppInterfaceDO> delAppInterface(String id) {
        IotCompanyAppInterfaceDO appInterfaceDO = iotCompanyAppInterfaceDao.findOne(id);
        if (appInterfaceDO.getDel().equalsIgnoreCase("1")){
            return MixEnvelop.getError("该接口已删除",-1);
        }
        appInterfaceDO.setDel("1");
        iotCompanyAppInterfaceDao.save(appInterfaceDO);
        return MixEnvelop.getSuccess(IotRequestMapping.Platform.message_success_delete);
    }
}