首充记录首次充值金币
This commit is contained in:
@@ -12,7 +12,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
public interface FirstChargeRecordService extends IService<FirstChargeRecord> {
|
||||
|
||||
|
||||
void saveRecord(Long uid, String ip, String deviceId);
|
||||
void saveRecord(Long uid, String ip, String deviceId, Long totalGold);
|
||||
|
||||
Long countByUid(Long uid);
|
||||
Long countByIp(String ip);
|
||||
|
@@ -19,12 +19,13 @@ import java.util.Date;
|
||||
public class FirstChargeRecordServiceImpl extends ServiceImpl<FirstChargeRecordMapper, FirstChargeRecord> implements FirstChargeRecordService {
|
||||
|
||||
@Override
|
||||
public void saveRecord(Long uid, String ip, String deviceId) {
|
||||
public void saveRecord(Long uid, String ip, String deviceId, Long totalGoldNum) {
|
||||
FirstChargeRecord firstChargeRecord = new FirstChargeRecord();
|
||||
firstChargeRecord.setClientIp(ip);
|
||||
firstChargeRecord.setCreateTime(new Date());
|
||||
firstChargeRecord.setClientDeviceId(deviceId);
|
||||
firstChargeRecord.setUid(uid);
|
||||
firstChargeRecord.setTotalGold(totalGoldNum);
|
||||
baseMapper.insert(firstChargeRecord);
|
||||
}
|
||||
|
||||
|
@@ -13,7 +13,6 @@ import com.accompany.business.vo.firstcharge.FirstChargeBannerConfigVo;
|
||||
import com.accompany.business.vo.firstcharge.FirstChargeExpVo;
|
||||
import com.accompany.business.vo.firstcharge.FirstChargeRewardVo;
|
||||
import com.accompany.business.vo.firstcharge.FirstChargeVo;
|
||||
import com.accompany.common.config.SystemConfig;
|
||||
import com.accompany.common.utils.StringUtils;
|
||||
import com.accompany.core.enumeration.BillObjTypeEnum;
|
||||
import com.accompany.core.model.Users;
|
||||
@@ -37,8 +36,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
import static com.accompany.business.constant.activity.ActivityType.FIRST_CHARGE;
|
||||
import static com.accompany.business.service.activity.h5.ActivityOfChargeService.GOLD_TO_USB_DIVISOR;
|
||||
import static com.accompany.common.constant.Constant.DefMsgType.FIRST_CHARGE_REWARD;
|
||||
import static com.accompany.common.constant.Constant.DefMsgType.FIRST_CHARGE_REWARD_MSG_NEW;
|
||||
import static com.accompany.common.constant.Constant.SysConfId.FIRST_CHARGE_BANNER_CONFIG;
|
||||
import static com.accompany.common.redis.RedisKey.*;
|
||||
import static com.accompany.core.enumeration.I18nAlertEnum.FIRST_CHARGE_REWARD_SYS;
|
||||
@@ -168,7 +165,7 @@ public class FirstChargeService {
|
||||
if (checkStatus(uid, ip, deviceId)) {
|
||||
return;
|
||||
}
|
||||
firstChargeRecordService.saveRecord(uid, ip, deviceId);
|
||||
firstChargeRecordService.saveRecord(uid, ip, deviceId, totalGoldNum);
|
||||
this.deleteCache(uid, ip, deviceId);
|
||||
Users users = usersService.getUsersByUid(uid);
|
||||
Integer partitionId = users.getPartitionId();
|
||||
@@ -190,9 +187,9 @@ public class FirstChargeService {
|
||||
"" , partitionId, BillObjTypeEnum.FIRST_CHARGE_REWARD_BILL);
|
||||
String message = I18NMessageSourceUtil.getMessage(FIRST_CHARGE_REWARD_SYS, new Object[]{usd.doubleValue(), rewardGold}, uid);
|
||||
baseSendService.sendSystemMsg(uid.toString(), message);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("msg", message);
|
||||
baseSendService.sendMsg(SystemConfig.systemMessageUid, uid, FIRST_CHARGE_REWARD, FIRST_CHARGE_REWARD_MSG_NEW, jsonObject);
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// jsonObject.put("msg", message);
|
||||
// baseSendService.sendMsg(SystemConfig.systemMessageUid, uid, FIRST_CHARGE_REWARD, FIRST_CHARGE_REWARD_MSG_NEW, jsonObject);
|
||||
}
|
||||
|
||||
public void deleteCache(Long uid, String ip, String deviceId) {
|
||||
|
Reference in New Issue
Block a user