|
@@ -140,4 +140,45 @@ public class ClubServiceImpl implements ClubService {
|
|
clubMapper.updateClubByUpdateInfo(club);
|
|
clubMapper.updateClubByUpdateInfo(club);
|
|
return ResponseJson.success("修改机构资料成功", club);
|
|
return ResponseJson.success("修改机构资料成功", club);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 机构个人中心
|
|
|
|
+ *
|
|
|
|
+ * @param userId 用户Id
|
|
|
|
+ * @return Map(userPo, clubPo)
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public ResponseJson<Map<String, Object>> getClubHomeData(Integer userId) {
|
|
|
|
+ if (null == userId) {
|
|
|
|
+ return ResponseJson.error("参数异常", null);
|
|
|
|
+ }
|
|
|
|
+ // 用户信息
|
|
|
|
+ UserVo user = baseMapper.getUserByUserId(userId);
|
|
|
|
+ if (user == null) {
|
|
|
|
+ return ResponseJson.error("用户信息不存在", null);
|
|
|
|
+ }
|
|
|
|
+ ClubVo club = clubMapper.getClubById(user.getClubId());
|
|
|
|
+ if (club == null) {
|
|
|
|
+ return ResponseJson.error("机构信息不存在", null);
|
|
|
|
+ }
|
|
|
|
+ Map<String, Object> map = new HashMap();
|
|
|
|
+ map.put("user", user);
|
|
|
|
+ map.put("club", club);
|
|
|
|
+ OrderCountVo countVo = clubMapper.getOrderCount(userId);
|
|
|
|
+ //待确认数量
|
|
|
|
+ map.put("confirmedCount", countVo.getConfirmedCount());
|
|
|
|
+ //待付款数量
|
|
|
|
+ map.put("paymentCount", countVo.getPaymentCount());
|
|
|
|
+ //待发货数量
|
|
|
|
+ map.put("waitShipmentsCount", countVo.getWaitShipmentsCount());
|
|
|
|
+ //已发货数量
|
|
|
|
+ map.put("shipmentsCount", countVo.getShipmentsCount());
|
|
|
|
+ //退货款数量
|
|
|
|
+ map.put("salesReturnCount", countVo.getSalesReturnCount());
|
|
|
|
+ //联系电话
|
|
|
|
+ String contactNumber = baseMapper.getAfterSalesPhone();
|
|
|
|
+ map.put("contactNumber", contactNumber);
|
|
|
|
+
|
|
|
|
+ return ResponseJson.success(map);
|
|
|
|
+ }
|
|
}
|
|
}
|