|
@@ -1,5 +1,7 @@
|
|
|
package com.ym.mec.teacher.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
@@ -9,7 +11,6 @@ import java.util.LinkedHashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
@@ -57,36 +58,11 @@ public class SysMessageController extends BaseController {
|
|
|
@ApiOperation("获取消息分类类型")
|
|
|
@GetMapping(value = "typeList")
|
|
|
public Object typeList(){
|
|
|
- return succeed("[{\"value\":\"全部\",\"key\":\"ALL\"}," +
|
|
|
+ return succeed(JSON.parseArray("[{\"value\":\"全部\",\"key\":\"ALL\"}," +
|
|
|
"{\"value\":\"考勤信息\",\"key\":\"ATTENDANCE\"}," +
|
|
|
"{\"value\":\"课程信息\",\"key\":\"COURSE\"}," +
|
|
|
"{\"value\":\"作业信息\",\"key\":\"WORK\"}," +
|
|
|
- "{\"value\":\"其他\",\"key\":\"DEFAULT\"}]");
|
|
|
- }
|
|
|
-
|
|
|
- public static void main(String[] args) {
|
|
|
- JSONArray jsonArray = new JSONArray();
|
|
|
- JSONObject jsonObject = new JSONObject();
|
|
|
- jsonObject.put("key","ALL");
|
|
|
- jsonObject.put("value","全部");
|
|
|
- JSONObject jsonObject1 = new JSONObject();
|
|
|
- jsonObject1.put("key","ATTENDANCE");
|
|
|
- jsonObject1.put("value","考勤信息");
|
|
|
- JSONObject jsonObject2 = new JSONObject();
|
|
|
- jsonObject2.put("key","COURSE");
|
|
|
- jsonObject2.put("value","课程信息");
|
|
|
- JSONObject jsonObject3 = new JSONObject();
|
|
|
- jsonObject3.put("key","WORK");
|
|
|
- jsonObject3.put("value","作业信息");
|
|
|
- JSONObject jsonObject4 = new JSONObject();
|
|
|
- jsonObject4.put("key","DEFAULT");
|
|
|
- jsonObject4.put("value","其他");
|
|
|
- jsonArray.put(jsonObject);
|
|
|
- jsonArray.put(jsonObject1);
|
|
|
- jsonArray.put(jsonObject2);
|
|
|
- jsonArray.put(jsonObject3);
|
|
|
- jsonArray.put(jsonObject4);
|
|
|
- System.out.println(jsonArray);
|
|
|
+ "{\"value\":\"其他\",\"key\":\"DEFAULT\"}]"));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("一键已读")
|