|
|
|
@ -5,6 +5,8 @@ import cn.yixblog.platform.http.HttpRequestGenerator;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.yeepay.shade.org.apache.http.protocol.HTTP;
|
|
|
|
|
import org.apache.http.entity.StringEntity;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
@ -18,6 +20,7 @@ import java.net.URISyntaxException;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
public class PosterServiceImpl implements PosterService {
|
|
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
@Value("${app.cms.host}")
|
|
|
|
|
private String cmsHost;
|
|
|
|
|
|
|
|
|
@ -25,7 +28,9 @@ public class PosterServiceImpl implements PosterService {
|
|
|
|
|
public void updatePoster(String imgUrl) {
|
|
|
|
|
String url = cmsHost + "/api/statistics/count";
|
|
|
|
|
try {
|
|
|
|
|
logger.info("Before : Request CMS service");
|
|
|
|
|
new HttpRequestGenerator(url, RequestMethod.PUT).addQueryString("imgUrl", imgUrl).execute();
|
|
|
|
|
logger.info("Before : Request CMS service");
|
|
|
|
|
}catch (URISyntaxException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|