mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 查询新增站点互联互通配置
This commit is contained in:
@@ -234,6 +234,25 @@ public class PileStationInfoController extends BaseController {
|
||||
return AjaxResult.success(pileService.updateStationQRCodePrefix(dto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增站点互联互通配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:add')")
|
||||
@Log(title = "新增站点互联互通配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/insertThirdPartyStationRelation")
|
||||
public AjaxResult insertRelation(@RequestBody ThirdPartyStationRelationDTO dto) {
|
||||
return toAjax(thirdPartyStationRelationService.insertThirdPartyStationRelation(dto.getStationId(), dto.getThirdPartyType()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除站点互联互通配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:remove')")
|
||||
@Log(title = "删除站点互联互通配置", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/deleteThirdPartyStationRelation")
|
||||
public AjaxResult deleteRelation(@RequestBody ThirdPartyStationRelationDTO dto) {
|
||||
return toAjax(thirdPartyStationRelationService.deleteThirdPartyStationRelation(dto.getId()));
|
||||
}
|
||||
/**
|
||||
* 查询站点互联互通配置
|
||||
*
|
||||
@@ -379,7 +398,6 @@ public class PileStationInfoController extends BaseController {
|
||||
public AjaxResult updateThirdPartyStationRelation(@RequestBody ThirdPartyStationRelationDTO dto) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
// startPage();
|
||||
thirdPartyStationRelationService.updateThirdPartyStationRelation(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -17,4 +17,14 @@ public class ThirdPartyStationRelationDTO {
|
||||
* 要推送的第三方平台类型数组
|
||||
*/
|
||||
private List<String> thirdPartyTypes;
|
||||
|
||||
/**
|
||||
* 要推送的某个第三方平台类型
|
||||
*/
|
||||
private String thirdPartyType;
|
||||
|
||||
/**
|
||||
* 关系id
|
||||
*/
|
||||
private String id;
|
||||
}
|
||||
|
||||
@@ -115,4 +115,6 @@ public interface ThirdPartyStationRelationMapper {
|
||||
int batchInsert(List<ThirdPartyStationRelation> list);
|
||||
|
||||
List<ThirdPartyStationRelationVO> getRelationInfoListV2(@Param("stationId") String stationId);
|
||||
|
||||
int deleteThirdPartyStationRelation(String id);
|
||||
}
|
||||
|
||||
@@ -113,6 +113,21 @@ public interface ThirdPartyStationRelationService {
|
||||
*/
|
||||
List<StationInfoVO> selectStationList(String thirdPlatformType);
|
||||
|
||||
/**
|
||||
* 新增站点与第三方平台对接关系
|
||||
*/
|
||||
int insertThirdPartyStationRelation(String stationId, String thirdPlatformType);
|
||||
|
||||
/**
|
||||
* 删除站点对接第三方平台关系
|
||||
*/
|
||||
int deleteThirdPartyStationRelation(String id);
|
||||
|
||||
/**
|
||||
* 修改站点对接第三方平台关系
|
||||
*/
|
||||
// int updateThirdPartyStationRelation(ThirdPartyStationRelationDTO dto);
|
||||
|
||||
/**
|
||||
* 根据站点id查询该站点对接了哪些第三方平台
|
||||
* @param stationId
|
||||
|
||||
@@ -210,4 +210,20 @@ public class ThirdPartyStationRelationServiceImpl implements ThirdPartyStationRe
|
||||
public List<StationInfoVO> selectStationList(String thirdPlatformType) {
|
||||
return thirdPartyStationRelationMapper.selectStationList(thirdPlatformType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertThirdPartyStationRelation(String stationId, String thirdPlatformType) {
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setStationId(Long.parseLong(stationId));
|
||||
relation.setThirdPartyType(thirdPlatformType);
|
||||
return thirdPartyStationRelationMapper.insertThirdPartyStationRelation(relation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteThirdPartyStationRelation(String id) {
|
||||
ThirdPartyStationRelation relation = new ThirdPartyStationRelation();
|
||||
relation.setId(Long.parseLong(id));
|
||||
relation.setDelFlag(DelFlagEnum.DELETE.getValue());
|
||||
return thirdPartyStationRelationMapper.updateThirdPartyStationRelation(relation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,11 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class ThirdPartyStationRelationVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 站点id
|
||||
*/
|
||||
|
||||
@@ -334,6 +334,7 @@
|
||||
|
||||
<select id="getRelationInfoListV2" resultType="com.jsowell.pile.vo.base.ThirdPartyStationRelationVO">
|
||||
SELECT
|
||||
t1.id AS id,
|
||||
t1.station_id AS stationId,
|
||||
t1.third_party_type AS thirdPartyType,
|
||||
t1.equipment_owner_id as equipmentOwnerId,
|
||||
@@ -355,4 +356,8 @@
|
||||
where t1.del_flag = '0'
|
||||
and t1.station_id = #{stationId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<delete id="deleteThirdPartyStationRelation">
|
||||
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -46,10 +46,8 @@ import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
|
||||
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
||||
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
|
||||
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
|
||||
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.logging.log4j.util.Strings;
|
||||
import org.bouncycastle.crypto.CryptoException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -63,7 +61,6 @@ import java.text.ParseException;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
@@ -88,15 +85,9 @@ public class CommonService {
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyParkingConfigService thirdPartyParkingConfigService;
|
||||
|
||||
@Autowired
|
||||
private LianLianService lianLianService;
|
||||
|
||||
@Autowired
|
||||
private ZDLService zdlService;
|
||||
|
||||
@Autowired
|
||||
private ChargeParkingDiscountService chargeParkingDiscountService;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user