1. 客服电话根据用户的最后一个订单的运营区
This commit is contained in:
parent
2c6a7a3869
commit
a0fb0b4ea0
|
@ -1450,4 +1450,32 @@ public class AppVerifyController extends BaseController
|
|||
}
|
||||
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 selectLatestOrder2(EtOrder etOrder);
|
||||
|
||||
/**
|
||||
* 最近一笔订单
|
||||
*/
|
||||
|
|
|
@ -159,6 +159,11 @@ public interface IEtOrderService
|
|||
*/
|
||||
EtOrder latestOrder(EtOrder etOrder);
|
||||
|
||||
/**
|
||||
* 最近一笔订单(包含押金订单)
|
||||
*/
|
||||
EtOrder latestOrder2(EtOrder etOrder);
|
||||
|
||||
/**
|
||||
* 订单退款
|
||||
*/
|
||||
|
|
|
@ -1709,6 +1709,15 @@ public class EtOrderServiceImpl implements IEtOrderService
|
|||
return order;
|
||||
}
|
||||
|
||||
/**
|
||||
* 最近一笔订单
|
||||
*/
|
||||
@Override
|
||||
public EtOrder latestOrder2(EtOrder etOrder) {
|
||||
EtOrder order = etOrderMapper.selectLatestOrder2(etOrder);
|
||||
return order;
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款
|
||||
*/
|
||||
|
|
|
@ -727,6 +727,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LIMIT 1
|
||||
</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 o.*,u.phonenumber,u.real_name realName
|
||||
FROM et_order o
|
||||
|
|
Loading…
Reference in New Issue
Block a user