|
@@ -1,26 +1,26 @@
|
|
|
package com.uas.platform.b2b.controller;
|
|
package com.uas.platform.b2b.controller;
|
|
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-
|
|
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
-import org.springframework.ui.ModelMap;
|
|
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
-
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.uas.platform.b2b.model.Enterprise;
|
|
import com.uas.platform.b2b.model.Enterprise;
|
|
|
import com.uas.platform.b2b.model.InvitationRecord;
|
|
import com.uas.platform.b2b.model.InvitationRecord;
|
|
|
import com.uas.platform.b2b.search.SearchService;
|
|
import com.uas.platform.b2b.search.SearchService;
|
|
|
import com.uas.platform.b2b.service.InvitationRecordService;
|
|
import com.uas.platform.b2b.service.InvitationRecordService;
|
|
|
import com.uas.platform.b2b.support.SystemSession;
|
|
import com.uas.platform.b2b.support.SystemSession;
|
|
|
|
|
+import com.uas.platform.core.model.Constant;
|
|
|
import com.uas.platform.core.model.PageParams;
|
|
import com.uas.platform.core.model.PageParams;
|
|
|
import com.uas.search.b2b.model.SPage;
|
|
import com.uas.search.b2b.model.SPage;
|
|
|
import com.uas.search.b2b.model.Sort;
|
|
import com.uas.search.b2b.model.Sort;
|
|
|
import com.uas.search.b2b.model.Sort.Type;
|
|
import com.uas.search.b2b.model.Sort.Type;
|
|
|
import com.uas.search.b2b.util.SearchConstants;
|
|
import com.uas.search.b2b.util.SearchConstants;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.ui.ModelMap;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/invitationrecord")
|
|
@RequestMapping("/invitationrecord")
|
|
@@ -56,13 +56,14 @@ public class InvitationRecordController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 查询邀请记录(个人)
|
|
|
|
|
|
|
+ * 查询邀请记录(个人)-当前企业
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/records", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/records", method = RequestMethod.GET)
|
|
|
private SPage<InvitationRecord> getRecords(PageParams params, String keyword) {
|
|
private SPage<InvitationRecord> getRecords(PageParams params, String keyword) {
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
|
|
|
|
|
+ pageParams.getFilters().put("in_enuu", SystemSession.getUser().getEnterprise().getUu());
|
|
|
pageParams.getFilters().put("in_useruu", SystemSession.getUser().getUserUU());
|
|
pageParams.getFilters().put("in_useruu", SystemSession.getUser().getUserUU());
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("in_date", false, Type.LONG, new Long(1)));
|
|
sortList.add(new Sort("in_date", false, Type.LONG, new Long(1)));
|
|
@@ -85,6 +86,26 @@ public class InvitationRecordController {
|
|
|
return invitationRecordService.getRecords(pageParams, keyword);
|
|
return invitationRecordService.getRecords(pageParams, keyword);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询邀请记录(企业)--已激活
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @RequestMapping(value = "/activeRecordsByEn", method = RequestMethod.GET)
|
|
|
|
|
+ private SPage<InvitationRecord> getActiveRecordsByEn(PageParams params, String keyword) {
|
|
|
|
|
+ com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
|
|
|
|
|
+ pageParams.getFilters().put("in_enuu", SystemSession.getUser().getEnterprise().getUu());
|
|
|
|
|
+ pageParams.getFilters().put("in_active", Constant.YES);
|
|
|
|
|
+// 不显示自己的
|
|
|
|
|
+// HashMap<String, Object> map = new HashMap<>();
|
|
|
|
|
+// map.put("in_useruu", SystemSession.getUser().getUserUU());
|
|
|
|
|
+// pageParams.setNotEqualFilters(map);
|
|
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
|
|
+ sortList.add(new Sort("in_date", false, Type.LONG, new Long(1)));
|
|
|
|
|
+ pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
|
|
|
|
|
+ return invitationRecordService.getRecords(pageParams, keyword);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 通过名称查询企业信息
|
|
* 通过名称查询企业信息
|
|
|
*
|
|
*
|