小程序首页接口修改
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package com.czg.controller.user;
|
||||
|
||||
import com.czg.account.entity.PlatformDict;
|
||||
import com.czg.account.service.PlatformDictService;
|
||||
import com.czg.resp.CzgResult;
|
||||
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
|
||||
*/
|
||||
@RequestMapping("/user/dict")
|
||||
@RestController
|
||||
public class UPlatFormDictController {
|
||||
@Resource
|
||||
private PlatformDictService platformDictService;
|
||||
|
||||
/**
|
||||
* 获取小程序dict配置
|
||||
* @param type homeDistrict--金刚区(首页)
|
||||
* carousel--轮播图
|
||||
* proTag--商品标签
|
||||
* shopTag--店铺标签
|
||||
* icon--小图标
|
||||
* subShop--预约到店顶部图
|
||||
* group--团购卷分类对应顶部图 value为团购卷Id
|
||||
* ownMenu--个人中心菜单
|
||||
* @return dict信息
|
||||
*/
|
||||
@GetMapping
|
||||
public CzgResult<PlatformDict> get(@RequestParam String type) {
|
||||
return CzgResult.success(platformDictService.getOne(new QueryWrapper().eq(PlatformDict::getType, type)));
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,11 @@ package com.czg.controller.user;
|
||||
|
||||
import com.czg.account.dto.shopinfo.ShopInfoByCodeDTO;
|
||||
import com.czg.account.dto.shopinfo.ShopInfoDetailDTO;
|
||||
import com.czg.account.dto.shopinfo.ShopInfoSubVO;
|
||||
import com.czg.account.service.ShopInfoService;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -39,4 +41,16 @@ public class UShopInfoController {
|
||||
public CzgResult<ShopInfoDetailDTO> get(Long shopId) {
|
||||
return CzgResult.success(shopInfoService.getDetail(shopId == null ? StpKit.USER.getShopId() : shopId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 预约店铺列表,对应预约到店
|
||||
* @param lng 精度
|
||||
* @param lat 维度
|
||||
* @param distance 单位m
|
||||
* @return 列表
|
||||
*/
|
||||
@GetMapping("/subList")
|
||||
public CzgResult<Page<ShopInfoSubVO>> subList(@RequestParam String lng, @RequestParam String lat, @RequestParam float distance) {
|
||||
return CzgResult.success(shopInfoService.getSubList(lat, lng, distance));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user