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

订单列表加指派人权限

parent 163c6c25
...@@ -28,9 +28,10 @@ public interface TOrderMapper extends BaseMapper<TOrder> { ...@@ -28,9 +28,10 @@ public interface TOrderMapper extends BaseMapper<TOrder> {
* @author licancan * @author licancan
* @param page * @param page
* @param param * @param param
* @param userName
* @return {@link IPage<OrderListVO>} * @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> { ...@@ -46,9 +47,10 @@ public interface TOrderMapper extends BaseMapper<TOrder> {
* *
* @author licancan * @author licancan
* @param param * @param param
* @param userName
* @return {@link List< OrderListVO>} * @return {@link List< OrderListVO>}
*/ */
List<OrderListVO> getOrderList(@Param("param") OrderListParam param); List<OrderListVO> getOrderList(@Param("param") OrderListParam param,@Param("userName") String userName);
/** /**
* 通过id查询详情 * 通过id查询详情
......
...@@ -67,7 +67,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -67,7 +67,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
*/ */
@Override @Override
public IPage<OrderListVO> getOrderPageList(Page<OrderListParam> page, OrderListParam param) { 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; return orderList;
} }
...@@ -80,11 +81,12 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme ...@@ -80,11 +81,12 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
*/ */
@Override @Override
public List<OrderListVO> getOrderList(OrderListParam param) { public List<OrderListVO> getOrderList(OrderListParam param) {
YifuUser user = SecurityUtils.getUser();
List<OrderListVO> list; List<OrderListVO> list;
if (CollectionUtils.isNotEmpty(param.getIdList())){ if (CollectionUtils.isNotEmpty(param.getIdList())){
list = baseMapper.getOrderListBySelect(param.getIdList()); list = baseMapper.getOrderListBySelect(param.getIdList());
}else { }else {
list = baseMapper.getOrderList(param); list = baseMapper.getOrderList(param,user.getUsername());
} }
return list; return list;
} }
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
t.ORDER_STATUS as orderStatus t.ORDER_STATUS as orderStatus
from t_order t from t_order t
where t.DELETE_FLAG = 0 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() != ''"> <if test="param.orderNo != null and param.orderNo.trim() != ''">
and t.ORDER_NO = #{param.orderNo} and t.ORDER_NO = #{param.orderNo}
</if> </if>
...@@ -60,7 +61,7 @@ ...@@ -60,7 +61,7 @@
<if test="param.orderStatus != null"> <if test="param.orderStatus != null">
and t.ORDER_STATUS = #{param.orderStatus} and t.ORDER_STATUS = #{param.orderStatus}
</if> </if>
ORDER BY t.ORDER_STATUS,t.CREATE_TIME DESC ORDER BY t.CREATE_TIME DESC
</select> </select>
<select id="getOrderListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO"> <select id="getOrderListBySelect" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO">
...@@ -77,7 +78,7 @@ ...@@ -77,7 +78,7 @@
<foreach collection="idList" index="index" item="item" open="(" separator="," close=")"> <foreach collection="idList" index="index" item="item" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
ORDER BY t.ORDER_STATUS,t.CREATE_TIME DESC ORDER BY t.CREATE_TIME DESC
</select> </select>
<select id="getOrderList" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO"> <select id="getOrderList" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderListVO">
...@@ -91,6 +92,7 @@ ...@@ -91,6 +92,7 @@
t.ORDER_STATUS as orderStatus t.ORDER_STATUS as orderStatus
from t_order t from t_order t
where t.DELETE_FLAG = 0 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() != ''"> <if test="param.orderNo != null and param.orderNo.trim() != ''">
and t.ORDER_NO = #{param.orderNo} and t.ORDER_NO = #{param.orderNo}
</if> </if>
...@@ -112,7 +114,7 @@ ...@@ -112,7 +114,7 @@
<if test="param.orderStatus != null"> <if test="param.orderStatus != null">
and t.ORDER_STATUS = #{param.orderStatus} and t.ORDER_STATUS = #{param.orderStatus}
</if> </if>
ORDER BY t.ORDER_STATUS,t.CREATE_TIME DESC ORDER BY t.CREATE_TIME DESC
</select> </select>
<select id="getOrderDetailById" resultType="com.yifu.cloud.plus.v1.yifu.order.vo.OrderDetailVO"> <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