小程序首页数据接口

This commit is contained in:
gong
2025-12-11 13:32:32 +08:00
parent ce5fe75951
commit e9bfd608ac
4 changed files with 187 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
package com.czg.controller.user;
import com.czg.market.service.UserHomeService;
import com.czg.market.vo.UserHomeDataVo;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 用户端/首页数据
*
* @author yjjie
* @date 2025/12/11 13:27
*/
@RestController
@RequestMapping("/user/home")
public class UHomeDataController {
@Resource
private UserHomeService userHomeService;
/**
* 获取用户端首页数据
*/
@GetMapping("/data")
public CzgResult<UserHomeDataVo> getUserHomeData() {
return CzgResult.success(userHomeService.getUserHomeData(StpKit.USER.getLoginIdAsLong(), StpKit.USER.getShopId()));
}
}