|
|
@@ -0,0 +1,44 @@
|
|
|
+package com.gubersail.admin.fegin;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.gubersail.admin.goods.mapper.BrandDescMapper;
|
|
|
+import com.gubersail.dealer.admin.api.fegin.IGoodsBrandClient;
|
|
|
+import com.gubersail.dealer.admin.api.goods.entity.PjBrandDesc;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import org.springblade.core.tenant.annotation.NonDS;
|
|
|
+import org.springblade.core.tool.api.R;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author Rain
|
|
|
+ */
|
|
|
+@NonDS
|
|
|
+@RestController
|
|
|
+@AllArgsConstructor
|
|
|
+public class GoodsBrandClient implements IGoodsBrandClient {
|
|
|
+
|
|
|
+
|
|
|
+ private final BrandDescMapper brandDescMapper;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public R addBrandList(List<PjBrandDesc> brandDescList) {
|
|
|
+ for (PjBrandDesc item : brandDescList) {
|
|
|
+ brandDescMapper.insert(item);
|
|
|
+ }
|
|
|
+ return R.success("");
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<PjBrandDesc> getBrandList(PjBrandDesc pjBrandDesc) {
|
|
|
+ return brandDescMapper.selectList(new LambdaQueryWrapper<PjBrandDesc>()
|
|
|
+ .eq(PjBrandDesc::getTenantId, pjBrandDesc.getTenantId())
|
|
|
+ .eq(PjBrandDesc::getType, "PP")
|
|
|
+ .eq(PjBrandDesc::getEnableOrNot, 1)
|
|
|
+ .eq(PjBrandDesc::getIsDeleted, 0)
|
|
|
+ .eq(PjBrandDesc::getCname, pjBrandDesc.getCname())
|
|
|
+ .eq(PjBrandDesc::getCreateDept, pjBrandDesc.getCreateDept()));
|
|
|
+ }
|
|
|
+
|
|
|
+}
|