package com.softwarebr.nunu.dao.res;

import com.softwarebr.nunu.entity.res.Property;
import com.brframework.commondb.core.CommonRepository;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @date 2020-02-21 11:49:00
 * @author lilin
 */

@Repository
public interface PropertyDao extends CommonRepository<Long, Property> {


    /**
     * 修改项目的对接状态
     * @param propertyId
     * @param status
     */
    @Modifying
    @Query("update Property set status = :status where id = :propertyId")
    void updateStatus(@Param("propertyId") Long propertyId, @Param("status") Integer status);


}