|
@@ -167,8 +167,8 @@ public class TJsServiceImpl extends ServiceImpl<TJsMapper, TJs> implements TJsSe
|
|
|
|
|
|
@Override
|
|
|
public boolean updateLocation(TJs js) {
|
|
|
- if (StringUtils.isBlank(js.getcOpenId())) {
|
|
|
- throw new ServiceException("技师OpenID不能为空");
|
|
|
+ if (StringUtils.isBlank(js.getId())) {
|
|
|
+ throw new ServiceException("ID不能为空");
|
|
|
}
|
|
|
if (StringUtils.isBlank(js.getName())) {
|
|
|
throw new ServiceException("地址不能为空");
|
|
@@ -176,11 +176,8 @@ public class TJsServiceImpl extends ServiceImpl<TJsMapper, TJs> implements TJsSe
|
|
|
// JSONObject jsonObject = new JSONObject(js.getcAddress());
|
|
|
// Object latitude = jsonObject.get("latitude");
|
|
|
// Object longitude = jsonObject.get("longitude");
|
|
|
- locationUtil.geoAdd(LocationUtil.GEO_KEY, js.getcOpenId(), Double.parseDouble(js.getLongitude().toString()), Double.parseDouble(js.getLatitude().toString()));
|
|
|
- LambdaQueryWrapper<TJs> objectLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
- objectLambdaQueryWrapper.eq(TJs::getcOpenId, js.getcOpenId());
|
|
|
- return this.update(js, objectLambdaQueryWrapper);
|
|
|
-
|
|
|
+ locationUtil.geoAdd(LocationUtil.GEO_KEY, js.getcPhone(), Double.parseDouble(js.getLongitude().toString()), Double.parseDouble(js.getLatitude().toString()));
|
|
|
+ return this.updateById(js);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -298,6 +295,27 @@ public class TJsServiceImpl extends ServiceImpl<TJsMapper, TJs> implements TJsSe
|
|
|
return this.updateById(js);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public boolean pcAddJs(TJs js) {
|
|
|
+ // 评分默认最高
|
|
|
+ js.setnStar(MassageConstants.INTEGER_FIVE);
|
|
|
+ // 已服务数量 0
|
|
|
+ js.setnNum(MassageConstants.INTEGER_ZERO);
|
|
|
+ // 佣金比例 10
|
|
|
+ js.setnBili(MassageConstants.INTEGER_TEN);
|
|
|
+ // 服务状态
|
|
|
+ js.setnStatus(JsStatusEnum.JS_NO_SERVICE.getCode());
|
|
|
+ // 上岗状态
|
|
|
+ js.setnStatus2(JsStatusEnum.POST_NOT_ON_DUTY.getCode());
|
|
|
+ // 审核状态
|
|
|
+ js.setnTong(JsStatusEnum.JS_PASS.getCode());
|
|
|
+ js.setnB1(MassageConstants.INTEGER_ZERO);
|
|
|
+ js.setnB2(MassageConstants.INTEGER_ZERO);
|
|
|
+ js.setnB3(MassageConstants.INTEGER_ZERO);
|
|
|
+ js.setDtCreateTime(LocalDateTime.now());
|
|
|
+ return this.save(js);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public TJs getByJsId(String jsId, String openId) {
|
|
|
if (jsId == null || jsId.trim().isEmpty()) {
|