update 添加批量导入会员余额接口

This commit is contained in:
jsowell
2026-05-14 13:35:49 +08:00
parent 02c7a069cc
commit 7e0fb2e328
3 changed files with 29 additions and 39 deletions

View File

@@ -1143,4 +1143,20 @@ public class TempController extends BaseController {
}
return response;
}
/**
* 批量导入会员余额
*/
@PostMapping("/batchImportMemberBalance")
public RestApiResponse<?> batchImportMemberBalance(@RequestBody List<ImportMemberBalanceDTO> list) {
RestApiResponse<?> response = null;
try {
tempService.batchImportMemberBalance(list);
response = new RestApiResponse<>();
} catch (Exception e) {
logger.error("批量导入会员余额 error", e);
response = new RestApiResponse<>(e);
}
return response;
}
}

View File

@@ -51,17 +51,12 @@ import com.jsowell.common.util.id.SnowflakeIdWorker;
import com.jsowell.common.util.id.UUID;
import com.jsowell.common.util.ip.AddressUtils;
import com.jsowell.framework.async.JsowellThreadFactory;
import com.jsowell.netty.handler.yunkuaichong.HeartbeatRequestHandler;
import com.jsowell.netty.handler.yunkuaichong.TransactionRecordsRequestHandler;
import com.jsowell.netty.service.camera.impl.CameraBusinessServiceImpl;
import com.jsowell.netty.service.yunkuaichong.YKCBusinessService;
import com.jsowell.pile.domain.*;
import com.jsowell.pile.domain.ykcCommond.IssueQRCodeCommand;
import com.jsowell.pile.domain.ykcCommond.ProofreadTimeCommand;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.dto.amap.GetStationInfoDTO;
import com.jsowell.pile.dto.lutongyunting.BindCouponDTO;
import com.jsowell.pile.mapper.MemberBasicInfoMapper;
import com.jsowell.pile.mapper.PileBillingTemplateMapper;
import com.jsowell.pile.service.*;
import com.jsowell.pile.service.batteryreport.BatteryChargeReportService;
@@ -75,7 +70,6 @@ import com.jsowell.pile.vo.base.MemberWalletVO;
import com.jsowell.pile.vo.base.PileInfoVO;
import com.jsowell.pile.vo.uniapp.customer.*;
import com.jsowell.pile.vo.web.*;
import com.jsowell.service.MemberService;
import com.jsowell.service.OrderService;
import com.jsowell.service.PileService;
import com.jsowell.service.TempService;
@@ -146,51 +140,27 @@ public class SpringBootTestController {
@Autowired
private AdapayMemberAccountService adapayMemberAccountService;
@Autowired
private PileMsgRecordService pileMsgRecordService;
@Autowired
private StationSplitConfigService stationSplitConfigService;
@Autowired
private PileStationInfoService pileStationInfoService;
@Autowired
private YKCPushCommandService ykcPushBusinessService;
@Autowired
private HeartbeatRequestHandler heartbeatRequestHandler;
@Autowired
private YKCBusinessService ykcBusinessService;
@Autowired
private PileBillingTemplateMapper pileBillingTemplateMapper;
@Autowired
private PileRemoteService pileRemoteService;
@Autowired
private MemberService memberService;
@Autowired
private OrderService orderService;
@Autowired
private PileBillingTemplateService pileBillingTemplateService;
@Autowired
private MemberBasicInfoMapper memberBasicInfoMapper;
@Autowired
private SimCardService simCardService;
@Autowired
private PileBasicInfoService pileBasicInfoService;
@Autowired
private WechatPayService wechatPayService;
@Autowired
private OrderBasicInfoService orderBasicInfoService;
@@ -231,9 +201,6 @@ public class SpringBootTestController {
@Autowired
private PileConnectorInfoService pileConnectorInfoService;
@Autowired
private TransactionRecordsRequestHandler transactionRecordsRequestHandler;
@Autowired
private MemberBasicInfoService memberBasicInfoService;
@@ -243,9 +210,6 @@ public class SpringBootTestController {
@Autowired
private OrderPileOccupyService orderPileOccupyService;
@Autowired
private CameraBusinessServiceImpl cameraBusinessServiceImpl;
@Autowired
private LTYTService ltytService;
@@ -267,9 +231,6 @@ public class SpringBootTestController {
@Autowired
private MemberWalletInfoService memberWalletInfoService;
@Autowired
private MemberGroupService memberGroupService;
@Autowired
private HuaWeiService huaWeiService;
@@ -313,6 +274,13 @@ public class SpringBootTestController {
private final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(10, JsowellThreadFactory.forName("test-thread-factory"));
@Test
public void importTest() {
List<ImportMemberBalanceDTO> list = Lists.newArrayList();
list.add(new ImportMemberBalanceDTO("18512341235", new BigDecimal("100")));
tempService.batchImportMemberBalance(list);
}
@Test
public void testRefundAmount() {
ApplyRefundDTO dto = new ApplyRefundDTO();

View File

@@ -1,10 +1,16 @@
package com.jsowell.pile.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ImportMemberBalanceDTO {
// 手机号
private String phone;