PublisherImpl.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. package com.ruoyi.app2.service.impl;
  2. import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  3. import com.ruoyi.app2.domain.Publisher;
  4. import com.ruoyi.app2.mapper.PublishMapper;
  5. import com.ruoyi.app2.service.IPublisherService;
  6. import com.ruoyi.common.utils.DateUtils;
  7. import lombok.extern.slf4j.Slf4j;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.stereotype.Service;
  10. import java.util.List;
  11. @Service
  12. @Slf4j
  13. public class PublisherImpl extends ServiceImpl<PublishMapper,Publisher> implements IPublisherService {
  14. @Autowired
  15. private PublishMapper publishMapper;
  16. /**
  17. * 查询邮贝发行方信息
  18. *
  19. * @param publisherId 邮贝发行方信息主键
  20. * @return 邮贝发行方信息
  21. */
  22. @Override
  23. public Publisher selectPostPublisherByPublisherId(Long publisherId)
  24. {
  25. return publishMapper.selectPostPublisherByPublisherId(publisherId);
  26. }
  27. /**
  28. * 查询邮贝发行方信息列表
  29. *
  30. * @param postPublisher 邮贝发行方信息
  31. * @return 邮贝发行方信息
  32. */
  33. @Override
  34. public List<Publisher> selectPostPublisherList(Publisher postPublisher)
  35. {
  36. return publishMapper.selectPostPublisherList(postPublisher);
  37. }
  38. /**
  39. * 新增邮贝发行方信息
  40. *
  41. * @param postPublisher 邮贝发行方信息
  42. * @return 结果
  43. */
  44. @Override
  45. public int insertPostPublisher(Publisher postPublisher)
  46. {
  47. postPublisher.setCreateTime(DateUtils.getNowDate());
  48. return publishMapper.insertPostPublisher(postPublisher);
  49. }
  50. /**
  51. * 修改邮贝发行方信息
  52. *
  53. * @param postPublisher 邮贝发行方信息
  54. * @return 结果
  55. */
  56. @Override
  57. public int updatePostPublisher(Publisher postPublisher)
  58. {
  59. postPublisher.setUpdateTime(DateUtils.getNowDate());
  60. return publishMapper.updatePostPublisher(postPublisher);
  61. }
  62. /**
  63. * 批量删除邮贝发行方信息
  64. *
  65. * @param publisherIds 需要删除的邮贝发行方信息主键
  66. * @return 结果
  67. */
  68. @Override
  69. public int deletePostPublisherByPublisherIds(Long[] publisherIds)
  70. {
  71. return publishMapper.deletePostPublisherByPublisherIds(publisherIds);
  72. }
  73. /**
  74. * 删除邮贝发行方信息信息
  75. *
  76. * @param publisherId 邮贝发行方信息主键
  77. * @return 结果
  78. */
  79. @Override
  80. public int deletePostPublisherByPublisherId(Long publisherId)
  81. {
  82. return publishMapper.deletePostPublisherByPublisherId(publisherId);
  83. }
  84. }