!145 2022-2-08 Carl

Merge pull request !145 from Admin/sit-Carl-V3
This commit is contained in:
Admin 2022-02-08 08:21:26 +00:00 committed by Gitee
commit 156187d60d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 14 additions and 1 deletions

View File

@ -152,6 +152,11 @@ public class GoodController {
public String transferProductSearchTag() throws Exception {
return goodService.productSearchQuery();
}
@ApiOperation(value = "同步筛选标签信息", notes = "同步筛选标签信息")
@PostMapping("royalcanin/productSearchTag/remoteGetProductSearchTagData")
public void remoteGetProductSearchTagData() throws Exception {
goodService.remoteGetProductSearchTagData();
}
public ResponseDTO<String> addOperatreFullData(String type, String params, Long startTime, Long elapsedTime, Long acceptTime,String code,String msg)throws Exception{
SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

View File

@ -84,6 +84,15 @@ public class GoodService {
}
public String productSearchQuery()throws Exception{
Map<String, String> paramMap = new HashMap<>();
paramMap.put("secret","H5@2021");
paramMap.put("channelId","15");
String sb = SmartHttpUtil.sendPostForm(url+"productSearchTag/query",paramMap,null);
JSONObject jsonObject = JSONObject.parseObject(sb);
String result = AESUtil.decryptLinux(jsonObject.getString("data"), AESUtil.KEY);
return result;
}
public void remoteGetProductSearchTagData()throws Exception{
Map<String, String> paramMap = new HashMap<>();
paramMap.put("secret","H5@2021");
paramMap.put("channelId","15");
@ -105,7 +114,6 @@ public class GoodService {
productSearchTagEntity.setTagCode(jsonObjectResult.getString("tagCode"));
productSearchTagService.installAllSearchTag(productSearchTagEntity);
}
return result;
}