mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
新增 修改对接高德标识接口
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.jsowell.pile.dto.amap;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 修改高德标识DTO
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2023/8/3 19:20
|
||||
*/
|
||||
@Data
|
||||
public class EditAmapFlagDTO {
|
||||
private String stationId;
|
||||
private String amapFlag;
|
||||
|
||||
}
|
||||
@@ -79,4 +79,6 @@ public interface PileStationInfoMapper {
|
||||
List<PileStationInfo> getStationInfoForLianLian();
|
||||
|
||||
List<String> queryByStationDeptIds(@Param("stationDeptIds") List<String> stationDeptIds);
|
||||
|
||||
int updateAmapFlag(@Param("stationId") String stationId, @Param("amapFlag") String amapFlag);
|
||||
}
|
||||
|
||||
@@ -96,4 +96,6 @@ public interface IPileStationInfoService {
|
||||
List<String> queryByStationDeptIds(List<String> stationIds);
|
||||
|
||||
String selectAdapayMemberId(String stationId);
|
||||
|
||||
int updateAmapFlag(String stationId, String amapFlag);
|
||||
}
|
||||
|
||||
@@ -258,31 +258,34 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
PileStationInfo queryStationInfo = selectPileStationInfoById(pileStationInfo.getId());
|
||||
String oldMerchantId = String.valueOf(queryStationInfo.getMerchantId());
|
||||
String newMerchantId = String.valueOf(pileStationInfo.getMerchantId());
|
||||
if (!StringUtils.equals("null", newMerchantId)) {
|
||||
|
||||
// 对比一下运营商有没有变化
|
||||
if (!StringUtils.equals(oldMerchantId, newMerchantId)) {
|
||||
// 新旧运营商不一致,执行站点更换运营商逻辑
|
||||
stationUpdateMerchant(pileStationInfo, newMerchantId);
|
||||
} else {
|
||||
// 查询部门
|
||||
SysDept sysDept = sysDeptService.selectDeptById(Long.parseLong(pileStationInfo.getDeptId()));
|
||||
// 同步组织中的名称,联系人,电话
|
||||
if (sysDept != null) {
|
||||
sysDept.setDeptName(pileStationInfo.getStationName());
|
||||
sysDept.setLeader(pileStationInfo.getStationAdminName());
|
||||
sysDept.setPhone(pileStationInfo.getStationTel());
|
||||
sysDept.setUpdateTime(DateUtils.getNowDate());
|
||||
sysDeptService.updateDept(sysDept);
|
||||
// 对比一下运营商有没有变化
|
||||
if (!StringUtils.equals(oldMerchantId, newMerchantId)) {
|
||||
// 新旧运营商不一致,执行站点更换运营商逻辑
|
||||
stationUpdateMerchant(pileStationInfo, newMerchantId);
|
||||
} else {
|
||||
// 查询部门
|
||||
SysDept sysDept = sysDeptService.selectDeptById(Long.parseLong(pileStationInfo.getDeptId()));
|
||||
// 同步组织中的名称,联系人,电话
|
||||
if (sysDept != null) {
|
||||
sysDept.setDeptName(pileStationInfo.getStationName());
|
||||
sysDept.setLeader(pileStationInfo.getStationAdminName());
|
||||
sysDept.setPhone(pileStationInfo.getStationTel());
|
||||
sysDept.setUpdateTime(DateUtils.getNowDate());
|
||||
sysDeptService.updateDept(sysDept);
|
||||
}
|
||||
}
|
||||
|
||||
pileStationInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||
pileStationInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
int i = pileStationInfoMapper.updatePileStationInfo(pileStationInfo);
|
||||
|
||||
// 再次清缓存
|
||||
redisCache.deleteObject(redisKey);
|
||||
return i;
|
||||
}
|
||||
|
||||
pileStationInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||
pileStationInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
int i = pileStationInfoMapper.updatePileStationInfo(pileStationInfo);
|
||||
|
||||
// 再次清缓存
|
||||
redisCache.deleteObject(redisKey);
|
||||
return i;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -461,5 +464,10 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateAmapFlag(String stationId, String amapFlag) {
|
||||
return pileStationInfoMapper.updateAmapFlag(stationId, amapFlag);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -398,4 +398,13 @@
|
||||
#{item,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<update id="updateAmapFlag">
|
||||
update
|
||||
pile_station_info
|
||||
set
|
||||
amap_flag = #{amapFlag,jdbcType=VARCHAR}
|
||||
where
|
||||
id = #{stationId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user