|
@@ -1,20 +1,19 @@
|
|
|
package com.jd.controller;
|
|
|
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-
|
|
|
import com.jd.code.ConstString;
|
|
|
+import com.jd.entity.basic.SsoSystem;
|
|
|
import com.jd.service.SsoSystemService;
|
|
|
import com.jd.util.Blank;
|
|
|
import com.jd.util.SendUtil;
|
|
|
-
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* SSO业务系统类
|
|
@@ -38,11 +37,79 @@ public class SsoSystemController {
|
|
|
@GetMapping("/getSsoSystemList")
|
|
|
@ApiOperation(value = "查询SSO业务系统列表")
|
|
|
public Map<String, Object> getSsoSystemList(String userId) {
|
|
|
-// if (Blank.isEmpty(userId)) {
|
|
|
-// return SendUtil.send(false, ConstString.REQUEST_WRONGPARAMS);
|
|
|
-// }
|
|
|
Map<String, Object> map = new HashMap<>(4);
|
|
|
map.put("userId", userId);
|
|
|
return SendUtil.send(true, ConstString.RESULT_SUCCESS, ssoSystemService.getSsoSystemList(map));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获得sso系统列表页面
|
|
|
+ * @param page 页面
|
|
|
+ * @param limit 限制
|
|
|
+ * @param queryValue 查询值
|
|
|
+ * @return {@link Map}<{@link String}, {@link Object}>
|
|
|
+ */
|
|
|
+ @GetMapping("getSsoSystemListByPage")
|
|
|
+ @ApiOperation(value = "分页查询SSO业务系统列表")
|
|
|
+ public Map<String, Object> getSsoSystemListByPage(Integer page, Integer limit, String queryValue) {
|
|
|
+ if (Blank.isEmpty(page, limit)) {
|
|
|
+ return SendUtil.send(false, ConstString.REQUEST_WRONGPARAMS);
|
|
|
+ }
|
|
|
+ Map<String, Object> param = new HashMap<>(4);
|
|
|
+ param.put("start", (page - 1) * limit);
|
|
|
+ param.put("limit", limit);
|
|
|
+ param.put("queryValue", queryValue);
|
|
|
+ return ssoSystemService.getSsoSystemListByPage(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 插入sso系统
|
|
|
+ * @param ssoSystem sso系统
|
|
|
+ * @return {@link Map}<{@link String}, {@link Object}>
|
|
|
+ */
|
|
|
+ @PostMapping("insertSsoSystem")
|
|
|
+ @ApiOperation(value = "新增SSO业务系统")
|
|
|
+ public Map<String, Object> insertSsoSystem(SsoSystem ssoSystem) {
|
|
|
+ return ssoSystemService.insertSsoSystem(ssoSystem);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新sso系统
|
|
|
+ * @param ssoSystem sso系统
|
|
|
+ * @return {@link Map}<{@link String}, {@link Object}>
|
|
|
+ */
|
|
|
+ @PostMapping("updateSsoSystem")
|
|
|
+ @ApiOperation(value = "编辑SSO业务系统")
|
|
|
+ public Map<String, Object> updateSsoSystem(SsoSystem ssoSystem) {
|
|
|
+
|
|
|
+ return ssoSystemService.updateSsoSystem(ssoSystem);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除sso系统
|
|
|
+ * @param id id
|
|
|
+ * @return {@link Map}<{@link String}, {@link Object}>
|
|
|
+ */
|
|
|
+ @PostMapping("deleteSsoSystem")
|
|
|
+ @ApiOperation(value = "删除SSO业务系统")
|
|
|
+ public Map<String, Object> deleteSsoSystem(Integer id) {
|
|
|
+ if (Blank.isEmpty(id)) {
|
|
|
+ return SendUtil.send(false, ConstString.REQUEST_WRONGPARAMS);
|
|
|
+ }
|
|
|
+ return ssoSystemService.deleteSsoSystem(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获得sso系统信息
|
|
|
+ * @param id id
|
|
|
+ * @return {@link Map}<{@link String}, {@link Object}>
|
|
|
+ */
|
|
|
+ @GetMapping("getSsoSystemInfo")
|
|
|
+ @ApiOperation(value = "查询SSO业务系统详情")
|
|
|
+ public Map<String, Object> getSsoSystemInfo(Integer id) {
|
|
|
+ if (Blank.isEmpty(id)) {
|
|
|
+ return SendUtil.send(false, ConstString.REQUEST_WRONGPARAMS);
|
|
|
+ }
|
|
|
+ return ssoSystemService.getSsoSystemInfo(id);
|
|
|
+ }
|
|
|
}
|