|
|
@@ -14,8 +14,10 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import shop.alien.entity.store.StoreStaffConfig;
|
|
|
import shop.alien.entity.store.excelVo.StoreStaffConfigExcelVo;
|
|
|
import shop.alien.entity.store.excelVo.util.ExcelGenerator;
|
|
|
+import shop.alien.entity.store.StoreInfo;
|
|
|
import shop.alien.entity.store.vo.StoreStaffDetailVo;
|
|
|
import shop.alien.entity.store.vo.StoreStaffFitnessDetailVo;
|
|
|
+import shop.alien.mapper.StoreInfoMapper;
|
|
|
import shop.alien.mapper.StoreStaffConfigMapper;
|
|
|
import shop.alien.store.service.StoreStaffConfigService;
|
|
|
import shop.alien.store.service.StoreStaffFitnessBaseService;
|
|
|
@@ -44,6 +46,8 @@ public class StoreStaffConfigServiceImpl implements StoreStaffConfigService {
|
|
|
|
|
|
private final StoreStaffConfigMapper storeStaffConfigMapper;
|
|
|
|
|
|
+ private final StoreInfoMapper storeInfoMapper;
|
|
|
+
|
|
|
private final AliOSSUtil aliOSSUtil;
|
|
|
|
|
|
private final StoreStaffFitnessCourseService storeStaffFitnessCourseService;
|
|
|
@@ -292,12 +296,32 @@ public class StoreStaffConfigServiceImpl implements StoreStaffConfigService {
|
|
|
List<shop.alien.entity.store.StoreStaffFitnessCourse> courseList =
|
|
|
storeStaffFitnessCourseService.getListByStaffId(id);
|
|
|
|
|
|
+ // 根据店铺ID查询店铺名称
|
|
|
+ String storeName = null;
|
|
|
+ if (staffConfig.getStoreId() != null && staffConfig.getStoreId() > 0) {
|
|
|
+ try {
|
|
|
+ StoreInfo storeInfo = storeInfoMapper.selectById(staffConfig.getStoreId());
|
|
|
+ if (storeInfo != null) {
|
|
|
+ storeName = storeInfo.getStoreName();
|
|
|
+ } else {
|
|
|
+ log.warn("查询店铺信息失败,店铺不存在:storeId={}", staffConfig.getStoreId());
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.warn("查询店铺信息异常,storeId={},异常信息:{}", staffConfig.getStoreId(), e.getMessage());
|
|
|
+ // 店铺信息查询失败不影响整体返回,设置为null即可
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 构建返回对象
|
|
|
StoreStaffDetailVo detailVo = new StoreStaffDetailVo();
|
|
|
detailVo.setStaffInfo(staffConfig);
|
|
|
detailVo.setCourseList(courseList);
|
|
|
+ detailVo.setStoreName(storeName);
|
|
|
|
|
|
- log.info("查询员工详情成功,id={},课程数量:{}", id, courseList != null ? courseList.size() : 0);
|
|
|
+ log.info("查询员工详情成功,id={},课程数量:{},店铺名称:{}",
|
|
|
+ id,
|
|
|
+ courseList != null ? courseList.size() : 0,
|
|
|
+ storeName);
|
|
|
return detailVo;
|
|
|
} catch (Exception e) {
|
|
|
log.error("查询员工详情异常,id={},异常信息:{}", id, e.getMessage(), e);
|