10 changed files with 247 additions and 1 deletions
			
			
		| @ -0,0 +1,55 @@ | ||||
| /** | ||||
|  * Copyright (C) 2018-2022 | ||||
|  * All rights reserved, Designed By www.yixiang.co | ||||
|  * 注意: | ||||
|  * 本软件为www.yixiang.co开发研制,未经购买不得使用 | ||||
|  * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) | ||||
|  * 一经发现盗用、分享等行为,将追究法律责任,后果自负 | ||||
|  */ | ||||
| package co.yixiang.app.modules.expert.rest; | ||||
| 
 | ||||
| import co.yixiang.annotation.AnonymousAccess; | ||||
| import cn.iocoder.yudao.framework.common.pojo.ApiResult; | ||||
| import co.yixiang.modules.expert.domain.YxStoreExpert; | ||||
| import co.yixiang.modules.expert.service.YxStoreExpertService; | ||||
| import co.yixiang.utils.CateDTO; | ||||
| import co.yixiang.utils.location.ExpertDTO; | ||||
| import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiOperation; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.GetMapping; | ||||
| import org.springframework.web.bind.annotation.RestController; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| /** | ||||
|  * <p> | ||||
|  * 专家前端控制器 | ||||
|  * </p> | ||||
|  * | ||||
|  * @author ssj | ||||
|  * @since 2022-9-20 | ||||
|  */ | ||||
| @Slf4j | ||||
| @RestController | ||||
| @Api(value = "店内专家", tags = "商城:专家") | ||||
| @RequiredArgsConstructor(onConstructor = @__(@Autowired)) | ||||
| public class AppStoreExpertController { | ||||
| 
 | ||||
|     private final YxStoreExpertService yxStoreExpertService; | ||||
| 
 | ||||
| 
 | ||||
|     /** | ||||
|      * 商品分类列表 | ||||
|      */ | ||||
|     @AnonymousAccess | ||||
|     @GetMapping("/expert") | ||||
|     @ApiOperation(value = "专家列表",notes = "专家列表") | ||||
|     public ApiResult<List<ExpertDTO>> getYxStoreExpertPageList(){ | ||||
|         return ApiResult.ok(yxStoreExpertService.getList()); | ||||
|     } | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| @ -0,0 +1,42 @@ | ||||
| package co.yixiang.app.modules.product.rest; | ||||
| 
 | ||||
| import cn.iocoder.yudao.framework.common.pojo.ApiResult; | ||||
| import co.yixiang.annotation.AnonymousAccess; | ||||
| import co.yixiang.modules.store.service.YxStoreBrandService; | ||||
| import co.yixiang.utils.location.BrandDTO; | ||||
| import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiOperation; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.GetMapping; | ||||
| import org.springframework.web.bind.annotation.RestController; | ||||
| 
 | ||||
| import java.util.List; | ||||
| 
 | ||||
| /** | ||||
|  * <p> | ||||
|  * 商品品牌前端控制器 | ||||
|  * </p> | ||||
|  * | ||||
|  * @author ssj | ||||
|  * @since 2022-9-20 | ||||
|  */ | ||||
| @Slf4j | ||||
| @RestController | ||||
| @Api(value = "商品品牌", tags = "商城:商品品牌") | ||||
| @RequiredArgsConstructor(onConstructor = @__(@Autowired)) | ||||
| public class AppStoreBrandController { | ||||
| 
 | ||||
|     private final YxStoreBrandService yxStoreBrandService; | ||||
| 
 | ||||
|     /** | ||||
|      * 商品品牌列表 | ||||
|      */ | ||||
|     @AnonymousAccess | ||||
|     @GetMapping("/brand") | ||||
|     @ApiOperation(value = "商品品牌列表",notes = "商品品牌列表") | ||||
|     public ApiResult<List<BrandDTO>> getYxStoreBrandPageList(){ | ||||
|         return ApiResult.ok(yxStoreBrandService.getList()); | ||||
|     } | ||||
| } | ||||
| @ -0,0 +1,33 @@ | ||||
| package co.yixiang.utils.location; | ||||
| import java.io.Serializable; | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
| 
 | ||||
| /** | ||||
|  * <p> | ||||
|  * 商城品牌分类 | ||||
|  * </p> | ||||
|  * | ||||
|  * @author ssj | ||||
|  * @since 2022-9-20 | ||||
|  */ | ||||
| public class BrandDTO implements Serializable { | ||||
| 
 | ||||
|     private static final long serialVersionUID = 1L; | ||||
| 
 | ||||
| 
 | ||||
|     private Long id; | ||||
| 
 | ||||
|     /** | ||||
|      * 商品分类名称 | ||||
|      */ | ||||
|     private String brandName; | ||||
| 
 | ||||
|     /** | ||||
|      * 缩略图url | ||||
|      */ | ||||
|     private String pic; | ||||
| 
 | ||||
|     private List<BrandDTO> children = new ArrayList<>(); | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,61 @@ | ||||
| /** | ||||
|  * Copyright (C) 2018-2022 | ||||
|  * All rights reserved, Designed By www.yixiang.co | ||||
| 
 | ||||
|  */ | ||||
| package co.yixiang.utils.location; | ||||
| 
 | ||||
| 
 | ||||
| import lombok.Data; | ||||
| 
 | ||||
| import java.io.Serializable; | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
| 
 | ||||
| 
 | ||||
| /** | ||||
|  * <p> | ||||
|  * 商城商品分类 | ||||
|  * </p> | ||||
|  * | ||||
|  * @author hupeng | ||||
|  * @since 2019-09-08 | ||||
|  */ | ||||
| @Data | ||||
| public class ExpertDTO implements Serializable { | ||||
| 
 | ||||
|     private static final long serialVersionUID = 1L; | ||||
| 
 | ||||
| 
 | ||||
|     private Long id; | ||||
| 
 | ||||
|     /** | ||||
|      * 专家名称 | ||||
|      */ | ||||
|     private String expertName; | ||||
| 
 | ||||
|     /** | ||||
|      * 专家简介 | ||||
|      */ | ||||
|     private String expertInfo; | ||||
| 
 | ||||
|     /** | ||||
|      * 专家的职级 | ||||
|      */ | ||||
|     private String expertStatus; | ||||
| 
 | ||||
|     /** | ||||
|      * 专家所属单位 | ||||
|      */ | ||||
|     private String expertUnit; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     /** | ||||
|      * 专家人像大图 | ||||
|      */ | ||||
|     private String image; | ||||
| 
 | ||||
|     private List<ExpertDTO> children = new ArrayList<>(); | ||||
| 
 | ||||
| } | ||||
					Loading…
					
					
				
		Reference in new issue