MatchmakerApplyServiceImpl.java 994 B

1234567891011121314151617181920212223242526272829303132
  1. package com.zhentao.service.impl;
  2. import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  3. import com.zhentao.mapper.MatchmakerApplyMapper;
  4. import com.zhentao.pojo.MatchmakerApply;
  5. import com.zhentao.service.MatchmakerApplyService;
  6. import org.springframework.stereotype.Service;
  7. import java.time.LocalDateTime;
  8. /**
  9. * 红娘申请Service实现类
  10. */
  11. @Service
  12. public class MatchmakerApplyServiceImpl extends ServiceImpl<MatchmakerApplyMapper, MatchmakerApply>
  13. implements MatchmakerApplyService {
  14. @Override
  15. public boolean submitApply(MatchmakerApply matchmakerApply) {
  16. // 设置创建时间
  17. matchmakerApply.setCreateTime(LocalDateTime.now());
  18. matchmakerApply.setUpdateTime(LocalDateTime.now());
  19. // 设置默认状态为正常
  20. if (matchmakerApply.getStatus() == null) {
  21. matchmakerApply.setStatus(0);
  22. }
  23. // 保存申请信息
  24. return this.save(matchmakerApply);
  25. }
  26. }