Commit 59ebac6c by 吕明尚

删除店员,删除关联的门店

parent 67c7dedd
......@@ -44,7 +44,9 @@ public class TiktokServiceImpl implements TiktokService {
tokenMap.put("client_key", CLIENT_KEY);
tokenMap.put("client_secret", CLIENT_SECRET);
tokenMap.put("grant_type", "client_credentials");
String post = HttpUtil.post(url, tokenMap);
String post = HttpRequest.post(url)
.contentType("application/json")
.body(new JSONObject(tokenMap).toString()).execute().body();
JSONObject sessionKey = new JSONObject(post);
JSONObject dataJson = sessionKey.getJSONObject("data");
String errorCode = dataJson.getStr("error_code");
......@@ -100,28 +102,6 @@ public class TiktokServiceImpl implements TiktokService {
return data.getStr("verify_token");
}
public static void main(String[] args) {
String url = "<a href=\"https://www.iesdouyin.com/share/commerce/" +
"coupon/I0duaGdVYnp0RitYekxkNm11VHl3WUVCM2wvWXNmNEZDcXZ3aGZDYm9ka3R2VjdualNOT1VGVzMxUkxmdWowTVp2VWVBams1OFAyK3YrMm4yc0lhQm90a0hPb1ZNRFk5V3VxTkhIV3hZTHQyelByMFJ5R2YzSy9FRjZXNDgvMTBXVno1NW5MaFFOYzRQbnFtRExpZGF5YzI4aTdBK3d6dnk3eFBUTVd2VkRRZkM/" +
"?schema_type=13&amp;" +
"object_id=I0duaGdVYnp0RitYekxkNm11VHl3WUVCM2wvWXNmNEZDcXZ3aGZDYm9ka3R2VjdualNOT1VGVzMxUkxmdWowTVp2VWVBams1OFAyK3YrMm4yc0lhQm90a0hPb1ZNRFk5V3VxTkhIV3hZTHQyelByMFJ5R2YzSy9FRjZXNDgvMTBXVno1NW5MaFFOYzRQbnFtRExpZGF5YzI4aTdBK3d6dnk3eFBUTVd2VkRRZkM&amp;" +
"utm_campaign=client_scan_share&amp;" +
"app=aweme&amp;" +
"utm_medium=ios&amp;" +
"tt_from=scan_share&amp;" +
"iid=&amp;" +
"utm_source=scan_share\">Found</a>.";
//截取中间的object_id=到&amp;之间的字符串
Pattern pattern = Pattern.compile("object_id=([^&]*)");
Matcher matcher = pattern.matcher(url);
if (matcher.find()) {
String objectId = matcher.group(1);
System.out.println(objectId);
} else {
System.out.println("No match found");
}
}
@Override
public String verify(TiktokCouponDto tiktokCouponDto) {
String accessToken = obtain();
......
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