|
|
@@ -0,0 +1,471 @@
|
|
|
+package cn.com.ctop.job.bytedance.data.service.impl;
|
|
|
+
|
|
|
+import cn.com.ctop.job.bytedance.data.mapper.BytedanceBudgetStatusMapper;
|
|
|
+import cn.com.ctop.job.bytedance.data.service.IBytedanceBudgetStatusService;
|
|
|
+import cn.com.ctop.job.bytedance.data.utils.Check;
|
|
|
+import cn.com.ctop.job.bytedance.data.utils.HttpUtils;
|
|
|
+import cn.com.ctop.job.bytedance.utils.RateLimitUtil;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@Service
|
|
|
+public class BytedanceBudgetStatusServiceImpl implements IBytedanceBudgetStatusService {
|
|
|
+ @Autowired
|
|
|
+ private BytedanceBudgetStatusMapper bytedanceBudgetStatusMapper;
|
|
|
+ @Autowired
|
|
|
+ private RateLimitUtil rateLimitUtil;
|
|
|
+ private static String devAppId = "1742489802322972";
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject getAdvertiserBudget(Long advertiserId) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ String accessToken = bytedanceBudgetStatusMapper.getAccessToken(advertiserId);
|
|
|
+ if (Check.isNull(accessToken)) {
|
|
|
+ throw new Exception("根据此账户未获取到相关token");
|
|
|
+ }
|
|
|
+ String url = "https://ad.oceanengine.com/open_api/2/advertiser/budget/get/";
|
|
|
+ Map<String, Object> paramsMap = new HashMap<>();
|
|
|
+ JSONArray advertiser_ids = new JSONArray();
|
|
|
+ advertiser_ids.add(advertiserId);
|
|
|
+ paramsMap.put("advertiser_ids", advertiser_ids);
|
|
|
+ Map<String, String> headers = new HashMap<>();
|
|
|
+ headers.put("Access-Token", accessToken);
|
|
|
+ headers.put("Content-Type", "application/json;charset=UTF-8");
|
|
|
+ String s = null;
|
|
|
+ if (rateLimitUtil.acquire(devAppId, url)) {
|
|
|
+ s = HttpUtils.httpGet(url, paramsMap, headers);
|
|
|
+ }
|
|
|
+ JSONObject result = JSONObject.parseObject(s);
|
|
|
+ if (Check.isNull(result)) {
|
|
|
+ throw new Exception("获取预算返回结果为空");
|
|
|
+ }
|
|
|
+ Integer code = result.getInteger("code");
|
|
|
+ if (code != 0) {
|
|
|
+ throw new Exception(result.getString("message"));
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject data = result.getJSONObject("data");
|
|
|
+ if (Check.isNull(data)) {
|
|
|
+ throw new Exception("获取预算data返回结果为空");
|
|
|
+ }
|
|
|
+ JSONObject budgeJson = data.getJSONArray("list").getJSONObject(0);
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("data", budgeJson);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", 500);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return returnJson;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject getProjectBudget(Long advertiserId, Long projectId) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ String accessToken = bytedanceBudgetStatusMapper.getAccessToken(advertiserId);
|
|
|
+ if (Check.isNull(accessToken)) {
|
|
|
+ throw new Exception("根据此账户未获取到相关token");
|
|
|
+ }
|
|
|
+ String url = "https://api.oceanengine.com/open_api/v3.0/project/list/";
|
|
|
+
|
|
|
+ Map<String, Object> paramsMap = new HashMap<>();
|
|
|
+ paramsMap.put("advertiser_id", advertiserId);
|
|
|
+ JSONObject filtering = new JSONObject();
|
|
|
+ JSONArray ids = new JSONArray();
|
|
|
+ ids.add(projectId);
|
|
|
+ filtering.put("ids", ids);
|
|
|
+ paramsMap.put("filtering", filtering);
|
|
|
+ paramsMap.put("page", 1);
|
|
|
+ paramsMap.put("page_size", 10);
|
|
|
+ Map<String, String> headers = new HashMap<>();
|
|
|
+ headers.put("Access-Token", accessToken);
|
|
|
+ headers.put("Content-Type", "application/json;charset=UTF-8");
|
|
|
+ String s = null;
|
|
|
+ if (rateLimitUtil.acquire(devAppId, url)) {
|
|
|
+ s = HttpUtils.httpGet(url, paramsMap, headers);
|
|
|
+ }
|
|
|
+ JSONObject result = JSONObject.parseObject(s);
|
|
|
+ if (Check.isNull(result)) {
|
|
|
+ throw new Exception("获取预算返回结果为空");
|
|
|
+ }
|
|
|
+ Integer code = result.getInteger("code");
|
|
|
+ if (code != 0) {
|
|
|
+ throw new Exception(result.getString("message"));
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject data = result.getJSONObject("data");
|
|
|
+ if (Check.isNull(data)) {
|
|
|
+ throw new Exception("获取预算data返回结果为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject dataJson = data.getJSONArray("list").getJSONObject(0);
|
|
|
+ if (Check.isNull(dataJson)) {
|
|
|
+ if (Check.isNull(data)) {
|
|
|
+ throw new Exception("获取预算data返回结果为空");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ JSONObject deliverySetting = dataJson.getJSONObject("delivery_setting");
|
|
|
+ if (Check.isNull(deliverySetting)) {
|
|
|
+ throw new Exception("获取预算delivery_setting返回结果为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject budgeJson = new JSONObject();
|
|
|
+ String budget_mode = deliverySetting.getString("budget_mode");
|
|
|
+ BigDecimal budget = deliverySetting.getBigDecimal("budget");
|
|
|
+ budgeJson.put("budget_mode", budget_mode);
|
|
|
+ budgeJson.put("budget", budget);
|
|
|
+ budgeJson.put("advertiser_id", advertiserId);
|
|
|
+ budgeJson.put("project_id", projectId);
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("data", budgeJson);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", 500);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return returnJson;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject getPromotionBudget(Long advertiserId, Long promotionId) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ String accessToken = bytedanceBudgetStatusMapper.getAccessToken(advertiserId);
|
|
|
+ if (Check.isNull(accessToken)) {
|
|
|
+ throw new Exception("根据此账户未获取到相关token");
|
|
|
+ }
|
|
|
+ String url = "https://api.oceanengine.com/open_api/v3.0/promotion/list/";
|
|
|
+
|
|
|
+ Map<String, Object> paramsMap = new HashMap<>();
|
|
|
+
|
|
|
+ paramsMap.put("advertiser_id", advertiserId);
|
|
|
+/* JSONArray fields = new JSONArray();
|
|
|
+ fields.add("project_id");
|
|
|
+ fields.add("advertiser_id");
|
|
|
+ fields.add("budget");
|
|
|
+ fields.add("budget_mode");
|
|
|
+ paramsMap.put("fields", fields.toJSONString());*/
|
|
|
+
|
|
|
+ JSONObject filtering = new JSONObject();
|
|
|
+ JSONArray ids = new JSONArray();
|
|
|
+ ids.add(promotionId);
|
|
|
+ filtering.put("ids", ids);
|
|
|
+ paramsMap.put("filtering", filtering);
|
|
|
+ paramsMap.put("page", 1);
|
|
|
+ paramsMap.put("page_size", 10);
|
|
|
+ Map<String, String> headers = new HashMap<>();
|
|
|
+ headers.put("Access-Token", accessToken);
|
|
|
+ headers.put("Content-Type", "application/json;charset=UTF-8");
|
|
|
+ String s = null;
|
|
|
+ if (rateLimitUtil.acquire(devAppId, url)) {
|
|
|
+ s = HttpUtils.httpGet(url, paramsMap, headers);
|
|
|
+ }
|
|
|
+ JSONObject result = JSONObject.parseObject(s);
|
|
|
+ if (Check.isNull(result)) {
|
|
|
+ throw new Exception("获取计划预算返回结果为空");
|
|
|
+ }
|
|
|
+ Integer code = result.getInteger("code");
|
|
|
+ if (code != 0) {
|
|
|
+ throw new Exception(result.getString("message"));
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject data = result.getJSONObject("data");
|
|
|
+ if (Check.isNull(data)) {
|
|
|
+ throw new Exception("获取预算data返回结果为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject dataJson = data.getJSONArray("list").getJSONObject(0);
|
|
|
+ if (Check.isNull(dataJson)) {
|
|
|
+ if (Check.isNull(data)) {
|
|
|
+ throw new Exception("获取预算data返回结果为空");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONObject budgeJson = new JSONObject();
|
|
|
+ String budget_mode = dataJson.getString("budget_mode");
|
|
|
+ BigDecimal budget = dataJson.getBigDecimal("budget");
|
|
|
+ budgeJson.put("budget_mode", budget_mode);
|
|
|
+ budgeJson.put("budget", budget);
|
|
|
+ budgeJson.put("advertiser_id", advertiserId);
|
|
|
+ budgeJson.put("promotion_id", promotionId);
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("data", budgeJson);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", 500);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+ return returnJson;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject updateAdvertiserBudget(Long advertiserId, String budgetMode, BigDecimal budget) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ String accessToken = bytedanceBudgetStatusMapper.getAccessToken(advertiserId);
|
|
|
+ if (Check.isNull(accessToken)) {
|
|
|
+ throw new Exception("根据此账户未获取到相关token");
|
|
|
+ }
|
|
|
+ String url = "https://ad.oceanengine.com/open_api/2/advertiser/update/budget/";
|
|
|
+ Map<String, Object> paramsMap = new HashMap<>();
|
|
|
+ paramsMap.put("advertiser_id", advertiserId);
|
|
|
+ paramsMap.put("budget_mode", budgetMode);
|
|
|
+ paramsMap.put("budget", budget);
|
|
|
+ Map<String, String> headers = new HashMap<>();
|
|
|
+ headers.put("Access-Token", accessToken);
|
|
|
+ headers.put("Content-Type", "application/json;charset=UTF-8");
|
|
|
+ String s = null;
|
|
|
+ if (rateLimitUtil.acquire(devAppId, url)) {
|
|
|
+ s = HttpUtils.httpPostRequest(url, paramsMap, headers);
|
|
|
+ }
|
|
|
+ JSONObject result = JSONObject.parseObject(s);
|
|
|
+ if (Check.isNull(result)) {
|
|
|
+ throw new Exception("修改账户预算返回结果为空");
|
|
|
+ }
|
|
|
+ Integer code = result.getInteger("code");
|
|
|
+ if (code != 0) {
|
|
|
+ throw new Exception(result.getString("message"));
|
|
|
+ }
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("message", "success");
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", 500);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return returnJson;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject updateProjectBudget(Long advertiserId, Long projectId, String budgetMode, BigDecimal budget) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ String accessToken = bytedanceBudgetStatusMapper.getAccessToken(advertiserId);
|
|
|
+ if (Check.isNull(accessToken)) {
|
|
|
+ throw new Exception("根据此账户未获取到相关token");
|
|
|
+ }
|
|
|
+ String url = "https://api.oceanengine.com/open_api/v3.0/project/budget/update/";
|
|
|
+ Map<String, Object> paramsMap = new HashMap<>();
|
|
|
+ paramsMap.put("advertiser_id", advertiserId);
|
|
|
+ JSONArray data = new JSONArray();
|
|
|
+ JSONObject dataJson = new JSONObject();
|
|
|
+ dataJson.put("project_id", projectId);
|
|
|
+ dataJson.put("budget_mode", budgetMode);
|
|
|
+ dataJson.put("budget", budget);
|
|
|
+ data.add(dataJson);
|
|
|
+ paramsMap.put("data", data);
|
|
|
+
|
|
|
+ Map<String, String> headers = new HashMap<>();
|
|
|
+ headers.put("Access-Token", accessToken);
|
|
|
+ headers.put("Content-Type", "application/json;charset=UTF-8");
|
|
|
+ String s = null;
|
|
|
+ if (rateLimitUtil.acquire(devAppId, url)) {
|
|
|
+ s = HttpUtils.httpPostRequest(url, paramsMap, headers);
|
|
|
+ }
|
|
|
+ JSONObject result = JSONObject.parseObject(s);
|
|
|
+ if (Check.isNull(result)) {
|
|
|
+ throw new Exception("修改账户预算返回结果为空");
|
|
|
+ }
|
|
|
+ Integer code = result.getInteger("code");
|
|
|
+ if (code != 0) {
|
|
|
+ throw new Exception(result.getString("message"));
|
|
|
+ }
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("message", "success");
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", 500);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return returnJson;
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject updatePromotionBudget(Long advertiserId, Long promotionId, String budgetMode, BigDecimal budget) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ String accessToken = bytedanceBudgetStatusMapper.getAccessToken(advertiserId);
|
|
|
+ if (Check.isNull(accessToken)) {
|
|
|
+ throw new Exception("根据此账户未获取到相关token");
|
|
|
+ }
|
|
|
+ String url = "https://api.oceanengine.com/open_api/v3.0/promotion/budget/update/";
|
|
|
+ Map<String, Object> paramsMap = new HashMap<>();
|
|
|
+ paramsMap.put("advertiser_id", advertiserId);
|
|
|
+ JSONArray data = new JSONArray();
|
|
|
+ JSONObject dataJson = new JSONObject();
|
|
|
+ dataJson.put("promotion_id", promotionId);
|
|
|
+ dataJson.put("budget_mode", budgetMode);
|
|
|
+ dataJson.put("budget", budget);
|
|
|
+ data.add(dataJson);
|
|
|
+ paramsMap.put("data", data);
|
|
|
+
|
|
|
+ Map<String, String> headers = new HashMap<>();
|
|
|
+ headers.put("Access-Token", accessToken);
|
|
|
+ headers.put("Content-Type", "application/json;charset=UTF-8");
|
|
|
+ String s = null;
|
|
|
+ if (rateLimitUtil.acquire(devAppId, url)) {
|
|
|
+ s = HttpUtils.httpPostRequest(url, paramsMap, headers);
|
|
|
+ }
|
|
|
+ JSONObject result = JSONObject.parseObject(s);
|
|
|
+ if (Check.isNull(result)) {
|
|
|
+ throw new Exception("修改账户预算返回结果为空");
|
|
|
+ }
|
|
|
+ Integer code = result.getInteger("code");
|
|
|
+ if (code != 0) {
|
|
|
+ throw new Exception(result.getString("message"));
|
|
|
+ }
|
|
|
+ JSONObject dataResult = result.getJSONObject("data");
|
|
|
+ String errorMessage = "";
|
|
|
+ if (!Check.isNull(dataResult)) {
|
|
|
+ JSONArray errors = dataResult.getJSONArray("errors");
|
|
|
+
|
|
|
+ if (!Check.isNull(errors)) {
|
|
|
+ JSONObject jsonObject = errors.getJSONObject(0);
|
|
|
+ if (!Check.isNull(jsonObject)) {
|
|
|
+ errorMessage = jsonObject.getString("error_message");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!Check.isNull(errorMessage)) {
|
|
|
+ throw new Exception(errorMessage);
|
|
|
+ }
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("message", "success");
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", 500);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return returnJson;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject updateProjectStatus(Long advertiserId, Long projectId, String optStatus) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ String accessToken = bytedanceBudgetStatusMapper.getAccessToken(advertiserId);
|
|
|
+ if (Check.isNull(accessToken)) {
|
|
|
+ throw new Exception("根据此账户未获取到相关token");
|
|
|
+ }
|
|
|
+ String url = "https://api.oceanengine.com/open_api/v3.0/project/status/update/";
|
|
|
+ Map<String, Object> paramsMap = new HashMap<>();
|
|
|
+ paramsMap.put("advertiser_id", advertiserId);
|
|
|
+ JSONArray data = new JSONArray();
|
|
|
+ JSONObject dataJson = new JSONObject();
|
|
|
+ dataJson.put("project_id", projectId);
|
|
|
+ dataJson.put("opt_status", optStatus);
|
|
|
+ data.add(dataJson);
|
|
|
+ paramsMap.put("data", data);
|
|
|
+
|
|
|
+ Map<String, String> headers = new HashMap<>();
|
|
|
+ headers.put("Access-Token", accessToken);
|
|
|
+ headers.put("Content-Type", "application/json;charset=UTF-8");
|
|
|
+ String s = null;
|
|
|
+ if (rateLimitUtil.acquire(devAppId, url)) {
|
|
|
+ s = HttpUtils.httpPostRequest(url, paramsMap, headers);
|
|
|
+ }
|
|
|
+ JSONObject result = JSONObject.parseObject(s);
|
|
|
+ if (Check.isNull(result)) {
|
|
|
+ throw new Exception("修改账户预算返回结果为空");
|
|
|
+ }
|
|
|
+ Integer code = result.getInteger("code");
|
|
|
+ if (code != 0) {
|
|
|
+ throw new Exception(result.getString("message"));
|
|
|
+ }
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("message", "success");
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", 500);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return returnJson;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject updatePromotionStatus(Long advertiserId, Long promotionId, String optStatus) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ String accessToken = bytedanceBudgetStatusMapper.getAccessToken(advertiserId);
|
|
|
+ if (Check.isNull(accessToken)) {
|
|
|
+ throw new Exception("根据此账户未获取到相关token");
|
|
|
+ }
|
|
|
+ String url = "https://api.oceanengine.com/open_api/v3.0/promotion/status/update/";
|
|
|
+ Map<String, Object> paramsMap = new HashMap<>();
|
|
|
+ paramsMap.put("advertiser_id", advertiserId);
|
|
|
+ JSONArray data = new JSONArray();
|
|
|
+ JSONObject dataJson = new JSONObject();
|
|
|
+ dataJson.put("promotion_id", promotionId);
|
|
|
+ dataJson.put("opt_status", optStatus);
|
|
|
+ data.add(dataJson);
|
|
|
+ paramsMap.put("data", data);
|
|
|
+
|
|
|
+ Map<String, String> headers = new HashMap<>();
|
|
|
+ headers.put("Access-Token", accessToken);
|
|
|
+ headers.put("Content-Type", "application/json;charset=UTF-8");
|
|
|
+ String s = null;
|
|
|
+ if (rateLimitUtil.acquire(devAppId, url)) {
|
|
|
+ s = HttpUtils.httpPostRequest(url, paramsMap, headers);
|
|
|
+ }
|
|
|
+ JSONObject result = JSONObject.parseObject(s);
|
|
|
+ if (Check.isNull(result)) {
|
|
|
+ throw new Exception("修改账户预算返回结果为空");
|
|
|
+ }
|
|
|
+ Integer code = result.getInteger("code");
|
|
|
+ if (code != 0) {
|
|
|
+ throw new Exception(result.getString("message"));
|
|
|
+ }
|
|
|
+ JSONObject dataResult = result.getJSONObject("data");
|
|
|
+ String errorMessage = "";
|
|
|
+ if (!Check.isNull(dataResult)) {
|
|
|
+ JSONArray errors = dataResult.getJSONArray("errors");
|
|
|
+ if (!Check.isNull(errors)) {
|
|
|
+ JSONObject jsonObject = errors.getJSONObject(0);
|
|
|
+ if (!Check.isNull(jsonObject)) {
|
|
|
+ errorMessage = jsonObject.getString("error_message");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!Check.isNull(errorMessage)) {
|
|
|
+ throw new Exception(errorMessage);
|
|
|
+ }
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("message", "success");
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", 500);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return returnJson;
|
|
|
+ }
|
|
|
+}
|