This commit is contained in:
2023-07-08 08:31:29 +08:00
parent 8295d9d578
commit f82aa98cc5
6 changed files with 18 additions and 12 deletions

View File

@@ -156,7 +156,6 @@ public interface PileBasicInfoMapper {
/**
* 批量修改充电桩运营商
* @param oldMerchantId
*/
void updatePileMerchantBatch(@Param("oldMerchantId") String oldMerchantId, @Param("newMerchantId") String newMerchantId);
void updatePileMerchantBatch(@Param("pileIdList") List<Long> pileIdList, @Param("newMerchantId") String newMerchantId);
}

View File

@@ -10,7 +10,6 @@ import com.jsowell.pile.vo.uniapp.PersonalPileInfoVO;
import com.jsowell.pile.vo.uniapp.PileConnectorDetailVO;
import com.jsowell.pile.vo.web.IndexGeneralSituationVO;
import com.jsowell.pile.vo.web.PileDetailVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -168,7 +167,6 @@ public interface IPileBasicInfoService {
/**
* 批量修改充电桩运营商
* @param oldMerchantId
*/
void updatePileMerchantBatch(String oldMerchantId, String newMerchantId);
void updatePileMerchantBatch(List<Long> pileIdList, String newMerchantId);
}

View File

@@ -40,7 +40,6 @@ import com.jsowell.pile.vo.web.PileModelInfoVO;
import com.jsowell.pile.vo.web.SimCardVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -662,10 +661,12 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
/**
* 批量修改充电桩运营商
* @param oldMerchantId
*/
@Override
public void updatePileMerchantBatch(String oldMerchantId, String newMerchantId) {
pileBasicInfoMapper.updatePileMerchantBatch(oldMerchantId, newMerchantId);
public void updatePileMerchantBatch(List<Long> pileIdList, String newMerchantId) {
if (CollectionUtils.isEmpty(pileIdList) || StringUtils.isBlank(newMerchantId)) {
return;
}
pileBasicInfoMapper.updatePileMerchantBatch(pileIdList, newMerchantId);
}
}

View File

@@ -264,4 +264,9 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
}
return pileMerchantInfoMapper.queryInfoListByIds(deptIds);
}
public List<String> getLoginUserMerchantIds() {
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
return null;
}
}

View File

@@ -23,7 +23,6 @@ import com.jsowell.pile.vo.base.MerchantInfoVO;
import com.jsowell.pile.vo.base.PileInfoVO;
import com.jsowell.pile.vo.base.StationInfoVO;
import com.jsowell.pile.vo.uniapp.CurrentTimePriceDetails;
import com.jsowell.pile.vo.web.PileDetailVO;
import com.jsowell.pile.vo.web.PileStationVO;
import com.jsowell.system.service.SysDeptService;
import lombok.extern.slf4j.Slf4j;
@@ -268,8 +267,9 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
// 先查出桩基本信息
List<PileBasicInfo> pileInfoList = pileBasicInfoService.getPileListByStationId(String.valueOf(pileStationInfo.getId()));
if (CollectionUtils.isNotEmpty(pileInfoList)) {
List<Long> pileIdList = pileInfoList.stream().map(PileBasicInfo::getId).collect(Collectors.toList());
// 修改桩基本信息
pileBasicInfoService.updatePileMerchantBatch(String.valueOf(pileInfoList.get(0).getMerchantId()), String.valueOf(pileStationInfo.getMerchantId()));
pileBasicInfoService.updatePileMerchantBatch(pileIdList, String.valueOf(pileStationInfo.getMerchantId()));
}
}
// 同步组织中的名称,联系人,电话