|
|
@@ -11,6 +11,7 @@ import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.BusinessType;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.mapper.GoodsDonSkuMapper;
|
|
|
+import com.cyksj.model.entity.BackInfoTranslations;
|
|
|
import com.cyksj.model.entity.GoodsDon;
|
|
|
import com.cyksj.model.entity.GoodsDonCategory;
|
|
|
import com.cyksj.model.entity.GoodsDonSku;
|
|
|
@@ -23,6 +24,7 @@ import com.cyksj.service.mange.CmsGoodsDonService;
|
|
|
import com.cyksj.service.mange.GoodsDonCategoryService;
|
|
|
import com.cyksj.service.mange.RefreshCacheService;
|
|
|
import com.cyksj.service.translations.BackInfoTranslationsFrontService;
|
|
|
+import com.cyksj.service.translations.BackInfoTranslationsService;
|
|
|
import com.ejlchina.searcher.BeanSearcher;
|
|
|
import com.ejlchina.searcher.SearchResult;
|
|
|
import com.ejlchina.searcher.param.Operator;
|
|
|
@@ -64,6 +66,8 @@ public class CmsGoodsDonController {
|
|
|
|
|
|
private final BackInfoTranslationsFrontService backInfoTranslationsFrontService;
|
|
|
|
|
|
+ private final BackInfoTranslationsService backInfoTranslationsService;
|
|
|
+
|
|
|
@GetMapping("/get")
|
|
|
public Result<SearchResult<GoodsDonCategoryDetailView>> get(){
|
|
|
SearchResult<GoodsDonCategoryDetailView> search = beanSearcher.search(GoodsDonCategoryDetailView.class, MapUtils.flatBuilder(request.getParameterMap())
|
|
|
@@ -171,6 +175,10 @@ public class CmsGoodsDonController {
|
|
|
goodsDonCategoryService.handleGoodsRelate(goods.getId(), spu.getCategoryList());
|
|
|
goodsDonService.updateById(goods);
|
|
|
refreshCacheService.refreshYhHomePageCache();
|
|
|
+ String lang = request.getHeader("lang");
|
|
|
+ if (!StrUtil.equals(UserPageLanguage.Language.zh_HK.name(), lang)) {
|
|
|
+ backInfoTranslationsService.saveOrUpdateBackInfoTranslations(BackInfoTranslations.Type.goods, goods.getId(), goods, lang);
|
|
|
+ }
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
|
|