---快递发货问题和取消面单接口
This commit is contained in:
@@ -206,6 +206,36 @@ public class ShopProductController {
|
||||
}
|
||||
return R.ok().put("result", result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取关联订单列表
|
||||
* @param productId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getGlProductList")
|
||||
public R getGlProductList(@RequestParam int productId) {
|
||||
//获取此商品下的books
|
||||
List<Integer> ids = shopProudictBookService.getBookidsByProductId(productId);
|
||||
|
||||
List<ShopProudictBookEntity> ss = shopProudictBookService.getBaseMapper().selectList(new QueryWrapper<ShopProudictBookEntity>()
|
||||
.eq("del_flag",0)
|
||||
.in("book_id",ids)
|
||||
.groupBy("proudict_id")
|
||||
.having("count(proudict_id) >="+ids.size())
|
||||
);
|
||||
|
||||
List<ShopProductEntity> frag = new ArrayList<>();
|
||||
|
||||
for (ShopProudictBookEntity spbe : ss){
|
||||
ShopProductEntity ca_sp = shopProductService.getById(spbe.getProudictId());
|
||||
frag.add(ca_sp);
|
||||
}
|
||||
|
||||
return R.ok().put("result",frag);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息
|
||||
* @param productId
|
||||
|
||||
@@ -15,4 +15,6 @@ public interface ShopProudictBookService extends IService<ShopProudictBookEntity
|
||||
|
||||
List<ProudictBookqueryVO> getCartList(Integer proudictId);
|
||||
|
||||
List<Integer> getBookidsByProductId(Integer productId);
|
||||
|
||||
}
|
||||
|
||||
@@ -71,4 +71,16 @@ public class ShopProudictBookServiceImpl extends ServiceImpl<ShopProudictBookDa
|
||||
shopProductEntity.setBookidsimages(prList);
|
||||
return prLists;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> getBookidsByProductId(Integer productId) {
|
||||
List<ShopProudictBookEntity> spbs = this.list(new QueryWrapper<ShopProudictBookEntity>().eq("del_flag",0).eq("proudict_id",productId));
|
||||
List<Integer> ids = new ArrayList();
|
||||
for (ShopProudictBookEntity s : spbs){
|
||||
ids.add(s.getBookId());
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user