Kaynağa Gözat

fix(national-motion-system-biz): 修复场所信息统计错误

- 更新场所信息页面的销售数量统计逻辑
- 修复类别名称获取错误,改为正确的方法
SheepHy 3 hafta önce
ebeveyn
işleme
7c59058f39

+ 2 - 2
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/DetailServiceImpl.java

@@ -144,9 +144,9 @@ public class DetailServiceImpl implements IDetailService {
                         .last("limit 1").orderByDesc(AppSitePriceRules::getSellingPrice));
                 PlaceInfoVO.PlaceInfoMsgVO placeInfoMsgVO = new PlaceInfoVO.PlaceInfoMsgVO();
                 placeInfoMsgVO.setName(appSitePlace.getName())
-                        .setSales(0)
+                        .setSales(Math.toIntExact(appOrderMapper.selectCount(Wrappers.<AppOrder>lambdaQuery().eq(AppOrder::getOrderCode, appSitePlace.getOrgCode()))))
                         .setId(appSitePlace.getId())
-                        .setCategory(getCategoryName(appSitePlace.getCategoryId()))
+                        .setCategory(getCategoryName(appSite.getCategoryId()))
                         .setCover(appSitePlace.getCover().split(",")[0])
                         .setReminder(appSitePlace.getReminder())
                         .setRefundType(appSitePlace.getRefundType());