|
|
@@ -65,6 +65,7 @@ import com.sqx.modules.goods.entity.Goods;
|
|
|
import com.sqx.modules.goods.entity.GoodsShop;
|
|
|
import com.sqx.modules.goods.entity.GoodsShopRelevancy;
|
|
|
import com.sqx.modules.goods.entity.GoodsSku;
|
|
|
+import com.sqx.modules.goods.service.GoodsShopService;
|
|
|
import com.sqx.modules.integral.dao.UserIntegralDao;
|
|
|
import com.sqx.modules.integral.dao.UserIntegralDetailsDao;
|
|
|
import com.sqx.modules.integral.entity.UserIntegralDetails;
|
|
|
@@ -98,7 +99,9 @@ import com.sqx.modules.pay.service.PayDetailsService;
|
|
|
import com.sqx.modules.pay.service.WxErrService;
|
|
|
import com.sqx.modules.pay.vo.AliPayTransactionsParam;
|
|
|
import com.sqx.modules.pay.vo.PayTransactionsVO;
|
|
|
+import com.sqx.modules.shop.entity.ShopType;
|
|
|
import com.sqx.modules.shop.service.ShopMessageService;
|
|
|
+import com.sqx.modules.shop.service.ShopTypeService;
|
|
|
import com.sqx.modules.sys.entity.SysUserEntity;
|
|
|
import com.sqx.modules.sys.service.SysUserService;
|
|
|
import com.sqx.modules.utils.SenInfoCheckUtil;
|
|
|
@@ -214,6 +217,11 @@ public class AppAppOrderServiceImpl extends ServiceImpl<AppOrderDao, TbOrder> im
|
|
|
|
|
|
@Autowired
|
|
|
private EvaluateRiderService evaluateRiderService;
|
|
|
+ @Autowired
|
|
|
+ private ShopTypeService shopTypeService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private GoodsShopService goodsShopService;
|
|
|
|
|
|
@Resource
|
|
|
private RedissonClient redissonClient;
|
|
|
@@ -457,11 +465,33 @@ public class AppAppOrderServiceImpl extends ServiceImpl<AppOrderDao, TbOrder> im
|
|
|
@Transactional(propagation = Propagation.SUPPORTS)
|
|
|
@Override
|
|
|
public TbOrder prepareOrder(Long userId, PayOrderDTO payOrderDTO) {
|
|
|
+ // 获取三大运营商的店铺id
|
|
|
+ List<Long> shopList = new ArrayList<>();
|
|
|
+ QueryWrapper<ShopType> wrapperShopType = new QueryWrapper<>();
|
|
|
+ wrapperShopType.eq("shop_type_name", "三大运营商");
|
|
|
+ ShopType shopType = shopTypeService.getOne(wrapperShopType);
|
|
|
+ if (ObjectUtils.isNotEmpty(shopType)) {
|
|
|
+ QueryWrapper<GoodsShop> wrapperGoodShop = new QueryWrapper<>();
|
|
|
+ wrapperGoodShop.eq("shop_type_id", shopType.getId());
|
|
|
+ List<GoodsShop> goodsShops = goodsShopService.list(wrapperGoodShop);
|
|
|
+ for (GoodsShop goodsShop : goodsShops) {
|
|
|
+ Long shopId = goodsShop.getShopId();
|
|
|
+ shopList.add(shopId);
|
|
|
+ }
|
|
|
+ }
|
|
|
// 获取订单信息
|
|
|
TbOrder parentOrder = appOrderDao.selectById(payOrderDTO.getParentId());
|
|
|
if (parentOrder == null) {
|
|
|
throw new SqxException("无效的订单id");
|
|
|
}
|
|
|
+ if (shopList.contains(parentOrder.getShopId())) {
|
|
|
+ if (ObjectUtils.isEmpty(payOrderDTO.getIdCard())) {
|
|
|
+ throw new SqxException("请输入身份证号");
|
|
|
+ }else {
|
|
|
+ // 将身份证号设置到订单里
|
|
|
+ parentOrder.setIdCard(payOrderDTO.getIdCard());
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if (parentOrder.getIsPay() == 1) {
|
|
|
throw new SqxException("当前订单已支付,请勿重复支付!");
|
|
|
@@ -1409,18 +1439,19 @@ public class AppAppOrderServiceImpl extends ServiceImpl<AppOrderDao, TbOrder> im
|
|
|
// pages.setOptimizeCountSql(false);
|
|
|
// pages.setSearchCount(false);
|
|
|
// pages.setTotal()
|
|
|
- if (org.springframework.util.StringUtils.hasText(queryDto.getEndTime())) {
|
|
|
- queryDto.setEndTime(queryDto.getEndTime() + " 23:59:59");
|
|
|
- }
|
|
|
- // if (org.springframework.util.StringUtils.hasText(queryDto.getPayEndTime())) {
|
|
|
- // queryDto.setPayEndTime(queryDto.getPayEndTime() + " 23:59:59");
|
|
|
- // }
|
|
|
- if (org.springframework.util.StringUtils.hasText(queryDto.getStartTime())) {
|
|
|
- queryDto.setStartTime(queryDto.getStartTime() + " 00:00:00");
|
|
|
- }
|
|
|
- // if (org.springframework.util.StringUtils.hasText(queryDto.getPayStartTime())) {
|
|
|
- // queryDto.setPayStartTime(queryDto.getPayStartTime() + " 00:00:00");
|
|
|
- // }
|
|
|
+
|
|
|
+// if (org.springframework.util.StringUtils.hasText(queryDto.getEndTime())) {
|
|
|
+// queryDto.setEndTime(queryDto.getEndTime() + " 23:59:59");
|
|
|
+// }
|
|
|
+// if (org.springframework.util.StringUtils.hasText(queryDto.getPayEndTime())) {
|
|
|
+// queryDto.setPayEndTime(queryDto.getPayEndTime() + " 23:59:59");
|
|
|
+// }
|
|
|
+// if (org.springframework.util.StringUtils.hasText(queryDto.getStartTime())) {
|
|
|
+// queryDto.setStartTime(queryDto.getStartTime() + " 00:00:00");
|
|
|
+// }
|
|
|
+// if (org.springframework.util.StringUtils.hasText(queryDto.getPayStartTime())) {
|
|
|
+// queryDto.setPayStartTime(queryDto.getPayStartTime() + " 00:00:00");
|
|
|
+// }
|
|
|
IPage<TbOrder> tbOrderIPage = appOrderDao.selectAllOrderAdmin(pages, queryDto);
|
|
|
for (int i = 0; i < tbOrderIPage.getRecords().size(); i++) {
|
|
|
List<OrderGoods> orderGoodsList = orderGoodsDao.selectList(new QueryWrapper<OrderGoods>()
|