|
|
@@ -1,6 +1,7 @@
|
|
|
package me.zhengjie.application.admin.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -262,4 +263,45 @@ public class ModelNotarizationServiceImpl implements ModelNotarizationService {
|
|
|
}
|
|
|
return response;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公证书模板-批量启用
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public AppBaseResponse batchInvocation(ModelReq req) {
|
|
|
+ AppBaseResponse response = new AppBaseResponse();
|
|
|
+ req.getIds().stream()
|
|
|
+ .forEach(ele -> {
|
|
|
+ ModelEntity entity = modelMapper.selectById(ele);
|
|
|
+ if (entity != null && entity.getStatus() == 0) {
|
|
|
+ entity.setStatus(1);
|
|
|
+ modelMapper.updateById(entity);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return response;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公证书模板-批量禁用
|
|
|
+ *
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public AppBaseResponse batchForbidden(ModelReq req) {
|
|
|
+ AppBaseResponse response = new AppBaseResponse();
|
|
|
+ req.getIds().stream()
|
|
|
+ .forEach(ele -> {
|
|
|
+ ModelEntity entity = modelMapper.selectById(ele);
|
|
|
+ if (entity != null && entity.getStatus() == 1) {
|
|
|
+ entity.setStatus(0);
|
|
|
+ modelMapper.updateById(entity);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return response;
|
|
|
+ }
|
|
|
+
|
|
|
}
|