|
@@ -5,7 +5,9 @@ import cn.rankin.common.utils.api.model.BaseCode;
|
|
|
import cn.rankin.common.utils.api.page.Page;
|
|
|
import cn.rankin.data.api.app.vo.ItemVo;
|
|
|
import cn.rankin.data.api.app.vo.TagGroupVo;
|
|
|
+import cn.rankin.data.api.app.vo.TagTypeVo;
|
|
|
import cn.rankin.data.api.product.entity.TagGroup;
|
|
|
+import cn.rankin.data.api.product.entity.TagType;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -27,7 +29,20 @@ public class TagService {
|
|
|
return APIResult.ok(tagGroupVo);
|
|
|
}
|
|
|
|
|
|
+ public APIResult<TagTypeVo> findTagTypeByCode(String code, String merchantId) {
|
|
|
+ APIResult<TagType> apiResult = tagClient.findTagTypeByCode(code,merchantId);
|
|
|
+ if (!apiResult.getSuccess()) {
|
|
|
+ return APIResult.error(new BaseCode(apiResult.getCode(), apiResult.getMessage()));
|
|
|
+ }
|
|
|
+ TagType tagType = apiResult.getData();
|
|
|
+ TagTypeVo tagTypeVo = convert(tagType);
|
|
|
+ return APIResult.ok(tagTypeVo);
|
|
|
+ }
|
|
|
+
|
|
|
public APIResult<Page<ItemVo>> findPageByTagId(String tagId, String merchantId, Integer pageNo, Integer pageSize) {
|
|
|
return tagClient.findPageByTagId(tagId, merchantId, pageNo, pageSize);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|