Browse Source

悬赏招亲

release
张彭杰 1 year ago
parent
commit
717dacc64c
7 changed files with 58 additions and 27 deletions
  1. 30
      dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/revenuereward/user/RevenueRewardUserQueryController.java
  2. 4
      dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/revenuereward/user/request/UseGetRevenueRewardAbstractQueryParams.java
  3. 3
      dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/revenuereward/user/request/UsePageRevenueRewardRecordQueryParams.java
  4. 15
      dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/withdrawaudit/user/WithdrawAuditUserQueryController.java
  5. 2
      dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/withdrawaudit/user/request/UserPageWithdrawAuditQueryParams.java
  6. 6
      dating-agency-mall-server/src/main/resources/mapper/revenuereward/RevenueRewardViewMapper.xml
  7. 25
      dating-agency-mall-server/src/main/resources/mapper/withdrawaudit/WithdrawAuditViewMapper.xml

30
dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/revenuereward/user/RevenueRewardUserQueryController.java

@ -5,14 +5,12 @@ import com.qniao.dam.api.query.revenuereward.user.request.UsePageRevenueRewardRe
import com.qniao.dam.api.query.revenuereward.user.response.UseGetRevenueRewardAbstractVo;
import com.qniao.dam.api.query.revenuereward.user.response.UseGetRevenueRewardRecordVo;
import com.qniao.dam.query.revenuereward.RevenueRewardQueryService;
import com.qniao.dau.infrastructure.constant.RequestHeaderFields;
import com.qniao.domain.QnPage;
import com.qniao.framework.utils.PageUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Objects;
@ -28,9 +26,14 @@ public class RevenueRewardUserQueryController {
@GetMapping("get/revenue-reward-abstract")
@ApiOperation("获取用户收益摘要")
public UseGetRevenueRewardAbstractVo useGetRevenueRewardAbstract(UseGetRevenueRewardAbstractQueryParams queryParams,
@RequestParam("userId") Long userId) {
if (Objects.isNull(queryParams.getQueryUserId())) {
queryParams.setQueryUserId(userId);
@RequestParam("userId") Long userId,
@RequestHeader(name = RequestHeaderFields.FIELD_ORGANIZATION_ID, required = false) Long orgId) {
if (Objects.isNull(queryParams.getQueryOrgId())) {
queryParams.setQueryOrgId(orgId);
} else {
if (Objects.isNull(queryParams.getQueryUserId())) {
queryParams.setQueryUserId(userId);
}
}
return revenueRewardQueryService.getRevenueRewardAbstract(queryParams);
}
@ -39,11 +42,16 @@ public class RevenueRewardUserQueryController {
@ApiOperation("获取用户收益记录")
public QnPage<UseGetRevenueRewardRecordVo> usePageRevenueRewardRecord(PageUtil pageUtil,
UsePageRevenueRewardRecordQueryParams queryParams,
@RequestParam("userId") Long userId) {
if (Objects.isNull(queryParams.getQueryUserId())) {
queryParams.setQueryUserId(userId);
@RequestParam("userId") Long userId,
@RequestHeader(name = RequestHeaderFields.FIELD_ORGANIZATION_ID, required = false) Long orgId) {
if (Objects.isNull(queryParams.getQueryOrgId())) {
queryParams.setQueryOrgId(orgId);
} else {
if (Objects.isNull(queryParams.getQueryUserId())) {
queryParams.setQueryUserId(userId);
}
}
return PageUtil.convert(revenueRewardQueryService.pageRevenueRewardRecord(pageUtil, queryParams),UseGetRevenueRewardRecordVo.class);
return PageUtil.convert(revenueRewardQueryService.pageRevenueRewardRecord(pageUtil, queryParams), UseGetRevenueRewardRecordVo.class);
}
}

4
dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/revenuereward/user/request/UseGetRevenueRewardAbstractQueryParams.java

@ -12,6 +12,10 @@ public class UseGetRevenueRewardAbstractQueryParams {
@ApiModelProperty("查询用户标识")
private Long queryUserId;
@ApiModelProperty("查询组织标识")
private Long queryOrgId;
@ApiModelProperty("收益开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime revenueTimeFrom;

3
dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/revenuereward/user/request/UsePageRevenueRewardRecordQueryParams.java

@ -11,6 +11,9 @@ public class UsePageRevenueRewardRecordQueryParams {
@ApiModelProperty("查询用户标识")
private Long queryUserId;
@ApiModelProperty("查询组织标识")
private Long queryOrgId;
@ApiModelProperty("收益开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime revenueTimeFrom;

15
dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/withdrawaudit/user/WithdrawAuditUserQueryController.java

@ -3,14 +3,12 @@ package com.qniao.dam.api.query.withdrawaudit.user;
import com.qniao.dam.api.query.withdrawaudit.user.request.UserPageWithdrawAuditQueryParams;
import com.qniao.dam.api.query.withdrawaudit.user.response.UserPageWithdrawAuditVo;
import com.qniao.dam.query.withdrawaudit.WithdrawAuditQueryService;
import com.qniao.dau.infrastructure.constant.RequestHeaderFields;
import com.qniao.domain.QnPage;
import com.qniao.framework.utils.PageUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Objects;
@ -34,10 +32,15 @@ public class WithdrawAuditUserQueryController {
@GetMapping("page/withdraw-audit")
@ApiOperation("用户获取提现审核记录")
public QnPage<UserPageWithdrawAuditVo> userPageWithdrawAudit(@RequestParam("userId") Long userId,
@RequestHeader(name = RequestHeaderFields.FIELD_ORGANIZATION_ID, required = false) Long orgId,
PageUtil pageUtil,
UserPageWithdrawAuditQueryParams queryParams) {
if (Objects.isNull(queryParams.getQueryUserId())) {
queryParams.setQueryUserId(userId);
if (Objects.isNull(queryParams.getQueryOrgId())) {
queryParams.setQueryOrgId(orgId);
} else {
if (Objects.isNull(queryParams.getQueryUserId())) {
queryParams.setQueryUserId(userId);
}
}
return PageUtil.convert(withdrawAuditQueryService.pageWithdrawAudit(queryParams, pageUtil), UserPageWithdrawAuditVo.class);
}

2
dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/withdrawaudit/user/request/UserPageWithdrawAuditQueryParams.java

@ -11,6 +11,8 @@ public class UserPageWithdrawAuditQueryParams {
private Long queryUserId;
private Long queryOrgId;
@ApiModelProperty("申请开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime applyTimeFrom;

6
dating-agency-mall-server/src/main/resources/mapper/revenuereward/RevenueRewardViewMapper.xml

@ -15,6 +15,9 @@
<if test="queryParams.queryUserId != null">
and drr.user_id = #{queryParams.queryUserId}
</if>
<if test="queryParams.queryOrgId != null">
and drr.org_id = #{queryParams.queryOrgId}
</if>
<if test="queryParams.tradeType != null">
and drrr.trade_type = #{queryParams.tradeType}
</if>
@ -40,6 +43,9 @@
<if test="queryParams.queryUserId != null">
and drr.user_id = #{queryParams.queryUserId}
</if>
<if test="queryParams.queryOrgId != null">
and drr.org_id = #{queryParams.queryOrgId}
</if>
<if test="queryParams.tradeType != null">
and drrr.trade_type = #{queryParams.tradeType}
</if>

25
dating-agency-mall-server/src/main/resources/mapper/withdrawaudit/WithdrawAuditViewMapper.xml

@ -5,21 +5,26 @@
<select id="pageWithdrawAudit"
resultType="com.qniao.dam.api.query.withdrawaudit.user.response.UserPageWithdrawAuditVo">
select
dwa.id,
dwa.wallet_account_id,
dwa.wallet_account_user_id,
dm.`name` as walletAccountUserName,
dwa.withdraw_amount,
dwa.`status`,
dwa.`create_time` as applyTime,
dwa.withdraw_type,
dwa.ext_details_info
dwa.id,
dwa.wallet_account_id,
dwa.wallet_account_user_id,
dwa.identity_type,
IF(dwa.identity_type=2,dao.full_name,dm.`name`) as walletAccountUserName,
dwa.withdraw_amount,
dwa.`status`,
dwa.`create_time` as applyTime,
dwa.withdraw_type,
dwa.ext_details_info
from da_withdraw_audit as dwa
LEFT JOIN da_matchmaker as dm on dwa.wallet_account_user_id=dm.user_id and dm.is_delete=0
LEFT JOIN da_matchmaker as dm on dwa.wallet_account_user_id=dm.user_id and dm.is_delete=0
LEFT JOIN da_organization as dao on dao.id=dwa.wallet_account_org_id
where dwa.is_delete=0
<if test="queryParams.queryUserId != null">
and dm.user_id = #{queryParams.queryUserId}
</if>
<if test="queryParams.queryOrgId != null">
and dao.id = #{queryParams.queryOrgId}
</if>
<if test="queryParams.status != null">
and dwa.`status` = #{queryParams.status}
</if>

Loading…
Cancel
Save