|
|
@@ -3,6 +3,7 @@ package com.ylx.web.controller.massage;
|
|
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
|
|
import cn.binarywang.wx.miniapp.bean.WxMaSubscribeMessage;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
@@ -222,6 +223,7 @@ public class TJsController extends BaseController {
|
|
|
@ApiOperation("微信查询技师列表")
|
|
|
public R wxSelect(Page<TJs> page, TJsVo js) {
|
|
|
try {
|
|
|
+ log.info("微信查询技师列表,请求参数:{}", JSON.toJSONString(js));
|
|
|
if (js.getLatitude() != null && js.getLongitude() != null) {
|
|
|
// 检查经纬度是否在合理范围内
|
|
|
Location location = new Location();
|
|
|
@@ -230,16 +232,16 @@ public class TJsController extends BaseController {
|
|
|
location.setLimit(100L); // 考虑将此值作为参数或配置项
|
|
|
location.setRadius(1000.00);
|
|
|
List<TJs> nearbyTechnicians = locationUtil.dis(location);
|
|
|
+ log.info("附近的技师:{}",JSON.toJSONString(nearbyTechnicians));
|
|
|
+
|
|
|
if (nearbyTechnicians != null) {
|
|
|
Map<String, BigDecimal> collect = nearbyTechnicians.stream().collect(Collectors.toMap(TJs::getcPhone, TJs::getDistance));
|
|
|
js.setIds(nearbyTechnicians.stream().map(TJs::getcPhone).collect(Collectors.toList()));
|
|
|
- log.info("缓存技师===========>:{}", JSONUtil.toJsonStr(nearbyTechnicians.stream().map(TJs::getcPhone).collect(Collectors.toList())));
|
|
|
+ log.info("缓存技师:{}", JSONUtil.toJsonStr(nearbyTechnicians.stream().map(TJs::getcPhone).collect(Collectors.toList())));
|
|
|
|
|
|
- int size = (int) page.getSize();
|
|
|
int pageNum = (int) page.getCurrent();
|
|
|
+ int size = (int) page.getSize();
|
|
|
|
|
|
- page.setCurrent(1);
|
|
|
- page.setSize(100);
|
|
|
Page<TJs> all = jsService.getAll(page, js);
|
|
|
log.info("总条数============>:{},当前页:{}", all.getRecords().size(), pageNum);
|
|
|
all.getRecords().forEach(item -> {
|