| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- package cn.seecoder.web.dao.project;
- import cn.seecoder.web.model.enums.CommitRelatedEnum;
- import org.apache.ibatis.annotations.*;
- import org.springframework.stereotype.Repository;
- import cn.seecoder.web.dao.provider.GeneralInsertUpdateSqlProvider;
- import cn.seecoder.web.model.po.project.CommitPO;
- import java.util.List;
- /**
- * @author PuHong Weng
- * @date 2021/3/23
- * @description:
- */
- @Repository
- public interface CommitMapper {
- @InsertProvider(type = GeneralInsertUpdateSqlProvider.class, method = "insert")
- int insert(CommitPO commitPO, String... ignoredCols);
- @UpdateProvider(type= GeneralInsertUpdateSqlProvider.class, method="updateById")
- int update(CommitPO commitPO);
- @Select("select * from commit where project_id = #{projectId} and related_type = #{type}")
- List<CommitPO> selectByProjectIdAndType(@Param("projectId") int projectId,@Param("type") CommitRelatedEnum type);
- @Select("select count(*) from commit where id = #{id}")
- int isExist(String id);
- @Select("select * from commit where related_id = #{id} and related_type = #{type}")
- List<CommitPO> selectByRelatedIdAndType(@Param("id") int id,@Param("type") CommitRelatedEnum type);
- @Select("select * from commit where project_id = #{projectId}")
- List<CommitPO> selectByProjectId(Integer projectId);
- @Select("select * from commit where id = #{id}")
- CommitPO selectByCommitId(@Param("id") String id);
- }
|