|
|
@@ -68,7 +68,7 @@ public class TJsController extends BaseController {
|
|
|
* 添加技师申请
|
|
|
*
|
|
|
* @param js
|
|
|
- * @return
|
|
|
+ * @return R
|
|
|
*/
|
|
|
@Log(title = "技师管理", businessType = BusinessType.INSERT)
|
|
|
@RequestMapping(value = "wx/add", method = RequestMethod.POST)
|
|
|
@@ -82,7 +82,6 @@ public class TJsController extends BaseController {
|
|
|
log.error(s.toString());
|
|
|
return R.fail(s.getMessage());
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -103,23 +102,22 @@ public class TJsController extends BaseController {
|
|
|
* 更新技师信息
|
|
|
*
|
|
|
* @param js
|
|
|
- * @return
|
|
|
+ * @return R
|
|
|
*/
|
|
|
@Log(title = "技师管理", businessType = BusinessType.UPDATE)
|
|
|
@RequestMapping(value = "wx/update", method = RequestMethod.POST)
|
|
|
@ApiOperation("更新技师信息")
|
|
|
public R wxUpdate(@RequestBody TJs js) {
|
|
|
-// try {
|
|
|
- return R.ok(jsService.wxUpdateJs(js));
|
|
|
-// } catch (ServiceException s) {
|
|
|
-// log.error(s.toString());
|
|
|
-// return R.fail(s.getMessage());
|
|
|
-// } catch (Exception e) {
|
|
|
-// log.error(e.toString());
|
|
|
-// return R.fail("系统异常");
|
|
|
-// }
|
|
|
+ return R.ok(jsService.wxUpdateJs(js));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 实时更新技师位置
|
|
|
+ *
|
|
|
+ * @param js
|
|
|
+ * @return R 更新结果
|
|
|
+ */
|
|
|
@Log(title = "实时更新技师位置", businessType = BusinessType.UPDATE)
|
|
|
@RequestMapping(value = "wx/updateLocation/f", method = RequestMethod.POST)
|
|
|
@ApiOperation("实时更新技师位置")
|
|
|
@@ -127,14 +125,22 @@ public class TJsController extends BaseController {
|
|
|
try {
|
|
|
return R.ok(jsService.updateLocation(js));
|
|
|
} catch (ServiceException s) {
|
|
|
+ s.printStackTrace();
|
|
|
log.error(s.toString());
|
|
|
return R.fail(s.getMessage());
|
|
|
- } catch (Exception e) {
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
log.error(e.toString());
|
|
|
return R.fail("系统异常");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 免车费设置
|
|
|
+ *
|
|
|
+ * @param js
|
|
|
+ * @return R
|
|
|
+ */
|
|
|
@Log(title = "免车费设置", businessType = BusinessType.UPDATE)
|
|
|
@RequestMapping(value = "wx/freeFare", method = RequestMethod.POST)
|
|
|
@ApiOperation("免车费设置")
|
|
|
@@ -150,6 +156,12 @@ public class TJsController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 上岗/下岗
|
|
|
+ *
|
|
|
+ * @param js
|
|
|
+ * @return R
|
|
|
+ */
|
|
|
@Log(title = "上岗/下岗", businessType = BusinessType.UPDATE)
|
|
|
@RequestMapping(value = "wx/post", method = RequestMethod.POST)
|
|
|
@ApiOperation("上岗/下岗")
|
|
|
@@ -177,7 +189,7 @@ public class TJsController extends BaseController {
|
|
|
@ApiOperation("技师解绑")
|
|
|
public R unbind(@RequestParam String id) {
|
|
|
try {
|
|
|
- return R.ok(jsService.update(new LambdaUpdateWrapper<TJs>().eq(TJs::getId,id).set(TJs::getcOpenId,null)));
|
|
|
+ return R.ok(jsService.update(new LambdaUpdateWrapper<TJs>().eq(TJs::getId, id).set(TJs::getcOpenId, null)));
|
|
|
} catch (ServiceException s) {
|
|
|
log.error(s.toString());
|
|
|
return R.fail(s.getMessage());
|
|
|
@@ -189,14 +201,15 @@ public class TJsController extends BaseController {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 微信查询
|
|
|
+ * 微信查询技师列表
|
|
|
*
|
|
|
- * @param
|
|
|
- * @return
|
|
|
+ * @param page
|
|
|
+ * @param js
|
|
|
+ * @return R 技师列表
|
|
|
*/
|
|
|
@RequestMapping(value = "wx/select", method = RequestMethod.GET)
|
|
|
@Log(title = "微信查询技师列表", businessType = BusinessType.OTHER)
|
|
|
- @ApiOperation("微信查询")
|
|
|
+ @ApiOperation("微信查询技师列表")
|
|
|
public R wxSelect(Page<TJs> page, TJsVo js) {
|
|
|
try {
|
|
|
if (js.getLatitude() != null && js.getLongitude() != null) {
|
|
|
@@ -264,8 +277,8 @@ public class TJsController extends BaseController {
|
|
|
eq(js.getDeptId() != null, TJs::getDeptId, js.getDeptId()).
|
|
|
orderByDesc(TJs::getDtCreateTime);
|
|
|
//部门数据
|
|
|
- if(loginUser.getDeptId() != 100){
|
|
|
- mhCompanyLambdaQueryWrapper.eq(TJs::getDeptId,loginUser.getDeptId().toString());
|
|
|
+ if (loginUser.getDeptId() != 100) {
|
|
|
+ mhCompanyLambdaQueryWrapper.eq(TJs::getDeptId, loginUser.getDeptId().toString());
|
|
|
}
|
|
|
if (js.getPageType() == 1) {
|
|
|
mhCompanyLambdaQueryWrapper.eq(TJs::getnTong, JsStatusEnum.JS_PASS.getCode());
|
|
|
@@ -287,7 +300,7 @@ public class TJsController extends BaseController {
|
|
|
@ApiOperation("删除技师")
|
|
|
public R del(@RequestBody TJs js) {
|
|
|
boolean b = jsService.removeById(js);
|
|
|
- if(b){
|
|
|
+ if (b) {
|
|
|
return R.ok();
|
|
|
}
|
|
|
return R.fail("删除失败");
|
|
|
@@ -337,6 +350,7 @@ public class TJsController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 审核技师
|
|
|
+ *
|
|
|
* @param js
|
|
|
* @return R
|
|
|
*/
|
|
|
@@ -354,6 +368,12 @@ public class TJsController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 退回
|
|
|
+ *
|
|
|
+ * @param js
|
|
|
+ * @return R
|
|
|
+ */
|
|
|
@ApiOperation("退回")
|
|
|
@RequestMapping(value = "/repulse", method = RequestMethod.POST)
|
|
|
public R repulse(@RequestBody TJs js) {
|
|
|
@@ -367,7 +387,6 @@ public class TJsController extends BaseController {
|
|
|
js.setcOpenId(js1.getcOpenId());
|
|
|
js.setcPhone(js1.getcPhone());
|
|
|
jsService.jsNotification(js);
|
|
|
-
|
|
|
return R.ok(update);
|
|
|
} catch (ServiceException s) {
|
|
|
log.error(s.getMessage());
|
|
|
@@ -378,7 +397,13 @@ public class TJsController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @ApiOperation("拉黑")
|
|
|
+ /**
|
|
|
+ * 拉黑技师
|
|
|
+ *
|
|
|
+ * @param js
|
|
|
+ * @return R
|
|
|
+ */
|
|
|
+ @ApiOperation("拉黑技师")
|
|
|
@RequestMapping(value = "/block", method = RequestMethod.POST)
|
|
|
public R block(@RequestBody TJs js) {
|
|
|
try {
|
|
|
@@ -395,7 +420,7 @@ public class TJsController extends BaseController {
|
|
|
@ApiOperation("小程序通知")
|
|
|
@RequestMapping(value = "/tongzhi", method = RequestMethod.GET)
|
|
|
public boolean sendSubscribeMessage(String openId) {
|
|
|
- String page="pages/index/index"; // 应该是消息点击后跳转页面
|
|
|
+ String page = "pages/index/index"; // 应该是消息点击后跳转页面
|
|
|
WxMaSubscribeMessage message = new WxMaSubscribeMessage();
|
|
|
message.setTemplateId(msgTemplateId1);
|
|
|
message.setToUser(openId);
|