dev798
parent
a0ab257929
commit
fb716982f1
|
@ -7,8 +7,10 @@ import com.muyu.product.domain.DTO.Services;
|
||||||
import com.muyu.product.domain.vo.ProductCategoryVo;
|
import com.muyu.product.domain.vo.ProductCategoryVo;
|
||||||
import com.muyu.product.service.ArgumentService;
|
import com.muyu.product.service.ArgumentService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@ -29,20 +31,23 @@ public class ArgumentController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ArgumentService argumentService;
|
private ArgumentService argumentService;
|
||||||
|
|
||||||
@GetMapping("/queryBrand")
|
@ApiOperation("品牌下拉框查询")
|
||||||
public AjaxResult queryBrand(){
|
@GetMapping("/queryBrand/{brandName}")
|
||||||
List<Brand>list = argumentService.queryBrand();
|
public AjaxResult queryBrand(@PathVariable String brandName){
|
||||||
|
List<Brand>list = argumentService.queryBrand(brandName);
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/queryService")
|
@GetMapping("/queryService")
|
||||||
|
@ApiOperation("查询服务")
|
||||||
public AjaxResult queryService(){
|
public AjaxResult queryService(){
|
||||||
List<Services>list=argumentService.queryService();
|
List<Services>list=argumentService.queryService();
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/queryCategory")
|
@GetMapping("/queryCategory")
|
||||||
|
@ApiOperation("分类查询")
|
||||||
public R<List<ProductCategoryVo>>queryCategory(){
|
public R<List<ProductCategoryVo>>queryCategory(){
|
||||||
return R.ok(argumentService.queryCategory());
|
return R.ok(argumentService.queryCategory());
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.muyu.product.domain.DTO.Brand;
|
||||||
import com.muyu.product.domain.DTO.Category;
|
import com.muyu.product.domain.DTO.Category;
|
||||||
import com.muyu.product.domain.DTO.Services;
|
import com.muyu.product.domain.DTO.Services;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -13,7 +14,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface ArgumentMapper {
|
public interface ArgumentMapper {
|
||||||
List<Brand> queryBrand();
|
List<Brand> queryBrand(@PathVariable String brandName);
|
||||||
|
|
||||||
List<Services> queryService();
|
List<Services> queryService();
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import java.util.List;
|
||||||
* @Date: 2024/3/29 17:05
|
* @Date: 2024/3/29 17:05
|
||||||
*/
|
*/
|
||||||
public interface ArgumentService {
|
public interface ArgumentService {
|
||||||
List<Brand> queryBrand();
|
List<Brand> queryBrand(String brandName);
|
||||||
|
|
||||||
List<Services> queryService();
|
List<Services> queryService();
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ public class ArgumentServiceImpl implements ArgumentService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ArgumentMapper argumentMapper;
|
private ArgumentMapper argumentMapper;
|
||||||
@Override
|
@Override
|
||||||
public List<Brand> queryBrand() {
|
public List<Brand> queryBrand(String brandName) {
|
||||||
return argumentMapper.queryBrand();
|
return argumentMapper.queryBrand(brandName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -22,11 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="queryService" resultType="com.muyu.product.domain.DTO.Services">
|
<select id="queryService" resultType="com.muyu.product.domain.DTO.Services">
|
||||||
select id,service_name from
|
select id,service_name from
|
||||||
t_product_service
|
t_product_service where id_delete =1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryCategory" resultType="com.muyu.product.domain.DTO.Category">
|
<select id="queryCategory" resultType="com.muyu.product.domain.DTO.Category">
|
||||||
select id,parent_id,category_name from t_product_category
|
select id,parent_id,category_name from t_product_category where id_delete =1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue