From 59b1f0e9967902aa10f5e017d5a0bdfd1b60c9ea Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 29 四月 2026 09:42:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
server/web/src/main/java/com/doumee/api/web/ConfigApi.java | 146 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 146 insertions(+), 0 deletions(-)
diff --git a/server/web/src/main/java/com/doumee/api/web/ConfigApi.java b/server/web/src/main/java/com/doumee/api/web/ConfigApi.java
index deb2560..cadd02a 100644
--- a/server/web/src/main/java/com/doumee/api/web/ConfigApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/ConfigApi.java
@@ -1,17 +1,28 @@
package com.doumee.api.web;
+import com.doumee.biz.system.SystemDictDataBiz;
+import com.doumee.core.annotation.LoginDriverRequired;
import com.doumee.core.annotation.LoginRequired;
+import com.doumee.core.annotation.LoginShopRequired;
import com.doumee.core.annotation.trace.Trace;
+import com.doumee.core.constants.Constants;
import com.doumee.core.model.ApiResponse;
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.geocode.MapUtil;
import com.doumee.dao.business.model.Areas;
import com.doumee.dao.business.model.Banner;
import com.doumee.dao.business.model.Category;
+import com.doumee.dao.business.model.AppVersion;
+import com.doumee.dao.business.model.Notice;
+import com.alibaba.fastjson.JSONObject;
import com.doumee.dao.dto.AreasDto;
import com.doumee.dao.dto.CalculateLocalPriceDTO;
import com.doumee.dao.dto.CalculateRemotePriceDTO;
+import com.doumee.dao.dto.DirectionInfoDTO;
import com.doumee.dao.dto.SameCityCheckDTO;
import com.doumee.dao.vo.PriceCalculateVO;
+import com.doumee.dao.vo.ActiveOrderTipVO;
import com.doumee.dao.vo.PlatformAboutVO;
import com.doumee.service.business.*;
import io.swagger.annotations.Api;
@@ -55,6 +66,15 @@
@Autowired
private MemberService memberService;
+ @Autowired
+ private NoticeService noticeService;
+
+ @Autowired
+ private AppVersionService appVersionService;
+
+ @Autowired
+ private SystemDictDataBiz systemDictDataBiz;
+
@ApiOperation("鍏ㄩ儴鍖哄垝鏍戝舰鏌ヨ")
@PostMapping("/treeList")
public ApiResponse<List<Areas>> treeList (@RequestBody AreasDto pageWrap) {
@@ -86,6 +106,15 @@
})
public ApiResponse<List<Banner>> getBannerList(@RequestParam Integer position) {
return ApiResponse.success("鎿嶄綔鎴愬姛", bannerService.findListByPosition(position));
+ }
+
+ @ApiOperation(value = "鑾峰彇杞挱鍥捐鎯�", notes = "鏍规嵁ID杩斿洖杞挱鍥捐鎯咃紝鍚浘鐗囧叏璺緞")
+ @GetMapping("/getBannerDetail")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "杞挱鍥句富閿�", required = true)
+ })
+ public ApiResponse<Banner> getBannerDetail(@RequestParam Integer id) {
+ return ApiResponse.success("鏌ヨ鎴愬姛", bannerService.findById(id));
}
@ApiOperation(value = "鑾峰彇鍩庡競宸插紑閫氱墿鍝佸昂瀵�", notes = "鏍规嵁鍩庡競涓婚敭鏌ヨ宸插紑閫氱殑鐗╁搧灏哄(category type=4)")
@@ -144,5 +173,122 @@
return ApiResponse.success("鏌ヨ鎴愬姛", areasService.getOpenedCityByName(cityName));
}
+ @LoginRequired
+ @ApiOperation(value = "浼氬憳閫氱煡娑堟伅鍒嗛〉", notes = "鏈浼樺厛锛屾椂闂村�掑簭")
+ @PostMapping("/memberNoticePage")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<PageData<Notice>> memberNoticePage(@RequestBody PageWrap<Notice> pageWrap) {
+ if (pageWrap.getModel() == null) {
+ pageWrap.setModel(new Notice());
+ }
+ pageWrap.getModel().setUserId(this.getMemberId());
+ pageWrap.getModel().setUserType(Constants.ZERO);
+ PageData<Notice> pageData = noticeService.findPage(pageWrap);
+ noticeService.readAllNotice(0, this.getMemberId());
+ return ApiResponse.success("鏌ヨ鎴愬姛", pageData);
+ }
+
+
+ @LoginShopRequired
+ @ApiOperation(value = "闂ㄥ簵閫氱煡娑堟伅鍒嗛〉", notes = "鏈浼樺厛锛屾椂闂村�掑簭")
+ @PostMapping("/shopNoticePage")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<PageData<Notice>> shopNoticePage(@RequestBody PageWrap<Notice> pageWrap) {
+ if (pageWrap.getModel() == null) {
+ pageWrap.setModel(new Notice());
+ }
+ pageWrap.getModel().setUserId(this.getShopId());
+ pageWrap.getModel().setUserType(Constants.TWO);
+ PageData<Notice> pageData = noticeService.findPage(pageWrap);
+ noticeService.readAllNotice(Constants.TWO, this.getShopId());
+ return ApiResponse.success("鏌ヨ鎴愬姛", pageData);
+ }
+
+ @LoginShopRequired
+ @ApiOperation(value = "闂ㄥ簵鏍囪鍏ㄩ儴宸茶", notes = "鏍囪褰撳墠鐢ㄦ埛鎵�鏈夋湭璇婚�氱煡涓哄凡璇�")
+ @PostMapping("/shopReadAllNotice")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse shopReadAllNotice() {
+ noticeService.readAllNotice(Constants.TWO, this.getShopId());
+ return ApiResponse.success("鎿嶄綔鎴愬姛");
+ }
+
+
+ @LoginRequired
+ @ApiOperation(value = "棣栭〉杩涜涓鍗曟彁绀�", notes = "杩斿洖鏈�鏂颁竴鏉¤繘琛屼腑璁㈠崟鐨勭姸鎬佸拰鎻愮ず鏂囨锛屾棤璁㈠崟杩斿洖null")
+ @GetMapping("/getActiveOrderTip")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<ActiveOrderTipVO> getActiveOrderTip() {
+ return ApiResponse.success("鏌ヨ鎴愬姛", ordersService.getActiveOrderTip(this.getMemberId()));
+ }
+
+
+ @LoginRequired
+ @ApiOperation(value = "浼氬憳鏍囪鍏ㄩ儴宸茶", notes = "鏍囪褰撳墠鐢ㄦ埛鎵�鏈夋湭璇婚�氱煡涓哄凡璇�")
+ @PostMapping("/memberReadAllNotice")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse readAllNotice() {
+ noticeService.readAllNotice(0, this.getMemberId());
+ return ApiResponse.success("鎿嶄綔鎴愬姛");
+ }
+
+
+
+ @LoginDriverRequired
+ @ApiOperation(value = "鍙告満閫氱煡娑堟伅鍒嗛〉", notes = "鏈浼樺厛锛屾椂闂村�掑簭")
+ @PostMapping("/driverNoticePage")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse<PageData<Notice>> driverNoticePage(@RequestBody PageWrap<Notice> pageWrap) {
+ if (pageWrap.getModel() == null) {
+ pageWrap.setModel(new Notice());
+ }
+ pageWrap.getModel().setUserId(this.getDriverId());
+ pageWrap.getModel().setUserType(Constants.ONE);
+ PageData<Notice> pageData = noticeService.findPage(pageWrap);
+ noticeService.readAllNotice(Constants.ONE, this.getDriverId());
+ return ApiResponse.success("鏌ヨ鎴愬姛", pageData);
+ }
+
+ @LoginDriverRequired
+ @ApiOperation(value = "璺緞瑙勫垝", notes = "璋冪敤楂樺痉鍦板浘璺緞瑙勫垝鎺ュ彛锛岃繑鍥炶矾绾夸俊鎭�")
+ @PostMapping("/directionInfo")
+ public ApiResponse<JSONObject> directionInfo(@RequestBody @Valid DirectionInfoDTO dto) {
+ return ApiResponse.success("鎿嶄綔鎴愬姛", MapUtil.directionInfo(dto.getMode(), dto.getFrom(), dto.getTo()));
+ }
+
+ @LoginDriverRequired
+ @ApiOperation(value = "鍙告満鏍囪鍏ㄩ儴宸茶", notes = "鏍囪褰撳墠鐢ㄦ埛鎵�鏈夋湭璇婚�氱煡涓哄凡璇�")
+ @PostMapping("/driverReadAllNotice")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "鐢ㄦ埛token鍊�", required = true)
+ })
+ public ApiResponse driverReadAllNotice() {
+ noticeService.readAllNotice(Constants.ONE, this.getDriverId());
+ return ApiResponse.success("鎿嶄綔鎴愬姛");
+ }
+
+ @ApiOperation(value = "鑾峰彇鏈�鏂癆PP鐗堟湰")
+ @GetMapping("/getApiVersion")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "骞冲彴绫诲瀷 0=Android 1=IOS", required = true)
+ })
+ public ApiResponse<AppVersion> getApiVersion(@RequestParam Integer type) {
+ AppVersion appVersion = appVersionService.getLatestVersion(type);
+ appVersion.setFileUrl("http://llfc.lmpro.cn/apkversion/gtxljc.apk");
+ return ApiResponse.success("鏌ヨ鎴愬姛", appVersion);
+ }
+
}
--
Gitblit v1.9.3