获取品牌
This commit is contained in:
@@ -82,6 +82,7 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
||||
.excludePathPatterns("/lpkcustomer/getPhoneNumber")
|
||||
.excludePathPatterns("/lpkcustomer/getRealInfo/**")
|
||||
.excludePathPatterns("/lpkcustomer/saveRealInfo")
|
||||
.excludePathPatterns("/pms/PmsBrand/getList")
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<List<BrandVo>> getList(){
|
||||
return IPmsBrandService.getList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<PmsBrand> {
|
||||
int updateShowStatus(List<Long> ids, Integer showStatus);
|
||||
|
||||
int updateFactoryStatus(List<Long> ids, Integer factoryStatus);
|
||||
|
||||
ResultBean<List<BrandVo>> getList();
|
||||
}
|
||||
|
||||
@@ -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<PmsBrandMapper, PmsBrand> i
|
||||
pmsBrand.setFactoryStatus(factoryStatus);
|
||||
return brandMapper.update(pmsBrand, new QueryWrapper<PmsBrand>().in("id", ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<BrandVo>> getList() {
|
||||
ResultBean<List<BrandVo>> rb = ResultBean.fireFail();
|
||||
List<BrandVo> brandVoList = baseMapper.getList();
|
||||
return rb.success().setData(brandVoList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 品牌表 Mapper 接口
|
||||
@@ -15,4 +18,5 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface PmsBrandMapper extends BaseMapper<PmsBrand> {
|
||||
|
||||
List<BrandVo> getList();
|
||||
}
|
||||
|
||||
@@ -23,4 +23,7 @@
|
||||
brand_story
|
||||
</sql>
|
||||
|
||||
<select id="getList" resultType="com.yxt.yythmall.mallplus.mbg.pms.entity.brand.BrandVo">
|
||||
select name brandName,id from pms_brand
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user