|
@@ -6,6 +6,7 @@ import com.kym.mapper.RechargeConfigMapper;
|
|
|
import com.kym.service.RechargeConfigGroupService;
|
|
import com.kym.service.RechargeConfigGroupService;
|
|
|
import com.kym.service.RechargeConfigService;
|
|
import com.kym.service.RechargeConfigService;
|
|
|
import com.kym.service.mybatisplus.MyBaseServiceImpl;
|
|
import com.kym.service.mybatisplus.MyBaseServiceImpl;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
@@ -17,6 +18,7 @@ import java.util.List;
|
|
|
* @author skyline
|
|
* @author skyline
|
|
|
* @since 2024-11-15
|
|
* @since 2024-11-15
|
|
|
*/
|
|
*/
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
@Service
|
|
|
public class RechargeConfigServiceImpl extends MyBaseServiceImpl<RechargeConfigMapper, RechargeConfig> implements RechargeConfigService {
|
|
public class RechargeConfigServiceImpl extends MyBaseServiceImpl<RechargeConfigMapper, RechargeConfig> implements RechargeConfigService {
|
|
|
|
|
|
|
@@ -28,18 +30,24 @@ public class RechargeConfigServiceImpl extends MyBaseServiceImpl<RechargeConfigM
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public List<RechargeConfig> listByStationId(String stationId) {
|
|
public List<RechargeConfig> listByStationId(String stationId) {
|
|
|
|
|
+ log.info("listByStationId: stationId={}", stationId);
|
|
|
// 优先站点专属分组
|
|
// 优先站点专属分组
|
|
|
RechargeConfigGroup group = groupService.getByStationId(stationId);
|
|
RechargeConfigGroup group = groupService.getByStationId(stationId);
|
|
|
|
|
+ log.info("listByStationId: stationGroup={}", group != null ? group.getId() : null);
|
|
|
if (group != null) {
|
|
if (group != null) {
|
|
|
var items = lambdaQuery().eq(RechargeConfig::getGroupId, group.getId()).list();
|
|
var items = lambdaQuery().eq(RechargeConfig::getGroupId, group.getId()).list();
|
|
|
|
|
+ log.info("listByStationId: stationGroup items count={}", items.size());
|
|
|
if (!items.isEmpty()) {
|
|
if (!items.isEmpty()) {
|
|
|
return items;
|
|
return items;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 回退默认分组
|
|
// 回退默认分组
|
|
|
group = groupService.getDefaultGroup();
|
|
group = groupService.getDefaultGroup();
|
|
|
|
|
+ log.info("listByStationId: defaultGroup={}", group != null ? group.getId() : null);
|
|
|
if (group != null) {
|
|
if (group != null) {
|
|
|
- return lambdaQuery().eq(RechargeConfig::getGroupId, group.getId()).list();
|
|
|
|
|
|
|
+ var items = lambdaQuery().eq(RechargeConfig::getGroupId, group.getId()).list();
|
|
|
|
|
+ log.info("listByStationId: defaultGroup items count={}", items.size());
|
|
|
|
|
+ return items;
|
|
|
}
|
|
}
|
|
|
return List.of();
|
|
return List.of();
|
|
|
}
|
|
}
|