小程序店铺信息获取相关
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import com.czg.account.dto.PageDTO;
|
||||
import com.czg.account.dto.shopinfo.ShopDetailDTO;
|
||||
import com.czg.account.dto.shopinfo.ShopInfoAddDTO;
|
||||
import com.czg.account.dto.shopinfo.ShopInfoEditDTO;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
@@ -42,7 +43,7 @@ public class ShopInfoController {
|
||||
*/
|
||||
@SaAdminCheckPermission("shopInfo:detail")
|
||||
@GetMapping("/detail")
|
||||
public CzgResult<ShopInfo> detail(Integer id) {
|
||||
public CzgResult<ShopDetailDTO> detail(Integer id) {
|
||||
return CzgResult.success(shopInfoService.detail(id));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.czg.controller.user;
|
||||
|
||||
import com.czg.account.entity.ShopExtend;
|
||||
import com.czg.account.service.ShopExtendService;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 店铺拓展信息
|
||||
* @author Administrator
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/shopExtend")
|
||||
public class UShopExtendController {
|
||||
@Resource
|
||||
private ShopExtendService shopExtendService;
|
||||
|
||||
/**
|
||||
* 根据key获取拓展信息
|
||||
* @param shopId 店铺id
|
||||
* @param autoKey key index_bg 首页 my_bg 个人中心 member_bg 会员卡 shopinfo_bg 商品列表 ticket_logo 小票logo
|
||||
* @return 详细信息
|
||||
*/
|
||||
@GetMapping
|
||||
public CzgResult<ShopExtend> get(Long shopId, @RequestParam String autoKey) {
|
||||
return CzgResult.success(shopExtendService.getOne(new QueryWrapper().eq(ShopExtend::getShopId, shopId == null ? StpKit.USER.getShopId() : shopId).eq(ShopExtend::getAutoKey, autoKey)));
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.czg.controller.user;
|
||||
|
||||
import com.czg.account.dto.shopinfo.ShopInfoByCodeDTO;
|
||||
import com.czg.account.dto.shopinfo.ShopInfoDetailDTO;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -28,4 +30,13 @@ public class UShopInfoController {
|
||||
public CzgResult<ShopInfoByCodeDTO> getByCode(@RequestParam @NotEmpty String tableCode, String lat, String lng) {
|
||||
return CzgResult.success(shopInfoService.getByCode(tableCode, lat, lng, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取店铺详细信息
|
||||
* @return 店铺信息
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public CzgResult<ShopInfoDetailDTO> get(Long shopId) {
|
||||
return CzgResult.success(shopInfoService.getDetail(shopId == null ? StpKit.USER.getShopId() : shopId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user