Procházet zdrojové kódy

修改静态变量

hechunping před 2 roky
rodič
revize
38117e1262

+ 3 - 3
device-api-service/src/main/java/com/xy/service/DeviceInfoServiceImpl.java

@@ -159,20 +159,20 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
     public R updateLine(@RequestBody @Validated DeviceInfoDto.UpdateLine updateLine){
         LambdaUpdateWrapper<DeviceInfo> luw = new LambdaUpdateWrapper<DeviceInfo>().eq(DeviceInfo::getMercId,updateLine.getMercId());
         //绑定线路,更换线路
-        if(DeviceInfoDto.UPDATE_LINE_UPDATE.equals(updateLine.getType())){
+        if(DeviceInfoDto.UPDATE.equals(updateLine.getType())){
             DeviceInfo deviceInfo = new DeviceInfo();
             deviceInfo.setPlaceLineId(updateLine.getPlaceLineId());
             luw.in(DeviceInfo::getDeviceId,updateLine.getDeviceIds());
             baseMapper.update(deviceInfo,luw);
         }
         //删除线路
-        if(DeviceInfoDto.UPDATE_LINE_DEL.equals(updateLine.getType())) {
+        if(DeviceInfoDto.DEL.equals(updateLine.getType())) {
             luw.eq(DeviceInfo::getPlaceLineId, updateLine.getWherePlaceLineId());
             luw.set(DeviceInfo::getPlaceLineId, null);
             baseMapper.update(null, luw);
         }
         //解绑线路 设置线路ID为null
-        if(DeviceInfoDto.UPDATE_LINE_CLEAR.equals(updateLine.getType())) {
+        if(DeviceInfoDto.CLEAR.equals(updateLine.getType())) {
             luw.in(DeviceInfo::getDeviceId, updateLine.getDeviceIds());
             luw.set(DeviceInfo::getPlaceLineId, null);
             baseMapper.update(null, luw);

+ 6 - 6
device-api/src/main/java/com/xy/dto/DeviceInfoDto.java

@@ -16,17 +16,17 @@ import java.util.List;
 @Accessors(chain = true)
 public class DeviceInfoDto {
     /**
-     * 删除线路时指定 传入 wherePlaceLineId
+     * 删除线路\点位时时指定 传入 wherePlaceLineId\
      */
-    public final static String UPDATE_LINE_DEL = "del";
+    public final static String DEL = "del";
     /**
-     * 更新线路时指定 传入 deviceIds、placeLineId
+     * 更新线路时指定 传入 deviceIds、placeLineId\
      */
-    public final static String UPDATE_LINE_UPDATE = "update";
+    public final static String UPDATE = "update";
     /**
-     * 解绑线路时指定 传入 deviceIds
+     * 解绑线路点位时指定 传入 deviceIds
      */
-    public final static String UPDATE_LINE_CLEAR = "clear";
+    public final static String CLEAR = "clear";
 
     @Data
     @Accessors(chain = true)