Commit b15c58dd by 田超

Merge branch 'feature/1002988-3' into 'master'

bug: [1002988-3] 更换新账号的appcode

See merge request rays/pcloud-book!774
parents ff277847 4730c9df
...@@ -56,6 +56,7 @@ import org.apache.http.HttpResponse; ...@@ -56,6 +56,7 @@ import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -95,6 +96,8 @@ public class BookBrowseRecordBizImpl implements BookBrowseRecordBiz { ...@@ -95,6 +96,8 @@ public class BookBrowseRecordBizImpl implements BookBrowseRecordBiz {
private IpDataMapper ipDataMapper; private IpDataMapper ipDataMapper;
@Autowired @Autowired
private BookScanCountConsr bookScanCountConsr; private BookScanCountConsr bookScanCountConsr;
@Value("${ip.appcode}")
private String appCode;
@Override @Override
@ParamLog("读者书籍埋点记录") @ParamLog("读者书籍埋点记录")
...@@ -301,9 +304,8 @@ public class BookBrowseRecordBizImpl implements BookBrowseRecordBiz { ...@@ -301,9 +304,8 @@ public class BookBrowseRecordBizImpl implements BookBrowseRecordBiz {
String host = "https://api01.aliyun.venuscn.com"; String host = "https://api01.aliyun.venuscn.com";
String path = "/ip"; String path = "/ip";
String method = "GET"; String method = "GET";
String appcode = "7936c69d4d0943f398bc73b3b3406fe2";
Map<String, String> headers = new HashMap<String, String>(); Map<String, String> headers = new HashMap<String, String>();
headers.put("Authorization", "APPCODE " + appcode); headers.put("Authorization", "APPCODE " + appCode);
Map<String, String> querys = new HashMap<String, String>(); Map<String, String> querys = new HashMap<String, String>();
querys.put("ip", bookBrowseRecord.getIp()); querys.put("ip", bookBrowseRecord.getIp());
//先从数据库查询,没有再查询第三方 //先从数据库查询,没有再查询第三方
......
...@@ -9,3 +9,5 @@ isbn.appCode = 26ddebd7827448b798bdc6c4738be0ff ...@@ -9,3 +9,5 @@ isbn.appCode = 26ddebd7827448b798bdc6c4738be0ff
# isbn\u5bc6\u94a5 # isbn\u5bc6\u94a5
isbn.jisu.appkey = 37c80a8116e3349e isbn.jisu.appkey = 37c80a8116e3349e
ip.appcode = 26ddebd7827448b798bdc6c4738be0ff
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