| | |
| | | |
| | | import cn.lili.common.aop.annotation.DemoSite; |
| | | import cn.lili.common.enums.ResultUtil; |
| | | import cn.lili.common.utils.StringUtils; |
| | | import cn.lili.common.vo.PageVO; |
| | | import cn.lili.common.vo.ResultMessage; |
| | | import cn.lili.modules.store.entity.dos.Store; |
| | |
| | | import cn.lili.modules.store.entity.vos.StoreVO; |
| | | import cn.lili.modules.store.service.StoreDetailService; |
| | | import cn.lili.modules.store.service.StoreService; |
| | | import cn.lili.utils.COSUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jodd.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @Autowired |
| | | private StoreDetailService storeDetailService; |
| | | |
| | | @Autowired |
| | | private COSUtil cosUtil; |
| | | @ApiOperation(value = "获取店铺分页列表") |
| | | @GetMapping("/all") |
| | | public ResultMessage<List<Store>> getAll() { |
| | |
| | | @GetMapping(value = "/get/detail/{storeId}") |
| | | public ResultMessage<StoreDetailVO> detail(@PathVariable String storeId) { |
| | | // todo 对于刚提交审核的信息需要等待缓存失效后才能操作,否则缓存信息还在 |
| | | return ResultUtil.data(storeDetailService.getStoreDetailVO(storeId)); |
| | | StoreDetailVO storeDetailVO = storeDetailService.getStoreDetailVO(storeId); |
| | | if (StringUtils.isNotBlank(storeDetailVO.getStoreLogo())&&!storeDetailVO.getStoreLogo().contains("http")) { |
| | | storeDetailVO.setStoreLogo(cosUtil.getPreviewUrl(storeDetailVO.getStoreLogo())); |
| | | } |
| | | if (StringUtils.isNotBlank(storeDetailVO.getLegalPhoto())&&!storeDetailVO.getLegalPhoto().contains("http")) { |
| | | storeDetailVO.setLegalPhoto(cosUtil.getPreviewUrl(storeDetailVO.getLegalPhoto())); |
| | | } |
| | | if (StringUtils.isNotBlank(storeDetailVO.getLicencePhoto())&&!storeDetailVO.getLicencePhoto().contains("http")) { |
| | | storeDetailVO.setLicencePhoto(cosUtil.getPreviewUrl(storeDetailVO.getLicencePhoto())); |
| | | } |
| | | return ResultUtil.data(storeDetailVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加店铺") |