|
@@ -22,6 +22,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
@@ -39,6 +40,7 @@ import java.util.List;
|
|
|
public class PointsRechargeServiceImpl extends ServiceImpl<PointsRechargeMapper, PointsRecharge> implements PointsRechargeService {
|
|
|
|
|
|
private final PointsRechargeMapper pointsRechargeMapper;
|
|
|
+ private final PointsRecordMapper pointsRecordMapper;
|
|
|
private final PointsFailureRecordService pointsFailureRecordService;
|
|
|
private final UserMapper userMapper;
|
|
|
private final ChannelMapper channelMapper;
|
|
@@ -148,6 +150,10 @@ public class PointsRechargeServiceImpl extends ServiceImpl<PointsRechargeMapper,
|
|
|
pointsRecord.setPointsAudit(1);
|
|
|
pointsRecord.setCreationDate(new Date());
|
|
|
pointsRecord.setExpiryDate(pointsRecharge.getExpiryDate());
|
|
|
+
|
|
|
+ Long aLong = pointsRecordMapper.statisticsPoint(pointsRecord.getUserId(), Math.toIntExact(pointsRecord.getChannelId()));
|
|
|
+ pointsRecord.setCurrentlyAvailablePoints(BigDecimal.valueOf(aLong));
|
|
|
+
|
|
|
pointsRecordService.save(pointsRecord);
|
|
|
successCount++;
|
|
|
addImportRecord(1, "成功", templateDTO, code,userId);
|