|
|
|
@ -28,6 +28,7 @@ import com.hfkj.model.MerBasisModel; |
|
|
|
|
import com.hfkj.model.ResponseData; |
|
|
|
|
import com.hfkj.service.*; |
|
|
|
|
import com.hfkj.service.rebate.BsRebateMerAccountService; |
|
|
|
|
import com.hfkj.service.rebate.BsRebatePartMerService; |
|
|
|
|
import com.hfkj.service.rebate.BsRebateRewardService; |
|
|
|
|
import com.hfkj.service.rebate.model.RebateMerAccountTradeObject; |
|
|
|
|
import com.hfkj.sysenum.*; |
|
|
|
@ -36,6 +37,7 @@ import com.hfkj.unipush.UniPushService; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import org.apache.commons.collections4.MapUtils; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
@ -109,6 +111,9 @@ public class TestController { |
|
|
|
|
@Resource |
|
|
|
|
private BsStoreCidService bsStoreCidService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private BsRebatePartMerService rebatePartMerService; |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/refreshMerStatus",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "refreshMerStatus") |
|
|
|
@ -266,7 +271,9 @@ public class TestController { |
|
|
|
|
@RequestMapping(value="/tianQueTest",method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "tianQueTest") |
|
|
|
|
public ResponseData tianQueTest(@RequestParam(value = "code", required = false) String code) { |
|
|
|
|
public ResponseData tianQueTest(@RequestParam(value = "code", required = false) String code, |
|
|
|
|
@RequestParam(value = "timeS", required = false) Long timeS, |
|
|
|
|
@RequestParam(value = "timeE", required = false) Long timeE) { |
|
|
|
|
try { |
|
|
|
|
// tianQueMerService.addMer(Long.parseLong(code));
|
|
|
|
|
// return ResponseMsgUtil.success(tianQueMerService.queryMerchantInfo(code));
|
|
|
|
@ -280,27 +287,37 @@ public class TestController { |
|
|
|
|
//return ResponseMsgUtil.success(tianQueMerService.weChatPayConf("399230921077727", "597456493", "01", "wxa075e8509802f826", "00", ""));
|
|
|
|
|
// return ResponseMsgUtil.success(tianQueMerService.queryConf("399230921077727", "597456493"));
|
|
|
|
|
// return ResponseMsgUtil.success(tianQueSeparateService.queryAmt(code));
|
|
|
|
|
String orderNo = System.currentTimeMillis()+""; |
|
|
|
|
System.out.println("order:" + orderNo); |
|
|
|
|
// return ResponseMsgUtil.success(tianQueFundManageService.orgTransfer("399230906938051",orderNo,new BigDecimal("0.01"), "测试", "01"));
|
|
|
|
|
List<Long> merId = new ArrayList<>(); |
|
|
|
|
merId.add(51L); |
|
|
|
|
merId.add(61L); |
|
|
|
|
|
|
|
|
|
for (Long id : merId) { |
|
|
|
|
BsMer mer = merService.getMer(id); |
|
|
|
|
BsRebateMerAccount rebateMerAccount = new BsRebateMerAccount(); |
|
|
|
|
rebateMerAccount.setAccountNumber(System.currentTimeMillis()); |
|
|
|
|
rebateMerAccount.setAmount(new BigDecimal("0")); |
|
|
|
|
rebateMerAccount.setMerId(mer.getId()); |
|
|
|
|
rebateMerAccount.setMerNo(mer.getMerNo()); |
|
|
|
|
rebateMerAccount.setMerName(mer.getMerName()); |
|
|
|
|
rebateMerAccount.setMerAbbreviate(mer.getMerAbbreviate()); |
|
|
|
|
rebateMerAccountService.editData(rebateMerAccount); |
|
|
|
|
|
|
|
|
|
// 刷新活动金账户
|
|
|
|
|
if (StringUtils.isNotBlank(code) && code.equals("01")) { |
|
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
|
List<BsMer> merList = merService.getMerList(param); |
|
|
|
|
for (BsMer mer : merList) { |
|
|
|
|
BsRebateMerAccount rebateMerAccount = new BsRebateMerAccount(); |
|
|
|
|
rebateMerAccount.setAccountNumber((10000000 + mer.getId())); |
|
|
|
|
rebateMerAccount.setAmount(new BigDecimal("0")); |
|
|
|
|
rebateMerAccount.setMerId(mer.getId()); |
|
|
|
|
rebateMerAccount.setMerNo(mer.getMerNo()); |
|
|
|
|
rebateMerAccount.setMerName(mer.getMerName()); |
|
|
|
|
rebateMerAccount.setMerAbbreviate(mer.getMerAbbreviate()); |
|
|
|
|
rebateMerAccountService.editData(rebateMerAccount); |
|
|
|
|
} |
|
|
|
|
} else if (StringUtils.isNotBlank(code) && code.equals("02")){ |
|
|
|
|
|
|
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
|
param.put("status", RebatePartMerStatusEnum.status1.getNumber()); |
|
|
|
|
List<BsRebatePartMer> merList = rebatePartMerService.getMerList(param); |
|
|
|
|
|
|
|
|
|
List<Long> merIdList = new ArrayList<>(); |
|
|
|
|
for (BsRebatePartMer partMer : merList) { |
|
|
|
|
merIdList.add(partMer.getMerId()); |
|
|
|
|
} |
|
|
|
|
rebateRewardService.createReward(new Date(timeS), new Date(timeE), merIdList); |
|
|
|
|
// rebateRewardService.createReward(new Date(1680278400000L), new Date(1696089600000L), merIdList);
|
|
|
|
|
} |
|
|
|
|
// return ResponseMsgUtil.success(tianQueFundManageService.orgTransfer("399230906938051",orderNo,new BigDecimal("0.01"), "测试", "01"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rebateRewardService.createReward(new Date(1680278400000L), new Date(1696089600000L), merId); |
|
|
|
|
// rebateRewardService.grantReward(202310111953L);
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
@ -312,7 +329,7 @@ public class TestController { |
|
|
|
|
|
|
|
|
|
// tianQueFundManageService.orgTransfer("399230920037043", orderNo, new BigDecimal("0.01"), "测试营销转账", "02");
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(orderNo); |
|
|
|
|
return ResponseMsgUtil.success(null); |
|
|
|
|
// return ResponseMsgUtil.success(tianQueFundManageService.getTransferInfo(orderNo));
|
|
|
|
|
|
|
|
|
|
// 1200
|
|
|
|
|