小程序获取弹窗接口

This commit is contained in:
GYJ
2024-08-19 15:30:14 +08:00
parent 538fc8f91b
commit 22c04c61f5
7 changed files with 256 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
package com.chaozhanggui.system.cashierservice.controller;
import com.chaozhanggui.system.cashierservice.entity.TbShopAd;
import com.chaozhanggui.system.cashierservice.entity.dto.TbShopAdDto;
import com.chaozhanggui.system.cashierservice.service.TbShopAdService;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
import com.chaozhanggui.system.cashierservice.sign.Result;
import org.springframework.beans.factory.annotation.Qualifier;
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;
import java.util.List;
/**
* (TbShopAd)表控制层
*
* @author GYJ
* @since 2024-08-19 14:25:09
*/
@RestController
@RequestMapping("tbShopAd")
public class TbShopAdController {
private final TbShopAdService tbShopAdService;
public TbShopAdController(@Qualifier("tbShopAdServiceImpl") TbShopAdService tbShopAdService) {
this.tbShopAdService = tbShopAdService;
}
@GetMapping("/list")
public Result list(@RequestParam(value = "shopId") Integer shopId) {
List<TbShopAd> tbShopAds = tbShopAdService.shopAdList(shopId);
return Result.success(CodeEnum.ENCRYPT, TbShopAdDto.convertShopAdDoToDtoList(tbShopAds));
}
}