diff --git a/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java b/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java index 2c5df53..127eb6c 100644 --- a/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java +++ b/src/main/java/com/yxt/yythmall/config/SaTokenConfigure.java @@ -82,6 +82,7 @@ public class SaTokenConfigure implements WebMvcConfigurer { .excludePathPatterns("/lpkcustomer/getPhoneNumber") .excludePathPatterns("/lpkcustomer/getRealInfo/**") .excludePathPatterns("/lpkcustomer/saveRealInfo") + .excludePathPatterns("/pms/PmsBrand/getList") ; } } diff --git a/src/main/java/com/yxt/yythmall/mallplus/biz/pms/controller/PmsBrandController.java b/src/main/java/com/yxt/yythmall/mallplus/biz/pms/controller/PmsBrandController.java index 285cf5f..b4d2dc0 100644 --- a/src/main/java/com/yxt/yythmall/mallplus/biz/pms/controller/PmsBrandController.java +++ b/src/main/java/com/yxt/yythmall/mallplus/biz/pms/controller/PmsBrandController.java @@ -3,8 +3,10 @@ package com.yxt.yythmall.mallplus.biz.pms.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; // import com.zscat.mallplus.annotation.SysLog; +import com.yxt.common.core.result.ResultBean; import com.yxt.yythmall.mallplus.mbg.pms.entity.PmsBrand; import com.yxt.yythmall.mallplus.biz.pms.service.IPmsBrandService; +import com.yxt.yythmall.mallplus.mbg.pms.entity.brand.BrandVo; import com.zscat.mallplus.utils.CommonResult; import com.zscat.mallplus.utils.ValidatorUtils; import io.swagger.annotations.Api; @@ -159,4 +161,10 @@ public class PmsBrandController { return new CommonResult().failed(); } } + + @ApiOperation(value = "获取品牌") + @GetMapping("/getList") + ResultBean> getList(){ + return IPmsBrandService.getList(); + } } diff --git a/src/main/java/com/yxt/yythmall/mallplus/biz/pms/service/IPmsBrandService.java b/src/main/java/com/yxt/yythmall/mallplus/biz/pms/service/IPmsBrandService.java index 1d45db7..ef403d3 100644 --- a/src/main/java/com/yxt/yythmall/mallplus/biz/pms/service/IPmsBrandService.java +++ b/src/main/java/com/yxt/yythmall/mallplus/biz/pms/service/IPmsBrandService.java @@ -1,7 +1,9 @@ package com.yxt.yythmall.mallplus.biz.pms.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.yxt.common.core.result.ResultBean; import com.yxt.yythmall.mallplus.mbg.pms.entity.PmsBrand; +import com.yxt.yythmall.mallplus.mbg.pms.entity.brand.BrandVo; import java.util.List; @@ -18,4 +20,6 @@ public interface IPmsBrandService extends IService { int updateShowStatus(List ids, Integer showStatus); int updateFactoryStatus(List ids, Integer factoryStatus); + + ResultBean> getList(); } diff --git a/src/main/java/com/yxt/yythmall/mallplus/biz/pms/service/impl/PmsBrandServiceImpl.java b/src/main/java/com/yxt/yythmall/mallplus/biz/pms/service/impl/PmsBrandServiceImpl.java index a3d6f50..5bebbb9 100644 --- a/src/main/java/com/yxt/yythmall/mallplus/biz/pms/service/impl/PmsBrandServiceImpl.java +++ b/src/main/java/com/yxt/yythmall/mallplus/biz/pms/service/impl/PmsBrandServiceImpl.java @@ -2,7 +2,9 @@ package com.yxt.yythmall.mallplus.biz.pms.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.yxt.common.core.result.ResultBean; import com.yxt.yythmall.mallplus.mbg.pms.entity.PmsBrand; +import com.yxt.yythmall.mallplus.mbg.pms.entity.brand.BrandVo; import com.yxt.yythmall.mallplus.mbg.pms.mapper.PmsBrandMapper; import com.yxt.yythmall.mallplus.biz.pms.service.IPmsBrandService; import org.springframework.stereotype.Service; @@ -37,4 +39,11 @@ public class PmsBrandServiceImpl extends ServiceImpl i pmsBrand.setFactoryStatus(factoryStatus); return brandMapper.update(pmsBrand, new QueryWrapper().in("id", ids)); } + + @Override + public ResultBean> getList() { + ResultBean> rb = ResultBean.fireFail(); + List brandVoList = baseMapper.getList(); + return rb.success().setData(brandVoList); + } } diff --git a/src/main/java/com/yxt/yythmall/mallplus/mbg/pms/entity/brand/BrandVo.java b/src/main/java/com/yxt/yythmall/mallplus/mbg/pms/entity/brand/BrandVo.java new file mode 100644 index 0000000..f818e6f --- /dev/null +++ b/src/main/java/com/yxt/yythmall/mallplus/mbg/pms/entity/brand/BrandVo.java @@ -0,0 +1,18 @@ +package com.yxt.yythmall.mallplus.mbg.pms.entity.brand; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: + * @author: dimengzhe + * @date: 2024/1/19 + **/ +@Data +public class BrandVo { + + @ApiModelProperty("品牌名称") + private String brandName; + @ApiModelProperty("品牌id") + private String id; +} diff --git a/src/main/java/com/yxt/yythmall/mallplus/mbg/pms/mapper/PmsBrandMapper.java b/src/main/java/com/yxt/yythmall/mallplus/mbg/pms/mapper/PmsBrandMapper.java index 1dce95e..0142c0b 100644 --- a/src/main/java/com/yxt/yythmall/mallplus/mbg/pms/mapper/PmsBrandMapper.java +++ b/src/main/java/com/yxt/yythmall/mallplus/mbg/pms/mapper/PmsBrandMapper.java @@ -2,8 +2,11 @@ package com.yxt.yythmall.mallplus.mbg.pms.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.yxt.yythmall.mallplus.mbg.pms.entity.PmsBrand; +import com.yxt.yythmall.mallplus.mbg.pms.entity.brand.BrandVo; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** *

* 品牌表 Mapper 接口 @@ -15,4 +18,5 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface PmsBrandMapper extends BaseMapper { + List getList(); } diff --git a/src/main/java/com/yxt/yythmall/mallplus/mbg/pms/mapper/PmsBrandMapper.xml b/src/main/java/com/yxt/yythmall/mallplus/mbg/pms/mapper/PmsBrandMapper.xml index b50f176..1abbb53 100644 --- a/src/main/java/com/yxt/yythmall/mallplus/mbg/pms/mapper/PmsBrandMapper.xml +++ b/src/main/java/com/yxt/yythmall/mallplus/mbg/pms/mapper/PmsBrandMapper.xml @@ -23,4 +23,7 @@ brand_story +