公会-提现-账户-国家-排序
This commit is contained in:
@@ -77,7 +77,9 @@ public class GuildUsdWithdrawAccountConfigAdminService {
|
||||
return voPage;
|
||||
}
|
||||
|
||||
public void save(Integer partitionId, String accountType, String country, BigDecimal usdRatio, BigDecimal withdrawRate, Integer seq, int adminId) {
|
||||
public void save(Integer partitionId, String accountType, String country,
|
||||
BigDecimal usdRatio, BigDecimal withdrawRate,
|
||||
Boolean enable, Integer seq, int adminId) {
|
||||
GuildUsdWithdrawAccountConfig config = service.lambdaQuery()
|
||||
.eq(GuildUsdWithdrawAccountConfig::getPartitionId, partitionId)
|
||||
.eq(GuildUsdWithdrawAccountConfig::getAccountType, accountType)
|
||||
@@ -93,6 +95,7 @@ public class GuildUsdWithdrawAccountConfigAdminService {
|
||||
.eq(GuildUsdWithdrawAccountConfig::getCountry, country)
|
||||
.set(GuildUsdWithdrawAccountConfig::getUsdRatio, usdRatio)
|
||||
.set(GuildUsdWithdrawAccountConfig::getFeeRate, withdrawRate)
|
||||
.set(GuildUsdWithdrawAccountConfig::getEnable, enable)
|
||||
.set(GuildUsdWithdrawAccountConfig::getSeq, seq)
|
||||
.set(GuildUsdWithdrawAccountConfig::getUpdateTime, new Date())
|
||||
.set(GuildUsdWithdrawAccountConfig::getAdminId, adminId)
|
||||
|
@@ -94,14 +94,14 @@ public class GuildUsdWithdrawAccountConfigController extends BaseController {
|
||||
@ApiImplicitParam(name = "seq", value = "顺序", required = true),
|
||||
})
|
||||
public BusiResult<Void> save(Integer partitionId, String accountType, String country,
|
||||
BigDecimal usdRatio, BigDecimal withdrawRate, Integer seq) {
|
||||
BigDecimal usdRatio, BigDecimal withdrawRate, Boolean enable, Integer seq) {
|
||||
if (null == partitionId ||
|
||||
!StringUtils.hasText(accountType) || !StringUtils.hasText(country) ||
|
||||
null == usdRatio || null == withdrawRate || null == seq){
|
||||
throw new AdminServiceException(BusiStatus.PARAMERROR);
|
||||
}
|
||||
int adminId = getAdminId();
|
||||
service.save(partitionId, accountType, country, usdRatio, withdrawRate, seq, adminId);
|
||||
service.save(partitionId, accountType, country, usdRatio, withdrawRate, enable, seq, adminId);
|
||||
return BusiResult.success();
|
||||
}
|
||||
}
|
||||
|
@@ -24,5 +24,4 @@ public class GuildMemberUsdWithdrawAccountVo {
|
||||
|
||||
@ApiModelProperty("是否已绑定")
|
||||
private Boolean hasBound;
|
||||
|
||||
}
|
||||
|
@@ -33,6 +33,7 @@ public class GuildUsdWithdrawAccountVo {
|
||||
private String currency;
|
||||
private BigDecimal usdRatio;
|
||||
private BigDecimal feeRate;
|
||||
private Integer seq;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@ public class GuildUsdWithdrawAccountConfigService extends ServiceImpl<GuildUsdWi
|
||||
.in(GuildUsdWithdrawAccountConfig::getAccountType, accountTypeList)
|
||||
.eq(GuildUsdWithdrawAccountConfig::getPartitionId, partitionId)
|
||||
.eq(GuildUsdWithdrawAccountConfig::getEnable, Boolean.TRUE)
|
||||
.orderByAsc(GuildUsdWithdrawAccountConfig::getSeq)
|
||||
.list();
|
||||
}
|
||||
|
||||
|
@@ -78,7 +78,6 @@ public class GuildUsdWithdrawAccountService extends ServiceImpl<GuildUsdWithdraw
|
||||
vo.setCurrency(config.getCurrency());
|
||||
vo.setUsdRatio(config.getUsdRatio());
|
||||
vo.setWithdrawRate(config.getFeeRate());
|
||||
|
||||
return vo;
|
||||
}).toList();
|
||||
}
|
||||
@@ -122,9 +121,11 @@ public class GuildUsdWithdrawAccountService extends ServiceImpl<GuildUsdWithdraw
|
||||
country.setCurrency(config.getCurrency());
|
||||
country.setUsdRatio(config.getUsdRatio());
|
||||
country.setFeeRate(config.getFeeRate());
|
||||
country.setSeq(config.getSeq());
|
||||
}
|
||||
return country;
|
||||
})
|
||||
.sorted(Comparator.comparing(GuildUsdWithdrawAccountVo.Country::getSeq))
|
||||
.collect(Collectors.toList()));
|
||||
|
||||
accountVo.setFields(accountFields);
|
||||
|
Reference in New Issue
Block a user