Эх сурвалжийг харах

[fix]
拼团banner生成代码

chenchen 2 сар өмнө
parent
commit
5c003d3015

+ 63 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/WebsiteProjectGroupPurchaseBannerController.java

@@ -0,0 +1,63 @@
+package com.tourism.webadmin.app.website.controller;
+
+import com.tourism.common.core.constant.ErrorCodeEnum;
+import com.tourism.common.core.object.CallResult;
+import com.tourism.common.core.object.MyOrderParam;
+import com.tourism.common.core.object.ResponseResult;
+import com.tourism.common.core.object.TokenData;
+import com.tourism.common.core.util.MyCommonUtil;
+import com.tourism.common.core.util.MyModelUtil;
+import com.tourism.common.core.util.MyPageUtil;
+import com.tourism.common.log.annotation.OperationLog;
+import com.tourism.common.log.model.constant.SysOperationLogType;
+import com.tourism.webadmin.app.website.dto.PageDto;
+import com.tourism.webadmin.back.dto.TourProjectGroupPurchaseApplyDto;
+import com.tourism.webadmin.back.model.TourOrder;
+import com.tourism.webadmin.back.model.TourProjectGroupPurchaseApply;
+import com.tourism.webadmin.back.model.TourProjectGroupPurchaseBanner;
+import com.tourism.webadmin.back.model.constant.Enable;
+import com.tourism.webadmin.back.service.TourProjectGroupPurchaseApplyService;
+import com.tourism.webadmin.back.service.TourProjectGroupPurchaseBannerService;
+import com.tourism.webadmin.back.vo.TourProjectGroupPurchaseBannerVo;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 拼团首页banner接口。
+ *
+ * @author 吃饭睡觉
+ * @date 2024-09-06
+ */
+@Tag(name = "拼团首页banner接口")
+@Slf4j
+@RestController
+@RequestMapping("/website/app/tourProjectGroupPurchaseBanner")
+public class WebsiteProjectGroupPurchaseBannerController {
+
+    @Autowired
+    private TourProjectGroupPurchaseBannerService tourProjectGroupPurchaseBannerService;
+
+    /**
+     * 获取拼团Banner列表数据。
+     *
+     * @return 应答结果对象,获取拼团Banner列表数据。
+     */
+    @OperationLog(type = SysOperationLogType.LIST)
+    @GetMapping("/list")
+    public ResponseResult<List<TourProjectGroupPurchaseBannerVo>> list() {
+        TourProjectGroupPurchaseBanner tourProjectGroupPurchaseBanner = new TourProjectGroupPurchaseBanner();
+        tourProjectGroupPurchaseBanner.setEnable(Enable.ENABLE_YES);
+        MyOrderParam myOrderParam = new MyOrderParam();
+        myOrderParam.add(new MyOrderParam.OrderInfo("showOrder", true, null));
+        String orderBy = MyOrderParam.buildOrderBy(myOrderParam, TourProjectGroupPurchaseBanner.class);
+        List<TourProjectGroupPurchaseBanner> tourProjectGroupPurchaseBannerList =
+                tourProjectGroupPurchaseBannerService.getTourProjectGroupPurchaseBannerList(tourProjectGroupPurchaseBanner, orderBy);
+
+        return ResponseResult.success(MyModelUtil.copyCollectionTo(tourProjectGroupPurchaseBannerList,TourProjectGroupPurchaseBannerVo.class));
+    }
+}