'修复已知问题'

dev-discount
胡锐 4 years ago
parent 0c7d202353
commit de90a4ec58
  1. 1
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  2. 4
      hai-cweb/src/main/java/com/cweb/controller/HighMerchantStoreController.java
  3. 2
      hai-cweb/src/main/resources/dev/application.yml
  4. 8
      hai-service/src/main/java/com/hai/service/HighOrderService.java
  5. 21
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -94,6 +94,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/coupon/getCouponById")
.excludePathPatterns("/highMerchantStore/getMerchantStoreById")
.excludePathPatterns("/highMerchantStore/getStoreListByCoupon")
.excludePathPatterns("/wechat/*")
;
}

@ -84,7 +84,7 @@ public class HighMerchantStoreController {
HighCouponModel coupon = highCouponService.getCouponById(couponId);
if (coupon == null) {
ResponseMsgUtil.success(null);
return ResponseMsgUtil.success(new PageInfo<>());
}
Map<String,Object> map = new HashMap<>();
map.put("merchantId", coupon.getMerchantId());
@ -98,7 +98,7 @@ public class HighMerchantStoreController {
store.setExt1(merchant.getMerchantLogo());
}
}
return ResponseMsgUtil.success(storeList);
return ResponseMsgUtil.success(new PageInfo<>(storeList));
} catch (Exception e) {
log.error("HighMerchantStoreController -> getStoreListByCoupon() error!",e);

@ -1,5 +1,5 @@
server:
port:
port: 9301
servlet:
context-path: /crest

@ -1,5 +1,6 @@
package com.hai.service;
import com.hai.entity.HighChildOrder;
import com.hai.entity.HighOrder;
import java.util.List;
@ -40,6 +41,13 @@ public interface HighOrderService {
**/
Integer getUndoneChildOrder(Long orderId);
/**
* 根据订单id 查询子商品
* @param orderId
* @return
*/
List<HighChildOrder> getChildOrderByOrder(Long orderId);
/**
* @Author 胡锐
* @Description 根据id查询

@ -181,17 +181,20 @@ public class HighOrderServiceImpl implements HighOrderService {
return count;
}
@Override
public List<HighChildOrder> getChildOrderByOrder(Long orderId) {
HighChildOrderExample example = new HighChildOrderExample();
example.createCriteria().andOrderIdEqualTo(orderId);
return highChildOrderMapper.selectByExample(example);
}
@Override
public HighOrder getOrderById(Long id) {
HighOrder order = highOrderMapper.selectByPrimaryKey(id);
if (order == null) {
return null;
}
HighChildOrderExample example = new HighChildOrderExample();
example.createCriteria().andOrderIdEqualTo(order.getId());
order.setHighChildOrderList(highChildOrderMapper.selectByExample(example));
order.setHighChildOrderList(getChildOrderByOrder(order.getId()));
return order;
}
@ -230,7 +233,13 @@ public class HighOrderServiceImpl implements HighOrderService {
}
example.setOrderByClause("create_time desc");
return highOrderMapper.selectByExample(example);
List<HighOrder> list = highOrderMapper.selectByExample(example);
if (list.size() > 0) {
for (HighOrder order : list) {
order.setHighChildOrderList(getChildOrderByOrder(order.getId()));
}
}
return new ArrayList<>();
}
@Override

Loading…
Cancel
Save