Commit 1910d479 by 徐高华

add

parent 1ac71de5
......@@ -12,24 +12,20 @@ import org.springframework.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
@Service("qywxSelfApiService")
public class QywxSelfApiServiceImpl implements QywxSelfApiService {
public class QywxSelfApiServiceImpl {
private Logger logger = LogManager.getLogger(QywxSelfApiServiceImpl.class);
@Override
public Map<String,Object> selfPost(String url, String json, String ip) {
logger.info("自建post,url={},json={},{}", url, json,ip);
Map<String, Object> map = HttpClient.getWinxinResByJson(url, json, getIp(ip) , ip);
return map;
}
@Override
public Map<String,Object> selfGet(String url, String ip) {
logger.info("自建get,url={},ip={}", url,ip);
Map<String, Object> map = HttpClient.getHttpByGet(url, getIp(ip) , ip);
return map;
}
@Override
public Map<String,Object> selfUpload(String url, String fileUrl, String fileName, String ip) {
logger.info("自建upload,url={},fileUrl={},ip={}", url,fileUrl,ip);
byte[] data = CommonUtil.getFileByte(fileUrl);
......@@ -38,7 +34,6 @@ public class QywxSelfApiServiceImpl implements QywxSelfApiService {
Map<String, Object> map = HttpClient.getWinxinResByFile(url, paramsMap, getIp(ip) , ip);
return map;
}
@Override
public Map<String,Object> selfImage(String url, String fileName, String ip , byte[] data) {
logger.info("自建upload-data,url={},ip={}", url,ip);
Map<String, ContentBody> paramsMap = new HashMap<String, ContentBody>();
......
......@@ -8,11 +8,13 @@
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<context:component-scan base-package="com.gic.qywx.*"/>
<dubbo:application name="gic-qywx-self"/>
<!-- 用dubbo协议在20880端口暴露服务 -->
<!--
<context:component-scan base-package="com.gic.qywx.*"/>
<dubbo:protocol name="dubbo" port="20130" />
<dubbo:service interface="com.gic.haoban.manage.api.service.QywxSelfApiService" ref="qywxSelfApiService" retries="0"/>
-->
</beans>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment