package com.chenyang.nse.bussiness.dao.table.base;

import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.orm.table.base.TBaseUsermenu;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
public class TBaseUserMenuDao extends BaseDao<TBaseUsermenu, String> {
   @Transactional
   @Modifying
   @Query
   public void removeUsermenu(String userId) {
      String sql = "delete from t_base_usermenu  where userid = :userId";
      this.getSession().createNativeQuery(sql).executeUpdate();
   }
}
