rk
5 天以前 74b0af6814b96378201ea27d205e054bf01d0306
server/web/src/main/java/com/doumee/api/web/ConfigApi.java
@@ -2,16 +2,21 @@
import com.doumee.core.annotation.LoginRequired;
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.Notice;
import com.doumee.dao.dto.AreasDto;
import com.doumee.dao.dto.CalculateLocalPriceDTO;
import com.doumee.dao.dto.CalculateRemotePriceDTO;
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;
@@ -54,6 +59,9 @@
    @Autowired
    private MemberService memberService;
    @Autowired
    private NoticeService noticeService;
    @ApiOperation("全部区划树形查询")
    @PostMapping("/treeList")
@@ -144,5 +152,43 @@
        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);
        return ApiResponse.success("查询成功", noticeService.findPage(pageWrap));
    }
    @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("操作成功");
    }
}