|
|
|
@ -1,17 +1,23 @@ |
|
|
|
package com.qniao.dam.api.query.pointaccount.user; |
|
|
|
|
|
|
|
import com.qniao.dam.api.query.pointaccount.user.request.PagePointAccountRecordQueryParams; |
|
|
|
import com.qniao.dam.api.query.pointaccount.user.response.PagePointAccountRecordVo; |
|
|
|
import com.qniao.dam.api.query.pointaccount.user.response.PointAccountVo; |
|
|
|
import com.qniao.dam.domain.aggregate.pointaccount.entity.PointAccount; |
|
|
|
import com.qniao.dam.query.pointaccount.PointAccountQueryService; |
|
|
|
import com.qniao.domain.QnPage; |
|
|
|
import com.qniao.framework.utils.PageUtil; |
|
|
|
import com.qniao.framework.utils.TypeConvertUtils; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
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 javax.annotation.Resource; |
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
@Api(tags = "积分账号") |
|
|
|
@RestController |
|
|
|
@ -28,4 +34,14 @@ public class PointAccountUserQueryController { |
|
|
|
return TypeConvertUtils.convert(pointAccount, PointAccountVo.class); |
|
|
|
} |
|
|
|
|
|
|
|
@GetMapping("page/point-account-record") |
|
|
|
@ApiOperation("用户获取积分账号记录分页") |
|
|
|
public QnPage<PagePointAccountRecordVo> userPagePointAccountRecord(PageUtil pageUtil, |
|
|
|
@Validated PagePointAccountRecordQueryParams queryParams, |
|
|
|
@RequestParam("userId") Long userId) { |
|
|
|
if (Objects.isNull(queryParams.getQueryUserId())) { |
|
|
|
queryParams.setQueryUserId(userId); |
|
|
|
} |
|
|
|
return PageUtil.convert(pointAccountQueryService.pagePointAccountRecord(queryParams, pageUtil), PagePointAccountRecordVo.class); |
|
|
|
} |
|
|
|
} |