|
@@ -1,12 +1,9 @@
|
|
package com.citu.module.pay.controller.app.currency;
|
|
package com.citu.module.pay.controller.app.currency;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
import cn.hutool.core.collection.CollUtil;
|
|
-import com.citu.framework.common.enums.UserTypeEnum;
|
|
|
|
import com.citu.framework.common.pojo.CommonResult;
|
|
import com.citu.framework.common.pojo.CommonResult;
|
|
-import com.citu.framework.common.pojo.PageParam;
|
|
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
import com.citu.framework.common.pojo.PageResult;
|
|
import com.citu.module.pay.controller.admin.currency.vo.recharge.PayCurrencyRechargePageReqVO;
|
|
import com.citu.module.pay.controller.admin.currency.vo.recharge.PayCurrencyRechargePageReqVO;
|
|
-import com.citu.module.pay.controller.admin.currency.vo.recharge.PayCurrencyRechargeRespVO;
|
|
|
|
import com.citu.module.pay.controller.app.currency.vo.recharge.AppPayCurrencyRechargeCreateReqVO;
|
|
import com.citu.module.pay.controller.app.currency.vo.recharge.AppPayCurrencyRechargeCreateReqVO;
|
|
import com.citu.module.pay.controller.app.currency.vo.recharge.AppPayCurrencyRechargeCreateRespVO;
|
|
import com.citu.module.pay.controller.app.currency.vo.recharge.AppPayCurrencyRechargeCreateRespVO;
|
|
import com.citu.module.pay.controller.app.currency.vo.recharge.AppPayCurrencyRechargeRespVO;
|
|
import com.citu.module.pay.controller.app.currency.vo.recharge.AppPayCurrencyRechargeRespVO;
|
|
@@ -18,7 +15,6 @@ import com.citu.module.pay.service.order.PayOrderService;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -29,7 +25,7 @@ import java.util.List;
|
|
import static com.citu.framework.common.pojo.CommonResult.success;
|
|
import static com.citu.framework.common.pojo.CommonResult.success;
|
|
import static com.citu.framework.common.util.collection.CollectionUtils.convertList;
|
|
import static com.citu.framework.common.util.collection.CollectionUtils.convertList;
|
|
import static com.citu.framework.common.util.servlet.ServletUtils.getClientIP;
|
|
import static com.citu.framework.common.util.servlet.ServletUtils.getClientIP;
|
|
-import static com.citu.framework.security.core.util.SecurityFrameworkUtils.getLoginUserDataId;
|
|
|
|
|
|
+import static com.citu.framework.security.core.util.SecurityFrameworkUtils.getLoginUserDataId2;
|
|
import static com.citu.framework.web.core.util.WebFrameworkUtils.getLoginUserId;
|
|
import static com.citu.framework.web.core.util.WebFrameworkUtils.getLoginUserId;
|
|
import static com.citu.framework.web.core.util.WebFrameworkUtils.getLoginUserType;
|
|
import static com.citu.framework.web.core.util.WebFrameworkUtils.getLoginUserType;
|
|
|
|
|
|
@@ -50,7 +46,7 @@ public class AppPayCurrencyRechargeController {
|
|
public CommonResult<AppPayCurrencyRechargeCreateRespVO> createCurrencyRecharge(
|
|
public CommonResult<AppPayCurrencyRechargeCreateRespVO> createCurrencyRecharge(
|
|
@Valid @RequestBody AppPayCurrencyRechargeCreateReqVO reqVO) {
|
|
@Valid @RequestBody AppPayCurrencyRechargeCreateReqVO reqVO) {
|
|
PayCurrencyRechargeDO currencyRecharge = currencyRechargeService.createCurrencyRecharge(
|
|
PayCurrencyRechargeDO currencyRecharge = currencyRechargeService.createCurrencyRecharge(
|
|
- getLoginUserDataId(Long.class), getLoginUserId(), getLoginUserType(), getClientIP(), reqVO);
|
|
|
|
|
|
+ getLoginUserDataId2(Long.class), getLoginUserId(), getLoginUserType(), getClientIP(), reqVO);
|
|
return success(PayCurrencyRechargeConvert.INSTANCE.convert(currencyRecharge));
|
|
return success(PayCurrencyRechargeConvert.INSTANCE.convert(currencyRecharge));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -58,8 +54,11 @@ public class AppPayCurrencyRechargeController {
|
|
@Operation(summary = "获得货币账户充值记录分页")
|
|
@Operation(summary = "获得货币账户充值记录分页")
|
|
public CommonResult<PageResult<AppPayCurrencyRechargeRespVO>> getCurrencyRechargePage(
|
|
public CommonResult<PageResult<AppPayCurrencyRechargeRespVO>> getCurrencyRechargePage(
|
|
@Valid PayCurrencyRechargePageReqVO pageReqVO) {
|
|
@Valid PayCurrencyRechargePageReqVO pageReqVO) {
|
|
- PageResult<PayCurrencyRechargeDO> pageResult = currencyRechargeService
|
|
|
|
- .getCurrencyRechargePackagePage(pageReqVO);
|
|
|
|
|
|
+ PageResult<PayCurrencyRechargeDO> pageResult = currencyRechargeService.getCurrencyRechargePackagePage(
|
|
|
|
+ getLoginUserDataId2(Long.class),
|
|
|
|
+ getLoginUserId(),
|
|
|
|
+ getLoginUserType(),
|
|
|
|
+ pageReqVO);
|
|
if (CollUtil.isEmpty(pageResult.getList())) {
|
|
if (CollUtil.isEmpty(pageResult.getList())) {
|
|
return success(PageResult.empty(pageResult.getTotal()));
|
|
return success(PageResult.empty(pageResult.getTotal()));
|
|
}
|
|
}
|