소스 검색

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
zhaoxian 4 년 전
부모
커밋
4b8ef4f33b

+ 107 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/UserAllocationController.java

@@ -2,14 +2,19 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.constant.CtopRoleCodeConstant;
+import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.entity.Project;
 import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.mapper.UserAllocationMapper;
+import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.common.module.service.IProjectService;
 import cn.com.ctop.common.module.service.ISysRoleExtService;
 import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.StringUtils;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
+import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -29,6 +34,7 @@ import org.springframework.web.bind.annotation.*;
 import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 用户分配
@@ -55,6 +61,14 @@ public class UserAllocationController {
     @Autowired
     private IProjectMemberService projectMemberService;
 
+    @Autowired
+    private ICtopOauthTokenService oauthTokenService;
+    @Autowired
+    private IKuaishouInterfaceService kuaishouInterfaceService;
+    @Autowired
+    private IByteDanceAdvertiserDataService advertiserDataService;
+
+
     @GetMapping(value = "/accountTurnProject")
     public Result<Object> getAccountList(Long accountId, Long projectId) {
         Result<Object> result = new Result<>();
@@ -196,6 +210,99 @@ public class UserAllocationController {
     }
 
 
+    @GetMapping(value = "/updateAuthName")
+    public Result<UserAllocation> updateAuthName(Long accountId, String mediaId) {
+        Result<UserAllocation> result = new Result<>();
+        try {
+            CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
+            if (Check.isNull(oauthToken)) {
+                throw new Exception("未获取到账户信息");
+            }
+
+            String authName = null;
+            if (mediaId.equals("2") || mediaId.equals("4")) {
+                Map<String, Object> advertiseBaseInfoMap = kuaishouInterfaceService.advertiserInfo(accountId, oauthToken.getAccessToken());
+                Integer code = (Integer) advertiseBaseInfoMap.get("code");
+                if (code != 0) {
+                    throw new Exception("更新授权名称失败");
+
+                }
+                authName = (String) advertiseBaseInfoMap.get("userName");
+            } else if (mediaId.equals("1") || mediaId.equals("3")) {
+                Map<String, Object> advertiserDataMap = advertiserDataService.getAdvertiserInfo(String.valueOf(accountId), oauthToken.getAccessToken());
+                Integer code = (Integer) advertiserDataMap.get("code");
+                if (code != 0) {
+                    throw new Exception("更新授权名称失败");
+
+                }
+                authName = (String) advertiserDataMap.get("name");
+            }
+            UserAllocation allocation = new UserAllocation();
+            allocation.setAuthName(authName);
+
+            QueryWrapper<UserAllocation> queryWrapper = new QueryWrapper<>();
+            queryWrapper.eq("account_id", accountId);
+            queryWrapper.eq("media_id", mediaId);
+
+            boolean update = userAllocationService.update(allocation, queryWrapper);
+            if (update) {
+                result.setSuccess(true);
+            } else {
+                result.setSuccess(false);
+            }
+
+        } catch (Exception e) {
+            result.setSuccess(false);
+            result.setMessage(e.getMessage());
+        }
+
+        return result;
+
+    }
+
+
+    /**
+     * 统计报表 查看所有账号
+     *
+     * @param projectId
+     * @return
+     */
+    @GetMapping(value = "/getUserIdListByProjectId")
+    public Result<List<JSONObject>> getUserIdListByProjectId(Long projectId) {
+        Result<List<JSONObject>> result = new Result<>();
+        try {
+            if (Check.isNull(projectId)) {
+                throw new Exception("请选择项目id");
+            }
+            List<JSONObject> userIdList = userAllocationService.getUserIdListByProjectId(projectId);
+            result.setSuccess(true);
+            result.setResult(userIdList);
+        } catch (Exception e) {
+            result.setSuccess(false);
+            result.success(e.getMessage());
+        }
+        return result;
+    }
+
+
+    @GetMapping(value = "/getAccountIdListByUserId")
+    public Result<List<JSONObject>> getAccountIdListByUserId(Long userId) {
+        Result<List<JSONObject>> result = new Result<>();
+        try {
+            if (Check.isNull(userId)) {
+                throw new Exception("请选择快手id");
+            }
+            List<JSONObject> accountIdList = userAllocationService.getAccountIdListByUserId(userId);
+            result.setSuccess(true);
+            result.setResult(accountIdList);
+        } catch (Exception e) {
+            result.setSuccess(false);
+            result.success(e.getMessage());
+        }
+        return result;
+    }
+
+
     /**
      * 分页列表查询
      *

+ 12 - 8
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -8,15 +8,12 @@ import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.entity.UReportSubscriber;
 import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.message.handle.impl.EmailSendMsgHandle;
-import cn.com.ctop.common.module.service.IBindAccountLoginService;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.service.IUReportExportService;
-import cn.com.ctop.common.module.service.IUReportService;
-import cn.com.ctop.common.module.service.IUserAllocationService;
+import cn.com.ctop.common.module.service.*;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyReportTaskService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouRealTimeDataService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
 import cn.com.ctop.oa.modules.service.IWechatCheckinDataService;
@@ -25,6 +22,7 @@ import cn.com.ctop.oa.modules.service.IWechatNoListService;
 import cn.com.ctop.oa.modules.service.IWechatUserListService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.modules.report.service.IReportService;
+import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
@@ -76,10 +74,16 @@ public class SampleTest {
     private IWechatNoListService wechatNoListService;
     @Autowired
     private ICtopOauthTokenService tokenService;
+    @Autowired
+    private IKuaishouRealTimeDataService realTimeDataService;
 
 
     @Test
     public void getDepartment() throws ParseException {
+
+        JSONArray campaignDate = realTimeDataService.getCampaignDate(7865319L, "7abeae7f7708bda8111c62f985da84e7", 20209274L, "2020-09-27", "2020-09-27");
+
+        System.err.println(campaignDate);
 //        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
 //        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
 //        Date parse1 = simpleDateFormat.parse("2020-09-12");
@@ -93,11 +97,11 @@ public class SampleTest {
 //        wechatDepartment.getDepartment();
 //        wechatUserInfoService.getUserList();
 //        wechatCheckinDataService.getCheckinData();
-        wechatNoListService.getNoDateByNo("1598889600", "1601049600");
+//        wechatNoListService.getNoDateByNo("1598889600","1600927780");
 
-        /*Map<String, Object> map = new HashMap<String, Object>();
+       /* Map<String, Object> map = new HashMap<String, Object>();
         map.put("departId", "9");
-        List<WechatAttendance> wechatAttendances = wechatNoListService.queryAttendanceData( map);
+        List<WechatAttendance> wechatAttendances = wechatNoListService.queryAttendanceData(map);
         System.out.println(wechatAttendances);*/
         //         kuaishouInterfaceService.getSuZaoList("a34853c230e1b949eddbe569023dbc40", 7022550L, 1, "2020-09-15", "2020-09-16");
 

+ 7 - 2
module-common/src/main/java/cn/com/ctop/common/module/mapper/UserAllocationMapper.java

@@ -14,8 +14,13 @@ import java.util.List;
  * @Version: V1.0
  */
 public interface UserAllocationMapper extends BaseMapper<UserAllocation> {
-    List<UserAllocation> selectAccountListByProjectId(@Param("projectId")Long projectId);
-    String queryAdvertiserId(@Param("accountId")Long accountId);
+    List<UserAllocation> selectAccountListByProjectId(@Param("projectId") Long projectId);
+
+    String queryAdvertiserId(@Param("accountId") Long accountId);
 
     List<JSONObject> getAccountListByProject(@Param("projectId") Long projectId);
+
+    List<JSONObject> getUserIdListByProjectId(@Param("projectId") Long projectId);
+
+    List<JSONObject> getAccountIdListByUserId(@Param("userId") Long userId);
 }

+ 25 - 0
module-common/src/main/java/cn/com/ctop/common/module/mapper/xml/UserAllocationMapper.xml

@@ -31,4 +31,29 @@
        where project_id = #{projectId}
        order by create_time desc
     </select>
+
+    <select id="getUserIdListByProjectId" resultType="com.alibaba.fastjson.JSONObject">
+    SELECT t2.user_id as 'userId',
+    t2.account_id as 'accountId',
+    t2.user_name  as 'userName'
+    from ctop_user_allocation t1  LEFT JOIN
+    ctop_kuaishou_advertiser_base_info t2
+    ON t1.account_id = t2.account_id
+    WHERE t1.project_id = #{projectId}
+    GROUP BY t2.user_id
+    </select>
+
+
+    <select id="getAccountIdListByUserId" resultType="com.alibaba.fastjson.JSONObject">
+    SELECT
+    t1.account_id as 'accountId',
+    t1.auth_name  as 'authName'
+    from ctop_user_allocation   t1  LEFT JOIN
+    ctop_kuaishou_advertiser_base_info t2
+    ON t1.account_id = t2.account_id
+    WHERE t2.user_id = #{userId}
+    AND t1.account_status = 0
+    </select>
+
+
 </mapper>

+ 4 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/IUserAllocationService.java

@@ -28,4 +28,8 @@ public interface IUserAllocationService extends IService<UserAllocation> {
     String getAdvertiserIdByAccountId(Long accountId);
 
     List<JSONObject> getAccountListByProject(Long projectId);
+
+    List<JSONObject> getUserIdListByProjectId(Long projectId);
+
+    List<JSONObject> getAccountIdListByUserId(Long userId);
 }

+ 15 - 12
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java

@@ -517,7 +517,7 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
             MaterialInfo info = new MaterialInfo();
             Long projectId = json.getLong("projectId");
             String code = json.getString("code");
-           // info.setId(code + projectId);
+            info.setId(code + "_" + projectId);
             info.setCode(code);
             if (!Check.isNull(json.getString("watermarkUrl"))) {
                 info.setWatermarkUrl(json.getString("watermarkUrl"));
@@ -546,13 +546,15 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
                 String coverUrl = CloudVideoProcessUtil.videoCutPictureHandle(videoUrl, loadImage);
                 info.setCoverUrl(coverUrl);
                 Thread thread = new Thread() {
-                        @Override
-                        public void run() { try {
+                    @Override
+                    public void run() {
+                        try {
                             log.info("开始抽帧,code:{}", code);
                             materialCutFrameService.getTencentCutFrame(videoUrl, code, coverUrl);
                         } catch (Exception e) {
                             e.printStackTrace();
-                        } }
+                        }
+                    }
                 };
                 thread.start();
             } else {
@@ -586,13 +588,13 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
             }
 
             JSONArray modalityTagList = json.getJSONArray("modalityTagList");
-            insertTagList(code,userId,modalityTagList);
+            insertTagList(code, userId, modalityTagList);
             JSONArray contentTagList = json.getJSONArray("contentTagList");
-            insertTagList(code,userId,contentTagList);
+            insertTagList(code, userId, contentTagList);
             JSONArray senceTagList = json.getJSONArray("senceTagList");
-            insertTagList(code,userId,senceTagList);
+            insertTagList(code, userId, senceTagList);
             JSONArray modTagList = json.getJSONArray("modTagList");
-            insertTagList(code,userId,modTagList);
+            insertTagList(code, userId, modTagList);
             getFile(info, project.getMediaId());
             ResultMapUtils.setResultMap(resultMap, StatusCode.COMMON_SUCCESS.getCode());
         } catch (Exception e) {
@@ -602,17 +604,18 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
         return resultMap;
     }
 
-    private void insertTagList(String code,String userId,JSONArray tagList){
-        if(null!=tagList&&!tagList.isEmpty()){
-            for(int m=0;m<tagList.size();m++){
+    private void insertTagList(String code, String userId, JSONArray tagList) {
+        if (null != tagList && !tagList.isEmpty()) {
+            for (int m = 0; m < tagList.size(); m++) {
                 Long tagId = tagList.getLong(m);
                 TagInfo tagInfo = tagInfoService.getById(tagId);
-                MaterialTagInfo setTag= new MaterialTagInfo(code,tagInfo,userId);
+                MaterialTagInfo setTag = new MaterialTagInfo(code, tagInfo, userId);
                 setTag.setCategoryId(tagInfo.getTagCategoryId());
                 materialTagInfoService.save(setTag);
             }
         }
     }
+
     @Autowired
     private ITagInfoService tagInfoService;
     @Autowired

+ 16 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/UserAllocationServiceImpl.java

@@ -103,4 +103,20 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
     public List<JSONObject> getAccountListByProject(Long projectId) {
         return userAllocationMapper.getAccountListByProject(projectId);
     }
+
+    /**
+     * 获取项目下的所有userId
+     *
+     * @param projectId
+     * @return
+     */
+    @Override
+    public List<JSONObject> getUserIdListByProjectId(Long projectId) {
+        return userAllocationMapper.getUserIdListByProjectId(projectId);
+    }
+
+    @Override
+    public List<JSONObject> getAccountIdListByUserId(Long userId) {
+        return userAllocationMapper.getAccountIdListByUserId(userId);
+    }
 }

+ 99 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouRealTimeController.java

@@ -0,0 +1,99 @@
+package cn.com.ctop.kuaishou.modules.batch.controller;
+
+import cn.com.ctop.common.module.entity.CtopOauthToken;
+import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouRealTimeDataService;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import io.swagger.annotations.Api;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Description: 广告组-app信息
+ * @Author: jeecg-boot
+ * @Date: 2019-07-23
+ * @Version: V1.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("/kuaishou/realTime")
+public class KuaiShouRealTimeController {
+    @Autowired
+    private IKuaishouRealTimeDataService realTimeDataService;
+    @Autowired
+    private ICtopOauthTokenService oauthTokenService;
+
+
+    @PostMapping(value = "/getCampaignDate")
+    public Result<JSONArray> getCampaignDate(@RequestBody JSONObject requestJson) {
+        Result<JSONArray> result = new Result<>();
+        try {
+            Long accountId = requestJson.getLong("accountId");
+            if (Check.isNull(accountId)) {
+                throw new Exception("请传入账户id");
+            }
+            CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
+            if (Check.isNull(oauthToken)) {
+                throw new Exception("未获取到账户信息");
+            }
+            Long campaignId = requestJson.getLong("campaignId");
+            if (Check.isNull(campaignId)) {
+                throw new Exception("请传入计划id");
+            }
+            String startDate = requestJson.getString("startDate");
+            String endDate = requestJson.getString("endDate");
+            if (Check.isNull(startDate) || Check.isNull(endDate)) {
+                throw new Exception("请选择开始、结束查询时间");
+            }
+            JSONArray campaignDate = realTimeDataService.getCampaignDate(accountId, oauthToken.getAccessToken(), campaignId, startDate, endDate);
+            result.setSuccess(true);
+            result.setResult(campaignDate);
+        } catch (Exception e) {
+            result.setSuccess(false);
+            result.setMessage(e.getMessage());
+        }
+
+        return result;
+    }
+
+
+    @PostMapping(value = "/getUnitDate")
+    public Result<JSONArray> getUnitDate(@RequestBody JSONObject requestJson) {
+        Result<JSONArray> result = new Result<>();
+        try {
+            Long accountId = requestJson.getLong("accountId");
+            if (Check.isNull(accountId)) {
+                throw new Exception("请传入账户id");
+            }
+            CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
+            if (Check.isNull(oauthToken)) {
+                throw new Exception("未获取到账户信息");
+            }
+            Long unitId = requestJson.getLong("unitId");
+            if (Check.isNull(unitId)) {
+                throw new Exception("请传入组id");
+            }
+            String startDate = requestJson.getString("startDate");
+            String endDate = requestJson.getString("endDate");
+            if (Check.isNull(startDate) || Check.isNull(endDate)) {
+                throw new Exception("请选择开始、结束查询时间");
+            }
+            JSONArray unitData = realTimeDataService.getUnitDate(accountId, oauthToken.getAccessToken(), unitId, startDate, endDate);
+            result.setSuccess(true);
+            result.setResult(unitData);
+        } catch (Exception e) {
+            result.setSuccess(false);
+            result.setMessage(e.getMessage());
+        }
+
+        return result;
+    }
+
+}

+ 9 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaishouRealTimeDataService.java

@@ -0,0 +1,9 @@
+package cn.com.ctop.kuaishou.modules.batch.service;
+
+import com.alibaba.fastjson.JSONArray;
+
+public interface IKuaishouRealTimeDataService {
+    JSONArray getCampaignDate(Long accountId, String token, Long campaignId, String startDate, String endDate);
+
+    JSONArray getUnitDate(Long accountId, String token, Long unitId, String startDate, String endDate);
+}

+ 110 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouRealTimeDataServiceImpl.java

@@ -0,0 +1,110 @@
+package cn.com.ctop.kuaishou.modules.batch.service.impl;
+
+import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.HttpUtils;
+import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
+import cn.com.ctop.common.module.utils.PropertiesUtils;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouRealTimeDataService;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Service
+public class KuaishouRealTimeDataServiceImpl implements IKuaishouRealTimeDataService {
+    /**
+     * 获取计划实时数据
+     *
+     * @param accountId
+     * @param token
+     * @param campaignId
+     * @param startDate
+     * @param endDate
+     * @return
+     */
+    @Override
+    public JSONArray getCampaignDate(Long accountId, String token, Long campaignId, String startDate, String endDate) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CAMPAIGN_REPORT;
+        Map<String, String> headers = new HashMap<>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", token);
+        Map<String, Object> param = new HashMap<>();
+        param.put("start_date", startDate);
+        param.put("end_date", endDate);
+        param.put("advertiser_id", accountId);
+        param.put("temporal_granularity", "DAILY");
+        param.put("page_size", 2000);
+        param.put("page", 1);
+
+        JSONArray array = new JSONArray();
+        array.add(campaignId);
+        param.put("campaign_ids", array);
+        try {
+            String result = HttpUtils.httpPostRequest(url, param, headers);
+            System.err.println(result);
+            JSONObject jsonObject = JSONObject.parseObject(result);
+            if (!Check.isNull(jsonObject)) {
+                Integer code = jsonObject.getInteger("code");
+                if (code == 0) {
+                    JSONObject data = jsonObject.getJSONObject("data");
+                    if (!Check.isNull(data)) {
+                        return data.getJSONArray("details");
+                    }
+
+                }
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * 获取组实时数据
+     *
+     * @param accountId
+     * @param token
+     * @param unitId
+     * @param startDate
+     * @param endDate
+     * @return
+     */
+    @Override
+    public JSONArray getUnitDate(Long accountId, String token, Long unitId, String startDate, String endDate) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.GTOUP_REPORT;
+        Map<String, String> headers = new HashMap<>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", token);
+        Map<String, Object> param = new HashMap<>();
+        param.put("start_date", startDate);
+        param.put("end_date", endDate);
+        param.put("advertiser_id", accountId);
+        param.put("temporal_granularity", "DAILY");
+        param.put("page_size", 2000);
+        param.put("page", 1);
+
+        JSONArray array = new JSONArray();
+        array.add(unitId);
+        param.put("unit_ids", array);
+        try {
+            String result = HttpUtils.httpPostRequest(url, param, headers);
+            JSONObject jsonObject = JSONObject.parseObject(result);
+            if (!Check.isNull(jsonObject)) {
+                Integer code = jsonObject.getInteger("code");
+                if (code == 0) {
+                    JSONObject data = jsonObject.getJSONObject("data");
+                    if (!Check.isNull(data)) {
+                        return data.getJSONArray("details");
+                    }
+                }
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+}