v1.1 后台-用户充值记录查询-是否首充
This commit is contained in:
@@ -242,7 +242,7 @@ public class ChargeRecordAdminService extends BaseService {
|
||||
|
||||
ChargeRecord firstCr = firstChargeMap.get(chargeRecord.getUid());
|
||||
if (null != firstCr){
|
||||
if (firstCr.equals(chargeRecord.getChargeRecordId())){
|
||||
if (firstCr.getChargeRecordId().equals(chargeRecord.getChargeRecordId())){
|
||||
vo.setFirstCharge(true);
|
||||
}
|
||||
vo.setNewUser(DateUtils.isSameDay(u.getCreateTime(), firstCr.getCreateTime()));
|
||||
|
@@ -39,7 +39,7 @@
|
||||
<select id="listFisrChargeRecordByUids" resultType="com.accompany.payment.model.ChargeRecord">
|
||||
select charge_record_id, cr.uid, cr.create_time from charge_record cr
|
||||
inner join (select uid, min(create_time) create_time from charge_record
|
||||
where uid in <foreach collection="uids" item="uid" separator="," open="(" close=")">#{uid}</foreach> and charge_status = 1 group by uid) crg
|
||||
where uid in <foreach collection="uids" item="uid" separator="," open="(" close=")">#{uid}</foreach> and charge_status = 2 group by uid) crg
|
||||
on cr.uid = crg.uid and cr.create_time = crg.create_time
|
||||
</select>
|
||||
|
||||
|
@@ -55,8 +55,8 @@
|
||||
<input type="text" id="chargeRecordId" name="chargeRecordId">
|
||||
开始时间:<input type="text" name="startDate" id="startDate" class="input-sm">
|
||||
结束时间:<input type="text" name="endDate" id="endDate" class="input-sm">
|
||||
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
||||
</div>
|
||||
<button id="btnSearch" class="btn btn-sm btn-primary">查询</button>
|
||||
|
||||
</div>
|
||||
<div id="table"></div>
|
||||
@@ -116,8 +116,14 @@
|
||||
}
|
||||
},
|
||||
{field: 'clientIp', title: 'ip', align: 'center', valign: 'middle'},
|
||||
{field: 'newUser', title: '是否新用户', align: 'center', valign: 'middle'},
|
||||
{field: 'firstCharge', title: '是否首充', align: 'center', valign: 'middle'},
|
||||
{field: 'newUser', title: '是否新用户', align: 'center', valign: 'middle', formatter: function (val, row, inde) {
|
||||
return val? "是" : "否"
|
||||
}
|
||||
},
|
||||
{field: 'firstCharge', title: '是否首充', align: 'center', valign: 'middle', formatter: function (val, row, inde) {
|
||||
return val? "是" : "否"
|
||||
}
|
||||
},
|
||||
{field: 'createTime', title: '账单创建时间', align: 'center', valign: 'middle', width: '20%', formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
var date = new Date(val);
|
||||
|
@@ -74,16 +74,16 @@ open class RedEnvelopeController {
|
||||
open fun sendRedEnvelope(sendRedEnvelopeRequest: SendRedEnvelopeRequest): BaseResponseVO<Unit> {
|
||||
// 只开放钻石红包,不开放礼物红包
|
||||
if (sendRedEnvelopeRequest.type != 1 && sendRedEnvelopeRequest.type != 2) {
|
||||
throw ServiceException("红包类型错误")
|
||||
throw ServiceException("紅包類型錯誤")
|
||||
}
|
||||
if (StringUtils.isBlank(sendRedEnvelopeRequest.message)) {
|
||||
throw ServiceException("红包标题不能为空")
|
||||
throw ServiceException("紅包標題不能為空")
|
||||
}
|
||||
if (sendRedEnvelopeRequest.message.length > 20) {
|
||||
throw ServiceException("红包标题长度不能超过20")
|
||||
throw ServiceException("紅包標題長度不能超過20")
|
||||
}
|
||||
if (YidunCheckUtil.checkHasSensitiveWord(sendRedEnvelopeRequest.message)) {
|
||||
throw ServiceException("当前内容不符合规范,请修改后重试哦~")
|
||||
throw ServiceException("當前內容不符合規範,請修改后重試哦~")
|
||||
}
|
||||
val minGoldNum = when (sendRedEnvelopeRequest.type) {
|
||||
OuterRedEnvelopeTypeEnum.DIAMOND_IN_ROOM.code -> 10
|
||||
@@ -91,11 +91,11 @@ open class RedEnvelopeController {
|
||||
else -> 100
|
||||
}
|
||||
if (sendRedEnvelopeRequest.goldNum % minGoldNum > 0) {
|
||||
throw ServiceException("红包钻石数量必须为${minGoldNum}的倍数")
|
||||
throw ServiceException("紅包鑽石數量必須為${minGoldNum}的倍數")
|
||||
}
|
||||
|
||||
val users = usersService.getUsersByUid(sendRedEnvelopeRequest.myUserId)
|
||||
val payPassWord = users.paymentPwd ?: throw ServiceException("请设置支付密码")
|
||||
val payPassWord = users.paymentPwd ?: throw ServiceException("請設置支付密碼")
|
||||
if (!usersService.checkPaymentPwd(sendRedEnvelopeRequest.password, payPassWord)) {
|
||||
throw ServiceException(BusiStatus.USER_INCORRECT_PAYMENT_PASS.reasonPhrase)
|
||||
}
|
||||
@@ -116,7 +116,7 @@ open class RedEnvelopeController {
|
||||
val redEnvelopeDTO = redEnvelopeService.getById(redEnvelopeId)
|
||||
if (redEnvelopeService.stateByIdAndUserId(redEnvelopeId, myUserId) == RedEnvelopStateEnum.ING) {
|
||||
if (!rateLimiter.tryAcquire()) {
|
||||
throw ServiceException("抢红包的人太多,请再次尝试")
|
||||
throw ServiceException("搶紅包的人太多,請再次嘗試")
|
||||
}
|
||||
val openRedEnvelopeDTO = OpenRedEnvelopeDTO(redEnvelopeId, myUserId)
|
||||
val openAmount = redEnvelopeStrategyContext.open(openRedEnvelopeDTO)
|
||||
|
Reference in New Issue
Block a user