package org.jebot.repository.xxpay;

import org.jebot.models.xxpay.MchInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Component;

import javax.transaction.Transactional;

@Component
public interface MchInfoRepository extends JpaRepository<MchInfo, Long> {

    @Modifying
    @Transactional
    @Query("UPDATE t_mch_info t SET t.status =:status WHERE t.mchId =:mchId")
    int updateStatusByMchId(Long mchId, int status);

}
