无关风月
2025-04-21 1668fe1b912d07191c9fd7f20808d7d2162bc8e8
ruoyi-service/ruoyi-worker/src/main/java/com/ruoyi/worker/controller/MasterWorkerController.java
@@ -615,23 +615,36 @@
    /**
     * 师傅端-修改性别
     */
    @ApiOperation(value = "修改师傅实时位置", tags = {"师傅端-个人中心[2.0]"})
    @GetMapping(value = "/updateLonLat")
//    @ApiOperation(value = "修改师傅实时位置", tags = {"师傅端-个人中心[2.0]"})
//    @GetMapping(value = "/updateLonLat")
//    @ApiImplicitParams({
//            @ApiImplicitParam(value = "经度", name = "workerLon", dataType = "String", required = true),
//            @ApiImplicitParam(value = "纬度", name = "workerLat", dataType = "String", required = true),
//    })
//    public R<String> updateLonLat(@RequestParam("workerLon") String workerLon, @RequestParam("workerLat") String workerLat) {
//        LoginUserInfo loginWorker = tokenService.getLoginUserByWorker();
//        if (null == loginWorker) {
//            return R.loginExpire("登录已失效!");
//        }
//        boolean update = masterWorkerService.lambdaUpdate()
//                .set(MasterWorker::getWorkerLon, workerLon)
//                .set(MasterWorker::getWorkerLat, workerLat)
//                .eq(MasterWorker::getId, loginWorker.getUserid())
//                .eq(MasterWorker::getIsDelete, 0).update();
//        return update ? R.ok("修改成功!") : R.fail("修改失败!");
//    }
    /**
     * 师傅端-打电话
     */
    @ApiOperation(value = "打电话", tags = {"师傅端-打电话[2.0]"})
    @GetMapping(value = "/workerCall")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "经度", name = "workerLon", dataType = "String", required = true),
            @ApiImplicitParam(value = "纬度", name = "workerLat", dataType = "String", required = true),
            @ApiImplicitParam(value = "订单id", name = "orderId", dataType = "String", required = true),
    })
    public R<String> updateLonLat(@RequestParam("workerLon") String workerLon, @RequestParam("workerLat") String workerLat) {
        LoginUserInfo loginWorker = tokenService.getLoginUserByWorker();
        if (null == loginWorker) {
            return R.loginExpire("登录已失效!");
        }
        boolean update = masterWorkerService.lambdaUpdate()
                .set(MasterWorker::getWorkerLon, workerLon)
                .set(MasterWorker::getWorkerLat, workerLat)
                .eq(MasterWorker::getId, loginWorker.getUserid())
                .eq(MasterWorker::getIsDelete, 0).update();
        return update ? R.ok("修改成功!") : R.fail("修改失败!");
    public R<String> workerCall(@RequestParam String orderId) {
        orderClient.call(orderId);
        return R.ok();
    }
}