AttachMngsServiceImpl.java 919 B

12345678910111213141516171819202122232425262728293031
  1. package com.ruoyi.system.service.impl;
  2. import com.ruoyi.common.annotation.DataSource;
  3. import com.ruoyi.common.enums.DataSourceType;
  4. import com.ruoyi.system.domain.AttachMngs;
  5. import com.ruoyi.system.mapper.AttachMngsMapper;
  6. import com.ruoyi.system.service.IAttachMngsService;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.stereotype.Service;
  9. @DataSource(value = DataSourceType.ATTACHS)
  10. @Service
  11. public class AttachMngsServiceImpl implements IAttachMngsService {
  12. @Autowired
  13. private AttachMngsMapper attachMngsMapper;
  14. @Override
  15. public Integer insertAttachMngs(AttachMngs attachmngs) {
  16. return attachMngsMapper.insertAttachmngs(attachmngs);
  17. }
  18. @Override
  19. public Byte[] getImg(String attachId) {
  20. AttachMngs attachMngs = attachMngsMapper.getAttachmngsBySysIdAndAttchId(attachId);
  21. return attachMngs.getAttachFile();
  22. }
  23. }