Commit d1b469e5 authored by 李灿灿's avatar 李灿灿

订单列表加指派人权限

parent 163c6c25
......@@ -28,9 +28,10 @@ public interface TOrderMapper extends BaseMapper<TOrder> {
* @author licancan
* @param page
* @param param
* @param userName
* @return {@link IPage<OrderListVO>}
*/
IPage<OrderListVO> getOrderPageList(Page<OrderListParam> page,@Param("param") OrderListParam param);
IPage<OrderListVO> getOrderPageList(Page<OrderListParam> page,@Param("param") OrderListParam param,@Param("userName") String userName);
/**
* 导出勾选查询结果
......@@ -46,9 +47,10 @@ public interface TOrderMapper extends BaseMapper<TOrder> {
*
* @author licancan
* @param param
* @param userName
* @return {@link List< OrderListVO>}
*/
List<OrderListVO> getOrderList(@Param("param") OrderListParam param);
List<OrderListVO> getOrderList(@Param("param") OrderListParam param,@Param("userName") String userName);
/**
* 通过id查询详情
......
......@@ -67,7 +67,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
*/
@Override
public IPage<OrderListVO> getOrderPageList(Page<OrderListParam> page, OrderListParam param) {
IPage<OrderListVO> orderList = baseMapper.getOrderPageList(page,param);
YifuUser user = SecurityUtils.getUser();
IPage<OrderListVO> orderList = baseMapper.getOrderPageList(page,param,user.getUsername());
return orderList;
}
......@@ -80,11 +81,12 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
*/
@Override
public List<OrderListVO> getOrderList(OrderListParam param) {
YifuUser user = SecurityUtils.getUser();
List<OrderListVO> list;
if (CollectionUtils.isNotEmpty(param.getIdList())){
list = baseMapper.getOrderListBySelect(param.getIdList());
}else {
list = baseMapper.getOrderList(param);
list = baseMapper.getOrderList(param,user.getUsername());
}
return list;
}
......
......@@ -39,6 +39,7 @@
t.ORDER_STATUS as orderStatus
from t_order t
where t.DELETE_FLAG = 0
and #{userName} in (SELECT HANDLE_USER FROM t_order_handler h WHERE h.ORDER_NO = t.ORDER_NO)
<if test="param.orderNo != null and param.orderNo.trim() != ''">
and t.ORDER_NO = #{param.orderNo}
</if>
......@@ -60,7 +61,7 @@
<if test="param.orderStatus != null">
and t.ORDER_STATUS = #{param.orderStatus}
</if>
ORDER BY t.ORDER_STATUS,t.CREATE_TIME DESC
ORDER BY t.CREATE_TIME DESC
</select>
<select id="getOrderListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO">
......@@ -77,7 +78,7 @@
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
ORDER BY t.ORDER_STATUS,t.CREATE_TIME DESC
ORDER BY t.CREATE_TIME DESC
</select>
<select id="getOrderList" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO">
......@@ -91,6 +92,7 @@
t.ORDER_STATUS as orderStatus
from t_order t
where t.DELETE_FLAG = 0
and #{userName} in (SELECT HANDLE_USER FROM t_order_handler h WHERE h.ORDER_NO = t.ORDER_NO)
<if test="param.orderNo != null and param.orderNo.trim() != ''">
and t.ORDER_NO = #{param.orderNo}
</if>
......@@ -112,7 +114,7 @@
<if test="param.orderStatus != null">
and t.ORDER_STATUS = #{param.orderStatus}
</if>
ORDER BY t.ORDER_STATUS,t.CREATE_TIME DESC
ORDER BY t.CREATE_TIME DESC
</select>
<select id="getOrderDetailById" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderDetailVO">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment