DataRulesMapper.java 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package edp.davinci.dao;
  2. import edp.davinci.model.DataRules;
  3. import edp.davinci.model.DataSubject;
  4. import org.apache.ibatis.annotations.Delete;
  5. import org.apache.ibatis.annotations.Param;
  6. import org.apache.ibatis.annotations.Select;
  7. import org.apache.ibatis.annotations.Update;
  8. import org.springframework.stereotype.Component;
  9. import java.util.List;
  10. @Component
  11. public interface DataRulesMapper
  12. {
  13. int insert(DataRules dataRules);
  14. @Delete({"delete from `data_rules` where id = #{id}"})
  15. int deleteById(@Param("id") Long id);
  16. @Update({
  17. "update `dict_type`",
  18. "set `dict_name` = #{dictName,jdbcType=VARCHAR},",
  19. "`dict_type` = #{dictType,jdbcType=VARCHAR},",
  20. "`status` = #{status,jdbcType=BIGINT},",
  21. "`remark` = #{remark,jdbcType=VARCHAR},",
  22. "`update_by` = #{updateBy,jdbcType=BIGINT},",
  23. "`update_time` = #{updateTime,jdbcType=TIMESTAMP}",
  24. "where dict_id = #{dictId,jdbcType=BIGINT}"
  25. })
  26. int update(DataRules dataRules);
  27. @Select({"select * from `data_rules`"})
  28. List<DataSubject> getDataRulesList();
  29. }