增加返回码为200

jieling
DESKTOP-C3M45P4\dengdan 2025-02-19 15:22:07 +08:00
parent 2326045f63
commit 8a879025ae
1 changed files with 4 additions and 1 deletions

View File

@ -15,11 +15,13 @@ import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@ -86,6 +88,7 @@ public class UserInfoController {
}
@RequestMapping(value = "/gomotaGetRoleList", method = {RequestMethod.POST, RequestMethod.GET})
@ResponseStatus(HttpStatus.OK)
public String gomotaGetRoleInfo(ModelMap map, HttpServletRequest request) throws Exception {
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
String appota_user_id = request.getParameter("appota_user_id");
@ -107,7 +110,7 @@ public class UserInfoController {
return resp.toString();
}
if (StringUtils.checkIsEmpty(api_key)) {
resp.put("message", "sub_channel null");
resp.put("message", "api_key null");
resp.put("error_code", 1);
resp.put("data", roleList);
return resp.toString();