guohongjin
2024-04-09 347dfd0740875e446ec8692ecaaf5fae50407fe8
修改bug
1个文件已修改
6 ■■■■■ 已修改文件
rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java
@@ -456,6 +456,12 @@
    public ResponseData<CounsellingOrder> createCounsellingOrder(@RequestBody CreateCounsellingOrderRequest counsellingOrderRequest) {
        counsellingOrderRequest.setIsBack(false);
        counsellingOrderRequest.setUserId(LoginContext.me().getLoginUser().getUserId());
        CounsellingInfo counsellingInfo = this.counsellingInfoService.getOne(new LambdaQueryWrapper<CounsellingInfo>().select(CounsellingInfo::getId,CounsellingInfo::getListingStatus).eq(CounsellingInfo::getId,counsellingOrderRequest.getCounsellingInfoId()));
        if (counsellingInfo != null){
            if(counsellingInfo.getListingStatus().intValue() != 1){
                return new ErrorResponseData<>("咨询师已经下架,无法进行购买,请联系咨询顾问");
            }
        }
        Customer customer = this.customerService.getById(LoginContext.me().getLoginUser().getUserId());
        if (customer.getStatusFlag() != null &&customer.getStatusFlag() !=1){
            return new ErrorResponseData<>("账号已被冻结或者被注销,无法进行下单");