|
@@ -3,6 +3,7 @@ package com.zanxiang.game.module.manage.service.api;
|
|
import com.zanxiang.game.module.base.ServerInfo;
|
|
import com.zanxiang.game.module.base.ServerInfo;
|
|
import com.zanxiang.game.module.base.rpc.IWxApiServiceRpc;
|
|
import com.zanxiang.game.module.base.rpc.IWxApiServiceRpc;
|
|
import com.zanxiang.game.module.manage.pojo.dto.GameAppletDTO;
|
|
import com.zanxiang.game.module.manage.pojo.dto.GameAppletDTO;
|
|
|
|
+import com.zanxiang.game.module.manage.pojo.dto.KfUploadTempMediaDTO;
|
|
import com.zanxiang.game.module.manage.service.IGameAppletService;
|
|
import com.zanxiang.game.module.manage.service.IGameAppletService;
|
|
import com.zanxiang.module.util.JsonUtil;
|
|
import com.zanxiang.module.util.JsonUtil;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -105,10 +106,10 @@ public class KfWxApiService {
|
|
return Tuples.of(400L, e.getMessage());
|
|
return Tuples.of(400L, e.getMessage());
|
|
}
|
|
}
|
|
log.error("客服消息上传临时素材结果, result : {}", result);
|
|
log.error("客服消息上传临时素材结果, result : {}", result);
|
|
- Map<String, String> resultMap = JsonUtil.toMap(result, Map.class, String.class);
|
|
|
|
- //错误码
|
|
|
|
- long resultCode = Long.parseLong(resultMap.get("errcode"));
|
|
|
|
|
|
+ KfUploadTempMediaDTO resultDTO = JsonUtil.toObj(result, KfUploadTempMediaDTO.class);
|
|
|
|
+ log.error("客服消息上传临时素材结果, resultDTO : {}", resultDTO);
|
|
//返回
|
|
//返回
|
|
- return resultCode == 0 ? Tuples.of(resultCode, resultMap.get("media_id")) : Tuples.of(resultCode, resultMap.get("errmsg"));
|
|
|
|
|
|
+ return resultDTO.isSuccess() ? Tuples.of(resultDTO.getErrcode(), resultDTO.getMedia_id())
|
|
|
|
+ : Tuples.of(resultDTO.getErrcode(), resultDTO.getErrmsg());
|
|
}
|
|
}
|
|
}
|
|
}
|