package org.ta.pddserver.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.ta.pddserver.entity.CollectOrderEntity;

@Mapper
public interface CollectOrderMapper extends BaseMapper<CollectOrderEntity> {

    @Select("SELECT * FROM `collect_order` WHERE `orderCode` = #{orderCode};")
    CollectOrderEntity findByOrderCode(String orderCode);

    @Update("UPDATE `collect_order` SET `status` = #{status} WHERE `uid` = #{uid};")
    int updateOrderStatusById(int status, String uid);
}
