| | |
| | | //import com.ruoyi.order.domain.vo.AppSureOrderVo; |
| | | //import com.ruoyi.order.domain.vo.MerVerifyOrderVo; |
| | | //import com.ruoyi.order.domain.vo.MgtActivityOrderPageVo; |
| | | //import com.ruoyi.order.mapper.order.OrderMapper; |
| | | //import com.ruoyi.order.service.order.OrderService; |
| | | //import com.ruoyi.system.api.domain.dto.MgtBaseShopDto; |
| | | //import com.ruoyi.system.api.domain.poji.member.Member; |
| | | //import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | //import com.ruoyi.system.api.service.RemoteMemberService; |
| | | //import org.junit.Test; |
| | | //import org.junit.runner.RunWith; |
| | |
| | | //import javax.annotation.Resource; |
| | | //import java.math.BigDecimal; |
| | | //import java.util.ArrayList; |
| | | //import java.util.Collections; |
| | | //import java.util.List; |
| | | // |
| | | ///** |
| | |
| | | //@SpringBootTest(classes = RuoYiOrderApplication.class) |
| | | //public class orderTest { |
| | | // |
| | | // @Resource |
| | | // private OrderMapper orderMapper; |
| | | // |
| | | // @Resource |
| | | // private OrderService orderService; |
| | | // |
| | | // @Resource |
| | | // private RemoteMemberService memberService; |
| | | // private RemoteMemberService remoteMemberService; |
| | | // |
| | | // @Test |
| | | // public void main() { |
| | | // AppSureOrderDto appSureOrderDto = new AppSureOrderDto(); |
| | | // Long userId = 1496L; |
| | | // if (userId != null) { |
| | | // Member member = memberService.getMember(userId).getData(); |
| | | // appSureOrderDto.setUserId(userId); |
| | | // if (member != null && member.getRelationShopId() != null) { |
| | | // appSureOrderDto.setShopId(member.getRelationShopId()); |
| | | // } |
| | | // } |
| | | // List<AppBuyGoodsDto> appBuyGoodsDtoList = new ArrayList<>(); |
| | | // AppBuyGoodsDto appBuyGoodsDto = new AppBuyGoodsDto(); |
| | | // appBuyGoodsDto.setBuyNum(1); |
| | | // appBuyGoodsDto.setGoodsId("4476c539ccc54f95a1416f79a067073a"); |
| | | // appBuyGoodsDto.setMemberCouponId(1766020668811378689L); |
| | | // appBuyGoodsDtoList.add(appBuyGoodsDto); |
| | | // appSureOrderDto.setAppBuyGoodsDtoList(appBuyGoodsDtoList); |
| | | // AppSureOrderVo appSureOrderVo = orderService.buyGoods(appSureOrderDto); |
| | | // |
| | | // //获取服务统计 |
| | | // List<Long> userIds = remoteMemberService.listUserIdByShopId(Collections.singletonList(32L)).getData(); |
| | | // if(userIds.isEmpty()){ |
| | | // userIds.add(0L); |
| | | // } |
| | | // MerHomeShopTotalVo serviceTotalVo = orderMapper.getMerHomeShopServiceTotalVo(32L, userIds); |
| | | // System.err.println(serviceTotalVo); |
| | | // } |
| | | // |
| | | // |