1.代客下单 台桌最新订单号查询问题fix
This commit is contained in:
@@ -24,5 +24,5 @@ public interface TbShopTableMapper {
|
||||
int updateByPrimaryKey(TbShopTable record);
|
||||
|
||||
List<TbShopTable> selectByShopIdAndStatus(@Param("shopId") String shopId,@Param("areaId") String areaId,@Param("status") String status);
|
||||
List<TbShopTableVO> selectTableInfo(@Param("shopId") String shopId, @Param("areaId") String areaId, @Param("status") String status);
|
||||
List<TbShopTableVO> selectTableInfo(@Param("shopId") String shopId, @Param("areaId") String areaId, @Param("status") String status, @Param("day") String day);
|
||||
}
|
||||
|
||||
@@ -682,6 +682,12 @@ public class OrderService {
|
||||
}
|
||||
}
|
||||
|
||||
if (!StrUtil.isBlank(orderVo.getTableId())) {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getStatus, TableStateEnum.USING.getState()));
|
||||
}
|
||||
|
||||
JSONObject object=new JSONObject();
|
||||
String outNumber= redisUtil.getMessage(RedisCst.OUT_NUMBER.concat(orderInfo.getShopId().toString()));
|
||||
Integer number=1;
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ShopInfoService {
|
||||
|
||||
PageHelperUtil.startPage(page, pageSize);
|
||||
// List<TbShopTable> shopTables=tbShopTableMapper.selectByShopIdAndStatus(shopId,areaId,status);
|
||||
List<TbShopTableVO> tbShopTableVOList = tbShopTableMapper.selectTableInfo(shopId, areaId, status);
|
||||
List<TbShopTableVO> tbShopTableVOList = tbShopTableMapper.selectTableInfo(shopId, areaId, status, DateUtils.getDay());
|
||||
PageInfo pageInfo=new PageInfo(tbShopTableVOList);
|
||||
|
||||
return Result.success(CodeEnum.SUCCESS,pageInfo);
|
||||
|
||||
@@ -230,9 +230,9 @@
|
||||
</select>
|
||||
<select id="selectTableInfo" resultType="com.chaozhanggui.system.cashierservice.entity.vo.TbShopTableVO">
|
||||
select a.*, b.user_id, c.master_id, c.id as orderId, c.order_no as orderNo, c.amount as orderAmount from tb_shop_table a
|
||||
left join tb_order_info b on a.qrcode=b.table_id and (b.`status`='unpaid' or b.`status`='paying') and b.user_id is not null and b.shop_id=#{shopId}
|
||||
left join tb_order_info c on a.qrcode=c.table_id and (c.`status`='unpaid' or c.`status`='paying') and c.master_id is not null and c.shop_id=#{shopId}
|
||||
where a.shop_id=#{shopId}
|
||||
left join tb_order_info b on a.qrcode=b.table_id and (b.`status`='unpaid') and b.user_id is not null and b.shop_id=#{shopId}
|
||||
left join tb_order_info c on a.qrcode=c.table_id and (c.`status`='unpaid') and c.master_id is not null and c.shop_id=#{shopId}
|
||||
where a.shop_id=#{shopId} and b.trade_day=#{day}
|
||||
<if test="areaId != null and areaId !=''">
|
||||
and a.area_id = #{areaId}
|
||||
</if>
|
||||
@@ -241,7 +241,7 @@
|
||||
<if test="status != null and status !=''">
|
||||
and a.status = #{status}
|
||||
</if>
|
||||
GROUP BY a.id
|
||||
GROUP BY a.qrcode
|
||||
order by a.`sort` asc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user