| | |
| | | import cc.mrbird.febs.mall.entity.MallOrderItem; |
| | | import cc.mrbird.febs.mall.mapper.MallOrderInfoMapper; |
| | | import cc.mrbird.febs.mall.mapper.MallOrderItemMapper; |
| | | import cc.mrbird.febs.mall.quartz.OrderSettlementJob; |
| | | import cc.mrbird.febs.mall.service.IAgentService; |
| | | import cc.mrbird.febs.mall.service.IMallAchieveService; |
| | | import cc.mrbird.febs.mall.service.IMemberProfitService; |
| | | import cc.mrbird.febs.pay.model.UnipayDto; |
| | | import cc.mrbird.febs.pay.service.UnipayService; |
| | | import cc.mrbird.febs.rabbit.consumer.AgentConsumer; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | |
| | | @Test |
| | | public void dynamicProfit() { |
| | | memberProfitService.dynamicProfit(45L); |
| | | memberProfitService.dynamicProfit(21L); |
| | | } |
| | | @Test |
| | | public void agentProfit() { |
| | | memberProfitService.agentProfit(null); |
| | | } |
| | | |
| | | |
| | | // @Test |
| | | // public void staticProfit() { |
| | | // memberProfitService.staticProfit(new Date()); |
| | | // } |
| | | |
| | | @Test |
| | | public void thankfulProfit() { |
| | | memberProfitService.thankfulProfit(); |
| | | memberProfitService.thankfulProfit(new Date()); |
| | | } |
| | | |
| | | @Test |
| | | public void rankProfit() { |
| | | memberProfitService.rankProfit(); |
| | | } |
| | | |
| | | @Autowired |
| | |
| | | mallAchieveService.add(item.getId()); |
| | | } |
| | | } |
| | | |
| | | @Test |
| | | public void paramTest() { |
| | | Map<String, Integer> map = new HashMap<>(); |
| | | BigDecimal amount = new BigDecimal("100"); |
| | | map.put("amount", 1); |
| | | changeAmount(map); |
| | | System.out.println(map.get("amount")); |
| | | } |
| | | |
| | | public void changeAmount(Map<String, Integer> amount) { |
| | | amount.put("amount", 2); |
| | | } |
| | | |
| | | @Test |
| | | public void scorePool(){ |
| | | memberProfitService.scorePool(); |
| | | } |
| | | |
| | | @Test |
| | | public void staticProfit(){ |
| | | memberProfitService.staticProfit(null); |
| | | } |
| | | |
| | | @Autowired |
| | | private OrderSettlementJob orderSettlementJob; |
| | | |
| | | @Test |
| | | public void orderSettlementJobTest() { |
| | | // orderSettlementJob.normalGoodsSettlementJob(); |
| | | |
| | | mallAchieveService.add(83L); |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private UnipayService unipayService; |
| | | @Test |
| | | public void unipay(){ |
| | | UnipayDto unipayDto = new UnipayDto(); |
| | | unipayDto.setAmount(new BigDecimal("0.01")); |
| | | unipayDto.setFrpCode("ALIPAY_H5"); |
| | | unipayDto.setTradeMerchantNo("777180800385820"); |
| | | // unipayDto.setFrpCode("WEIXIN_APP3"); |
| | | unipayDto.setOrderNo("2022082316415386395"); |
| | | unipayDto.setProductName("洗护套装"); |
| | | unipayService.unipay(unipayDto); |
| | | } |
| | | } |