|
@@ -1,5 +1,7 @@
|
|
|
package com.persagy.proxy.object.controller;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
+import com.persagy.proxy.adm.request.AdmCreateRequest;
|
|
|
import com.persagy.proxy.adm.request.AdmQueryCriteria;
|
|
|
import com.persagy.proxy.adm.request.AdmResponse;
|
|
|
import com.persagy.proxy.adm.utils.AdmContextUtil;
|
|
@@ -8,6 +10,8 @@ import com.persagy.proxy.object.service.IAdmProjectService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* ADM 项目 API
|
|
|
* @author Charlie Yu
|
|
@@ -43,4 +47,18 @@ public class AdmProjectController {
|
|
|
public AdmResponse queryObj(@RequestBody AdmQueryCriteria request) throws Exception {
|
|
|
return query(null, request);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新项目信息
|
|
|
+ * @param createRequest
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @PostMapping("/update")
|
|
|
+ public AdmResponse update(@RequestBody AdmCreateRequest<AdmProject> createRequest) throws Exception {
|
|
|
+ List<AdmProject> vos = CollUtil.newArrayList(createRequest.getContent());
|
|
|
+ vos = service.doUpdate(AdmContextUtil.toDmpContext(), AdmProject.class, vos);
|
|
|
+ return AdmResponse.success(vos);
|
|
|
+ }
|
|
|
}
|