|
@@ -133,16 +133,20 @@ public class SeoKeywordsController extends JeecgController<SeoKeywords, ISeoKeyw
|
|
|
// @PreAuthorize("@jps.requiresPermissions('seo:seo_keywords:add')")
|
|
|
@PostMapping(value = "/add")
|
|
|
public Result<String> add(@RequestBody SeoKeywords seoKeywords) {
|
|
|
- // AdwebSite siteByCode = adwebSiteService.getSiteByCode(seoKeywords.getSiteCode());
|
|
|
- // if (siteByCode == null) {
|
|
|
- // return Result.error("未找到对应站点");
|
|
|
- // }
|
|
|
+ AdwebSite site = adwebSiteService.getSiteByCode(seoKeywords.getSiteCode());
|
|
|
+ if (site == null) {
|
|
|
+ return Result.error("未找到对应站点");
|
|
|
+ }
|
|
|
+
|
|
|
seoKeywords.setAppKey(AdwebConstant.APPKEY);
|
|
|
- // 根据siteCode获取站点域名
|
|
|
- // String domain = siteByCode.getDomain();
|
|
|
- // seoKeywords.setDomain(domain);
|
|
|
+ seoKeywords.setDomain(site.getDomain());
|
|
|
seoKeywords.setStatus(1);
|
|
|
- // seoKeywords.setLang("en");
|
|
|
+ seoKeywords.setPriority(3);
|
|
|
+ seoKeywords.setOptimizeProcess(0);
|
|
|
+ seoKeywords.setOptimizeStatus(0);
|
|
|
+ seoKeywords.setLastRank(0);
|
|
|
+ seoKeywords.setSearchStatus(0);
|
|
|
+
|
|
|
seoKeywordsService.save(seoKeywords);
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
@@ -452,7 +456,7 @@ public class SeoKeywordsController extends JeecgController<SeoKeywords, ISeoKeyw
|
|
|
continue;
|
|
|
}
|
|
|
SeoKeywords seoKeywords = new SeoKeywords();
|
|
|
- seoKeywords.setAppKey("adweb");
|
|
|
+ seoKeywords.setAppKey(AdwebConstant.APPKEY);
|
|
|
seoKeywords.setSiteCode(site.getCode());
|
|
|
seoKeywords.setKeywords(value2);
|
|
|
seoKeywords.setDomain(site.getDomain());
|