5 changed files with 68 additions and 6 deletions
Unified View
Diff Options
-
4dating-agency-mall-server/src/main/java/com/qniao/dam/api/command/order/user/request/UserSubmitMarriageBountyOrderDto.java
-
22dating-agency-mall-server/src/main/java/com/qniao/dam/application/service/order/OrderApplicationService.java
-
7dating-agency-mall-server/src/main/java/com/qniao/dam/infrastructure/persistent/dao/domain/MatchmakerMarriageInformationDao.java
-
9dating-agency-mall-server/src/main/java/com/qniao/dam/query/matchmakermarriage/MatchmakerMarriageInformationQueryService.java
-
32dating-agency-mall-server/src/main/java/com/qniao/dam/query/matchmakermarriage/impl/MatchmakerMarriageInformationQueryServiceImpl.java
@ -0,0 +1,7 @@ |
|||||
|
package com.qniao.dam.infrastructure.persistent.dao.domain; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qniao.das.domian.aggregate.matchmakermarriage.MatchmakerMarriageInformation; |
||||
|
|
||||
|
public interface MatchmakerMarriageInformationDao extends BaseMapper<MatchmakerMarriageInformation> { |
||||
|
} |
||||
@ -0,0 +1,9 @@ |
|||||
|
package com.qniao.dam.query.matchmakermarriage; |
||||
|
|
||||
|
import com.qniao.das.domian.aggregate.matchmakermarriage.MatchmakerMarriageInformation; |
||||
|
|
||||
|
public interface MatchmakerMarriageInformationQueryService { |
||||
|
|
||||
|
MatchmakerMarriageInformation queryByRecommend(Long userId, Long miId); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,32 @@ |
|||||
|
package com.qniao.dam.query.matchmakermarriage.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.qniao.dam.infrastructure.persistent.dao.domain.MatchmakerMarriageInformationDao; |
||||
|
import com.qniao.dam.query.matchmakermarriage.MatchmakerMarriageInformationQueryService; |
||||
|
import com.qniao.das.domian.aggregate.matchmakermarriage.MatchmakerMarriageInformation; |
||||
|
import com.qniao.das.domian.aggregate.matchmakermarriage.constant.RelationTypeEnum; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.Objects; |
||||
|
|
||||
|
@Service |
||||
|
public class MatchmakerMarriageInformationQueryServiceImpl implements MatchmakerMarriageInformationQueryService { |
||||
|
|
||||
|
@Resource |
||||
|
private MatchmakerMarriageInformationDao matchmakerMarriageInformationDao; |
||||
|
|
||||
|
@Override |
||||
|
public MatchmakerMarriageInformation queryByRecommend(Long userId, Long miId) { |
||||
|
LambdaQueryWrapper<MatchmakerMarriageInformation> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(MatchmakerMarriageInformation::getUserId, userId); |
||||
|
if (Objects.nonNull(miId)) { |
||||
|
wrapper.eq(MatchmakerMarriageInformation::getMiId, miId); |
||||
|
} else { |
||||
|
wrapper.isNull(MatchmakerMarriageInformation::getMiId); |
||||
|
} |
||||
|
wrapper.eq(MatchmakerMarriageInformation::getRelationType, RelationTypeEnum.RECOMMEND); |
||||
|
wrapper.last("limit 1"); |
||||
|
return matchmakerMarriageInformationDao.selectOne(wrapper); |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save