|
|
@@ -1,6 +1,8 @@
|
|
|
package com.template.controller;
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.template.annotation.DESRespondSecret;
|
|
|
@@ -16,6 +18,7 @@ import com.template.model.vo.SmartVisitorParentsConfigVo;
|
|
|
import com.template.services.SmartDutiesService;
|
|
|
import com.template.services.SmartUserService;
|
|
|
import com.template.services.SmartVisitorParentsConfigService;
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
@@ -23,6 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -56,7 +60,24 @@ public class SmartVisitorParentsConfigController implements SmartVisitorParentsC
|
|
|
@Override
|
|
|
@DESRespondSecret(validated = true)
|
|
|
public CommonResult update(List<SmartVisitorParentsConfig> smartVisitorParentsConfigs) {
|
|
|
- boolean update = smartVisitorParentsConfigService.updateBatchById(smartVisitorParentsConfigs);
|
|
|
+
|
|
|
+ ArrayList<SmartVisitorParentsConfig> svpcs = new ArrayList<>();
|
|
|
+ for (SmartVisitorParentsConfig smartVisitorParentsConfig : smartVisitorParentsConfigs) {
|
|
|
+ Integer classId = smartVisitorParentsConfig.getClassId();
|
|
|
+ SmartVisitorParentsConfig svpc=smartVisitorParentsConfigService.getByClassId(classId);
|
|
|
+ svpc.setAppAuditConfig(smartVisitorParentsConfig.getAppAuditConfig());
|
|
|
+ svpc.setAppPushConfig(smartVisitorParentsConfig.getAppPushConfig());
|
|
|
+ svpc.setAppCancelConfig(smartVisitorParentsConfig.getAppCancelConfig());
|
|
|
+ svpc.setScreenAuditConfig(smartVisitorParentsConfig.getScreenAuditConfig());
|
|
|
+ svpc.setScreenPushConfig(smartVisitorParentsConfig.getScreenPushConfig());
|
|
|
+ svpc.setScreenCancelConfig(smartVisitorParentsConfig.getScreenCancelConfig());
|
|
|
+ svpc.setAccessConfig(smartVisitorParentsConfig.getAccessConfig());
|
|
|
+ svpc.setCarConfig(smartVisitorParentsConfig.getCarConfig());
|
|
|
+ svpcs.add(svpc);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ boolean update = smartVisitorParentsConfigService.updateBatchById(svpcs);
|
|
|
|
|
|
if (update) {
|
|
|
return CommonResult.ok();
|