luodangjia
2024-04-22 3d3d9195b8c9e71af367cf78c7736d95e7e1b894
4.22
3个文件已修改
88 ■■■■ 已修改文件
common-buiness/src/main/java/cn/stylefeng/guns/modular/business/service/impl/CounsellingOrderServiceImpl.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rest/src/main/java/cn/stylefeng/rest/modular/user/controller/UserCenterController.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rest/src/main/java/cn/stylefeng/rest/modular/worker/controller/WorkerController.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common-buiness/src/main/java/cn/stylefeng/guns/modular/business/service/impl/CounsellingOrderServiceImpl.java
@@ -226,19 +226,19 @@
            // 推送消息内容
            String pushContent = "你有新的预约,请注意查收。预约用户:"+customerOld.getNickName();
//                    +"预约时间:"+counsellingOrder.getEffectiveEndTime()+"~"+counsellingOrder.getEffectiveEndTime();
            // IM推送数据json
            ImPushDataDTO pushData = ImPushDataDTO.builder()
                    .type(ImPushTypeEnum.S_TO_W_TIP_CONSULT_PAY_GROUP_SUCCESS_ONLY.getCode())
                    .objId(ObjUtil.toString(counsellingInfo.getUserId()))
                    .title("通知")
                    .content(pushContent)
//                    .extra("去查看。")
                    .build();
            // 发送预约提示
            imBizService.messageSendSystem(counsellingOrder.getUserId()+"", new String[]{counsellingInfo.getUserId()+""}, pushData, ImUserTypeEnum.WORKER, PostIdEnum.PO_22, true);
//            // 推送消息内容
//            String pushContent = "你有新的预约,请注意查收。预约用户:"+customerOld.getNickName();
////                    +"预约时间:"+counsellingOrder.getEffectiveEndTime()+"~"+counsellingOrder.getEffectiveEndTime();
//            // IM推送数据json
//            ImPushDataDTO pushData = ImPushDataDTO.builder()
//                    .type(ImPushTypeEnum.S_TO_W_TIP_CONSULT_PAY_GROUP_SUCCESS_ONLY.getCode())
//                    .objId(ObjUtil.toString(counsellingInfo.getUserId()))
//                    .title("通知")
//                    .content(pushContent)
////                    .extra("去查看。")
//                    .build();
//            // 发送预约提示
//            imBizService.messageSendSystem(counsellingOrder.getUserId()+"", new String[]{counsellingInfo.getUserId()+""}, pushData, ImUserTypeEnum.WORKER, PostIdEnum.PO_22, true);
        }else if (counsellingOrderRequest.getOrderType().intValue() ==2){
            //获取下单人个人信息
            Customer customerUser = this.customerService.getById(counsellingOrderRequest.getUserId());
rest/src/main/java/cn/stylefeng/rest/modular/user/controller/UserCenterController.java
@@ -282,10 +282,38 @@
        if (StrUtil.isNotBlank(req.getWorkerNo())) {
            // 获取绑定顾问岗位ID(这里做校验)
            customerService.getBindWorkerPostIds(req.getWorkerNo(), PostIdEnum.PO_11, PostIdEnum.PO_21);
            //绑定工号
            // 幸福顾问
            PostIdEnum post11Enum = PostIdEnum.PO_11;
            // 咨询顾问
            PostIdEnum post21Enum = PostIdEnum.PO_21;
            // 获取绑定顾问岗位ID
            String[] bindWorkerPostIds = customerService.getBindWorkerPostIds(req.getWorkerNo(), post11Enum, post21Enum);
            Customer workerByNo = customerService.getOne(
                    Wrappers.<Customer>lambdaUpdate().eq(Customer::getWorkerNo, req.getWorkerNo()).last("LIMIT 1")
            );
            LambdaUpdateWrapper<Customer> wrapper = Wrappers.<Customer>lambdaUpdate().eq(Customer::getCustomerId, validCustomer.getCustomerId());
            for (String postId : bindWorkerPostIds) {
                if (postId.equals(post11Enum.getCode().toString())) {
                    wrapper.set(Customer::getClassWorkerId, workerByNo.getCustomerId());
                } else if (postId.equals(post21Enum.getCode().toString())) {
                    wrapper.set(Customer::getConsultWorkerId, workerByNo.getCustomerId());
                }
            }
            // 修改用户信息
            Boolean update = customerService.update(wrapper);
        }
        // 验证码通过
        sysSmsInfoService.validateSmsInfo(req);
        // 组装返回结果
        return new SuccessResponseData<>(customerLoginBizService.phoneLogin(req.getPhone(), CustomerUserTypeEnum.USER));
@@ -299,6 +327,9 @@
        String phoneMd5 = MD5.create().digestHex(md5Salt + req.getPhone());
        Assert.isTrue(phoneMd5.equals(req.getPhoneMd5()), "手机号验证失败");
        // 组装返回结果
        return new SuccessResponseData<>(customerLoginBizService.phoneLogin(req.getPhone(), CustomerUserTypeEnum.USER));
    }
rest/src/main/java/cn/stylefeng/rest/modular/worker/controller/WorkerController.java
@@ -26,6 +26,7 @@
import cn.stylefeng.roses.kernel.auth.api.pojo.auth.LoginRequest;
import cn.stylefeng.roses.kernel.auth.api.pojo.auth.LoginResponse;
import cn.stylefeng.roses.kernel.auth.api.pojo.login.LoginUser;
import cn.stylefeng.roses.kernel.cache.api.CacheOperatorApi;
import cn.stylefeng.roses.kernel.customer.api.exception.CustomerException;
import cn.stylefeng.roses.kernel.customer.api.exception.enums.CustomerExceptionEnum;
import cn.stylefeng.roses.kernel.customer.api.pojo.CustomerInfo;
@@ -258,6 +259,9 @@
        return new SuccessResponseData(update);
    }
    @Resource
    private CacheOperatorApi<CustomerInfo> customerInfoCacheOperatorApi;
    @ApiOperation(value = "验证码登录")
    @PostResource(name = "验证码登录", path = RuleConstants.NOT_LOGIN + "/smsCodeLogin", requiredPermission = false, requiredLogin = false)
    public ResponseData<LoginResponse> smsCodeLogin(@RequestBody SysSmsVerifyParam req) {
@@ -274,6 +278,33 @@
        // 验证码通过
        sysSmsInfoService.validateSmsInfo(req);
//        //绑定工号
//        // 幸福顾问
//        PostIdEnum post11Enum = PostIdEnum.PO_11;
//        // 咨询顾问
//        PostIdEnum post21Enum = PostIdEnum.PO_21;
//
//        // 获取绑定顾问岗位ID
//        String[] bindWorkerPostIds = customerService.getBindWorkerPostIds(req.getWorkerNo(), post11Enum, post21Enum);
//        Customer workerByNo = customerService.getOne(
//                Wrappers.<Customer>lambdaUpdate().eq(Customer::getWorkerNo, req.getWorkerNo()).last("LIMIT 1")
//        );
//
//        LambdaUpdateWrapper<Customer> wrapper = Wrappers.<Customer>lambdaUpdate().eq(Customer::getCustomerId, validCustomer.getCustomerId());
//        for (String postId : bindWorkerPostIds) {
//            if (postId.equals(post11Enum.getCode().toString())) {
//                wrapper.set(Customer::getClassWorkerId, workerByNo.getCustomerId());
//            } else if (postId.equals(post21Enum.getCode().toString())) {
//                wrapper.set(Customer::getConsultWorkerId, workerByNo.getCustomerId());
//            }
//        }
//
//        // 修改用户信息
//        Boolean update = customerService.update(wrapper);
        // 组装返回结果
        return new SuccessResponseData<>(customerLoginBizService.phoneLogin(req.getPhone(), CustomerUserTypeEnum.WORKER));
    }