2 Commits

Author SHA1 Message Date
996472796@qq.com 5e35c36dc0 Merge remote-tracking branch 'origin/release' into release 1 year ago
996472796@qq.com d4070337b7 新增vpi接口 1 year ago
5 changed files with 28 additions and 5 deletions
Split View
  1. 8
      dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/product/user/ProductUserQueryController.java
  2. 2
      dating-agency-mall-server/src/main/java/com/qniao/dam/infrastructure/persistent/dao/view/ProductViewDao.java
  3. 4
      dating-agency-mall-server/src/main/java/com/qniao/dam/query/product/ProductQueryService.java
  4. 13
      dating-agency-mall-server/src/main/java/com/qniao/dam/query/product/impl/ProductQueryServiceImpl.java
  5. 6
      dating-agency-mall-server/src/main/resources/mapper/product/WalletAccountAssociateOrderRecordDao.xml

8
dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/product/user/ProductUserQueryController.java

@ -75,7 +75,13 @@ public class ProductUserQueryController {
@GetMapping("get/product/by/customer/list")
@ApiOperation("客户获取商品列表")
public List<UserPageProductByCustomerGroupVo> getPageProductByCustomer() {
return productQueryService.getPageProductByCustomer();
return productQueryService.getPageProductByCustomer(null);
}
@GetMapping("get/product/by/customer/details")
@ApiOperation("客户获取商品详情")
public List<UserPageProductByCustomerGroupVo> getPageProductByCustomer(@RequestParam(value = "id",required = true) Long id,@RequestParam(value = "userId",required = false) Long userId) {
return productQueryService.getPageProductByCustomer(id);
}
@GetMapping("get/matchmaker-franchise-info")

2
dating-agency-mall-server/src/main/java/com/qniao/dam/infrastructure/persistent/dao/view/ProductViewDao.java

@ -26,7 +26,7 @@ public interface ProductViewDao {
List<UserPageProductByOperatorVo> pageProductByOperator(@Param("queryParam") UserPageProductByOperatorQueryParam queryParam);
List<UserPageProductByCustomerExtendVo> selectProductByCustomerList();
List<UserPageProductByCustomerExtendVo> selectProductByCustomerList(@Param("id") Long id);
IPage<UserPageProductByMatchmakerVo> pageProductByMatchmaker(Page<Object> pageWithoutOrders,
@Param("queryParam") UserPageProductByMatchmakerQueryParam queryParam);

4
dating-agency-mall-server/src/main/java/com/qniao/dam/query/product/ProductQueryService.java

@ -24,7 +24,9 @@ public interface ProductQueryService {
ProductSpecTerm getTermByName(List<ProductSpecTerm> productSpecTermList, ProductSpecTermNameEnum name);
List<UserPageProductByCustomerGroupVo> getPageProductByCustomer();
List<UserPageProductByCustomerGroupVo> getPageProductByCustomer(Long id);
UserPageProductByCustomerGroupVo getPageProductByCustomerDetails(Long id);
IPage<UserPageProductByMatchmakerVo> pageProductByMatchmaker(PageUtil pageUtil, UserPageProductByMatchmakerQueryParam queryParam);

13
dating-agency-mall-server/src/main/java/com/qniao/dam/query/product/impl/ProductQueryServiceImpl.java

@ -164,9 +164,9 @@ public class ProductQueryServiceImpl implements ProductQueryService {
}
@Override
public List<UserPageProductByCustomerGroupVo> getPageProductByCustomer() {
public List<UserPageProductByCustomerGroupVo> getPageProductByCustomer(Long id) {
List<UserPageProductByCustomerGroupVo> groupVoList = new ArrayList<>();
List<UserPageProductByCustomerExtendVo> extendVos = productViewDao.selectProductByCustomerList();
List<UserPageProductByCustomerExtendVo> extendVos = productViewDao.selectProductByCustomerList(id);
Map<Long, List<UserPageProductByCustomerExtendVo>> extMap = extendVos.stream().collect(Collectors.groupingBy(UserPageProductByCustomerExtendVo::getId));
extMap.forEach((k, v) -> {
UserPageProductByCustomerExtendVo extendVo = v.get(0);
@ -185,6 +185,15 @@ public class ProductQueryServiceImpl implements ProductQueryService {
return groupVoList;
}
@Override
public UserPageProductByCustomerGroupVo getPageProductByCustomerDetails(Long id) {
List<UserPageProductByCustomerGroupVo> vos = getPageProductByCustomer(id);
if(!vos.isEmpty()){
return vos.get(0);
}
return new UserPageProductByCustomerGroupVo();
}
/**
* 找出对应name的value

6
dating-agency-mall-server/src/main/resources/mapper/product/WalletAccountAssociateOrderRecordDao.xml

@ -98,6 +98,9 @@
LEFT JOIN da_product_spec_term as dpst3 on dpst3.is_delete=0 and dpst3.product_spec_id =ps.id and dpst3.`name`=2
LEFT JOIN da_product_spec_term as dpst4 on dpst4.is_delete=0 and dpst4.product_spec_id =ps.id and dpst4.`name`=4
WHERE a.is_delete = 0 AND a.status = 1 AND a.start_time &lt;= NOW() AND a.end_time >= NOW()
<if test="id != null and id != ''">
AND a.id = #{id}
</if>
UNION
select
0 groupType,
@ -123,6 +126,9 @@
LEFT JOIN da_product_spec_term as dpst3 on dpst3.is_delete=0 and dpst3.product_spec_id =dps.id and dpst3.`name`=2
LEFT JOIN da_product_spec_term as dpst4 on dpst4.is_delete=0 and dpst4.product_spec_id =dps.id and dpst4.`name`=4
where dp.is_delete=0 and dp.`status`=1 and dp.product_type=2
<if test="id != null and id != ''">
AND dp.id = #{id}
</if>
</select>
<select id="pageProductByMatchmaker"

Loading…
Cancel
Save