Merge branch 'master' into new-pay
This commit is contained in:
commit
04a03eae69
|
@ -252,7 +252,13 @@ public class AppController extends BaseController
|
||||||
@GetMapping("/fee/list")
|
@GetMapping("/fee/list")
|
||||||
public AjaxResult feeList(EtFeeRule etFeeRule)
|
public AjaxResult feeList(EtFeeRule etFeeRule)
|
||||||
{
|
{
|
||||||
List<EtFeeRule> list = etFeeRuleService.selectEtFeeRuleListByAreaId(etFeeRule.getAreaId());
|
List<EtFeeRule> list = null;
|
||||||
|
Long modelId = etFeeRule.getModelId();
|
||||||
|
if(modelId != null){
|
||||||
|
list = etFeeRuleService.selectRuleInfoListByModelId(etFeeRule.getModelId());
|
||||||
|
}else{
|
||||||
|
list = etFeeRuleService.selectEtFeeRuleListByAreaId(etFeeRule.getAreaId());
|
||||||
|
}
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1450,4 +1450,32 @@ public class AppVerifyController extends BaseController
|
||||||
}
|
}
|
||||||
return toAjax(1);
|
return toAjax(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户获取最后一个订单所属的运营区客服电话 latestServicePhone
|
||||||
|
* 1. 查询用户
|
||||||
|
* 2. 最后一个订单
|
||||||
|
* 3. 查询订单所属运营区
|
||||||
|
* 4. 查询运营区客服电话
|
||||||
|
*/
|
||||||
|
@Log(title = "", businessType = BusinessType.ZEROORDER)
|
||||||
|
@GetMapping("/latestServicePhone")
|
||||||
|
public AjaxResult latestServicePhone(Long userId)
|
||||||
|
{
|
||||||
|
logger.info("根据用户获取最后一个订单所属的运营区客服电话:【userId="+userId+"】");
|
||||||
|
if (ObjectUtil.isNull(userId)){
|
||||||
|
throw new ServiceException("未传userId");
|
||||||
|
}
|
||||||
|
EtOrder etOrder =new EtOrder();
|
||||||
|
etOrder.setUserId(userId);
|
||||||
|
EtOrder etOrder1 = etOrderService.latestOrder2(etOrder);
|
||||||
|
if(ObjectUtil.isNotNull(etOrder1)){
|
||||||
|
EtOperatingArea area = etOperatingAreaService.selectEtOperatingAreaByAreaId(etOrder1.getAreaId());
|
||||||
|
if(ObjectUtil.isNull(area)){
|
||||||
|
return error("未查询到运营区域信息");
|
||||||
|
}
|
||||||
|
return success(area);
|
||||||
|
}
|
||||||
|
return error();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,6 +258,11 @@ public interface EtOrderMapper
|
||||||
*/
|
*/
|
||||||
EtOrder selectLatestOrder(EtOrder etOrder);
|
EtOrder selectLatestOrder(EtOrder etOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最近一笔订单(包含押金订单)
|
||||||
|
*/
|
||||||
|
EtOrder selectLatestOrder2(EtOrder etOrder);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最近一笔订单
|
* 最近一笔订单
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -159,6 +159,11 @@ public interface IEtOrderService
|
||||||
*/
|
*/
|
||||||
EtOrder latestOrder(EtOrder etOrder);
|
EtOrder latestOrder(EtOrder etOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最近一笔订单(包含押金订单)
|
||||||
|
*/
|
||||||
|
EtOrder latestOrder2(EtOrder etOrder);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单退款
|
* 订单退款
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -731,10 +731,28 @@ public class AsDeviceServiceImpl extends ServiceImpl<AsDeviceMapper, AsDevice> i
|
||||||
asDevice.setRemainingPower(electricQuantity.toString());
|
asDevice.setRemainingPower(electricQuantity.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 根据sn获取redis中的最新定位
|
||||||
|
getLatestLocation(asDevice);
|
||||||
}
|
}
|
||||||
return asDevices;
|
return asDevices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void getLatestLocation(AsDevice asDevice) {
|
||||||
|
String msg = redisCache.getCacheObject(CacheConstants.CACHE_DEVICE_KEY + asDevice.getSn());
|
||||||
|
if(StrUtil.isNotBlank(msg)){
|
||||||
|
log.info("【根据sn号查询车辆实时信息】-========redis缓存中的数据:" + msg);
|
||||||
|
LogEntry logEntry = JSONObject.parseObject(msg, LogEntry.class);
|
||||||
|
log.info("【根据sn号查询车辆实时信息】============logEntry转换后的对象: logEntry---【{}】" , JSON.toJSONString(logEntry));
|
||||||
|
LogEntry.LocationValue value = logEntry.getValue();
|
||||||
|
// 坐标转换 WGS84 转 GCJ02
|
||||||
|
double[] doubles = CommonUtil.coordinateConvert(value.getLon(),value.getLat());
|
||||||
|
BigDecimal lon = new BigDecimal(doubles[1]).setScale(8, RoundingMode.HALF_UP);
|
||||||
|
BigDecimal lat = new BigDecimal(doubles[0]).setScale(8, RoundingMode.HALF_UP);
|
||||||
|
asDevice.setLongitude(lon.toString());
|
||||||
|
asDevice.setLatitude(lat.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询车辆数量
|
* 查询车辆数量
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1716,6 +1716,15 @@ public class EtOrderServiceImpl implements IEtOrderService
|
||||||
return order;
|
return order;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最近一笔订单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EtOrder latestOrder2(EtOrder etOrder) {
|
||||||
|
EtOrder order = etOrderMapper.selectLatestOrder2(etOrder);
|
||||||
|
return order;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退款
|
* 退款
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -324,7 +324,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
o.return_type,
|
o.return_type,
|
||||||
o.pay_channel,
|
o.pay_channel,
|
||||||
AsText(o.trip_route) trip_route,
|
AsText(o.trip_route) trip_route,
|
||||||
o.trip_route_str from et_order o
|
o.trip_route_str,
|
||||||
|
o.rental_unit,
|
||||||
|
o.riding_rule,
|
||||||
|
o.riding_rule_json,
|
||||||
|
o.charging_cycle,
|
||||||
|
o.charging_cycle_value,
|
||||||
|
o.capped_amount,
|
||||||
|
o.handling_charge,
|
||||||
|
o.platform_service_fee,
|
||||||
|
o.operator_dividend
|
||||||
|
from et_order o
|
||||||
LEFT JOIN et_user u ON u.user_id = o.user_id
|
LEFT JOIN et_user u ON u.user_id = o.user_id
|
||||||
LEFT JOIN et_operating_area oa ON o.area_id = oa.area_id
|
LEFT JOIN et_operating_area oa ON o.area_id = oa.area_id
|
||||||
where order_id = #{orderId}
|
where order_id = #{orderId}
|
||||||
|
@ -724,6 +734,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectLatestOrder2" resultMap="EtOrderResult">
|
||||||
|
<include refid="selectEtOrderVoNoRoute"/>
|
||||||
|
<where>
|
||||||
|
<if test="userId != null"> and user_id = #{userId}</if>
|
||||||
|
<if test="sn != null"> and sn = #{sn}</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
LIMIT 1
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectLatestOrderList" resultMap="EtOrderResult">
|
<select id="selectLatestOrderList" resultMap="EtOrderResult">
|
||||||
SELECT o.*,u.phonenumber,u.real_name realName
|
SELECT o.*,u.phonenumber,u.real_name realName
|
||||||
FROM et_order o
|
FROM et_order o
|
||||||
|
|
Loading…
Reference in New Issue
Block a user