| 1234567891011121314151617181920212223242526272829303132 |
- package com.zhentao.service.impl;
- import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
- import com.zhentao.mapper.MatchmakerApplyMapper;
- import com.zhentao.pojo.MatchmakerApply;
- import com.zhentao.service.MatchmakerApplyService;
- import org.springframework.stereotype.Service;
- import java.time.LocalDateTime;
- /**
- * 红娘申请Service实现类
- */
- @Service
- public class MatchmakerApplyServiceImpl extends ServiceImpl<MatchmakerApplyMapper, MatchmakerApply>
- implements MatchmakerApplyService {
-
- @Override
- public boolean submitApply(MatchmakerApply matchmakerApply) {
- // 设置创建时间
- matchmakerApply.setCreateTime(LocalDateTime.now());
- matchmakerApply.setUpdateTime(LocalDateTime.now());
-
- // 设置默认状态为正常
- if (matchmakerApply.getStatus() == null) {
- matchmakerApply.setStatus(0);
- }
-
- // 保存申请信息
- return this.save(matchmakerApply);
- }
- }
|