|
@@ -197,6 +197,19 @@ public class DeviceCreateIdsServiceImpl extends ServiceImpl<DeviceCreateIdsMappe
|
|
|
return R.ok();
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("updateBatch")
|
|
|
+ @ApiOperation("批量修改")
|
|
|
+ public R updateBatch(@RequestBody @Validated DeviceCreateIdsDto.UpdateBatch updateBatch) {
|
|
|
+ List<Long> deviceIds = updateBatch.getDeviceIds();
|
|
|
+ List<DeviceCreateIds> deviceCreateIdss = new ArrayList<>(deviceIds.size());
|
|
|
+ deviceIds.forEach(deviceId -> {
|
|
|
+ DeviceCreateIds deviceCreateIds = copy(DeviceCreateIds.class, updateBatch).setDeviceId(deviceId);
|
|
|
+ deviceCreateIdss.add(deviceCreateIds);
|
|
|
+ });
|
|
|
+ updateBatchById(deviceCreateIdss);
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("getQrCode")
|
|
|
@ApiOperation("获取二维码")
|
|
|
public R<List<String>> getQrCode(@RequestBody @Validated DeviceQualityDto.Qrcode qrcode) {
|