| | |
| | | //package cc.mrbird.febs; |
| | | // |
| | | //import cc.mrbird.febs.common.entity.FebsResponse; |
| | | //import cc.mrbird.febs.common.enumerates.AgentLevelEnum; |
| | | //import cc.mrbird.febs.common.enumerates.DataDictionaryEnum; |
| | | //import cc.mrbird.febs.common.exception.FebsException; |
| | | //import cc.mrbird.febs.common.utils.LoginUserUtil; |
| | | //import cc.mrbird.febs.common.utils.RedisUtils; |
| | | //import cc.mrbird.febs.mall.conversion.MallGoodsConversion; |
| | | //import cc.mrbird.febs.mall.dto.*; |
| | | //import cc.mrbird.febs.mall.entity.*; |
| | | //import cc.mrbird.febs.mall.mapper.*; |
| | | //import cc.mrbird.febs.mall.quartz.ProfitJob; |
| | | //import cc.mrbird.febs.mall.service.IAgentService; |
| | | //import cc.mrbird.febs.mall.service.IApiMallOrderInfoService; |
| | | //import cc.mrbird.febs.mall.vo.*; |
| | | //import cc.mrbird.febs.pay.util.WechatConfigure; |
| | | //import cc.mrbird.febs.rabbit.consumer.AgentConsumer; |
| | | //import cc.mrbird.febs.rabbit.producter.AgentProducer; |
| | | //import cn.hutool.core.collection.CollUtil; |
| | | //import cn.hutool.core.util.ObjectUtil; |
| | | //import cn.hutool.core.util.RandomUtil; |
| | | //import cn.hutool.core.util.StrUtil; |
| | | //import cn.hutool.json.JSONObject; |
| | | //import cn.hutool.json.JSONUtil; |
| | | //import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | //import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | //import com.baomidou.mybatisplus.extension.exceptions.ApiException; |
| | | //import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | //import lombok.extern.slf4j.Slf4j; |
| | | //import okhttp3.*; |
| | | //import org.aspectj.weaver.loadtime.Agent; |
| | | //import org.junit.jupiter.api.Test; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.boot.test.context.SpringBootTest; |
| | | //import org.springframework.web.client.RestTemplate; |
| | | // |
| | | //import javax.annotation.Resource; |
| | | //import java.io.IOException; |
| | | //import java.math.BigDecimal; |
| | | //import java.math.RoundingMode; |
| | | //import java.util.ArrayList; |
| | | //import java.util.List; |
| | | //import java.util.Map; |
| | | // |
| | | ///** |
| | | // * @author wzy |
| | | // * @date 2021-09-25 |
| | | // **/ |
| | | //@Slf4j |
| | | //@SpringBootTest |
| | | //public class AgentTest { |
| | | // |
| | | // @Autowired |
| | | // private AgentProducer agentProducer; |
| | | // |
| | | // @Autowired |
| | | // private DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | // |
| | | // @Autowired |
| | | // private IAgentService agentService; |
| | | // |
| | | // @Autowired |
| | | // private MallGoodsStyleMapper mallGoodsStyleMapper; |
| | | // |
| | | // @Autowired |
| | | // private MallActAwardSetMapper mallActAwardSetMapper; |
| | | // @Autowired |
| | | // private MallMemberMapper mallMemberMapper; |
| | | // @Autowired |
| | | // private MallActWinRecordMapper mallActWinRecordMapper; |
| | | // @Autowired |
| | | // private MallActLuckdrawRecordMapper mallActLuckdrawRecordMapper; |
| | | // @Autowired |
| | | // private MallMemberWalletMapper mallMemberWalletMapper; |
| | | // @Autowired |
| | | // private MallActSetMapper mallActSetMapper; |
| | | // @Autowired |
| | | // private MallGoodsSkuMapper mallGoodsSkuMapper; |
| | | // @Autowired |
| | | // private MallOrderItemMapper mallOrderItemMapper; |
| | | // @Autowired |
| | | // private MallGoodsMapper mallGoodsMapper; |
| | | // @Autowired |
| | | // private MallGoodsImagesMapper goodsImagesMapper; |
| | | // @Autowired |
| | | // private IApiMallOrderInfoService iApiMallOrderInfoService; |
| | | // @Test |
| | | // public void getCouponAmountMap(){ |
| | | // Long memberCouponId = 139L; |
| | | // List<AddOrderItemDto> items = new ArrayList<>(); |
| | | // AddOrderItemDto addOrderItemDto = new AddOrderItemDto(); |
| | | // addOrderItemDto.setSkuId(185L); |
| | | // addOrderItemDto.setCnt(2); |
| | | // items.add(addOrderItemDto); |
| | | // Map<Long, BigDecimal> couponAmountMap = iApiMallOrderInfoService.getCouponAmountMap(memberCouponId, items); |
| | | // for (Map.Entry<Long, BigDecimal> entry : couponAmountMap.entrySet()) { |
| | | // System.out.println("Key: " + entry.getKey() + ", Value: " + entry.getValue()); |
| | | // } |
| | | // } |
| | | // |
| | | // |
| | | package cc.mrbird.febs; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-09-25 |
| | | **/ |
| | | @Slf4j |
| | | @SpringBootTest |
| | | public class AgentTest { |
| | | @Resource |
| | | RestTemplate restTemplate; |
| | | @Test |
| | | public void getCouponAmountMap() { |
| | | // 使用未编码的经纬度字符串 |
| | | String url = "https://revgeocode.search.hereapi.com/v1/revgeocode?at=48.2181679,16.3899064&lang=en-US&apiKey=21tSClSPVotUklhRA4GIgECwZ0S6MmJ73TJ8v8ojDuo"; |
| | | String jsonStr = restTemplate.getForObject(url, String.class); |
| | | log.info("Response: {}", jsonStr); |
| | | } |
| | | |
| | | |
| | | // @Autowired |
| | | // private RedisUtils redisUtils; |
| | | // @Resource |
| | |
| | | // public void orderReturnTest() { |
| | | // agentConsumer.getScoreMsg(215L); |
| | | // } |
| | | //} |
| | | } |