From 19704bcf9e3ee4168bad11f593d290e235fe8a67 Mon Sep 17 00:00:00 2001 From: Lemon Date: Fri, 7 Jul 2023 14:26:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A1=A8=E5=90=8D=E3=80=81?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsowell/lianlian/LianLianController.java | 4 +- ...> ThirdPartyPlatformConfigController.java} | 30 +++--- ...fig.java => ThirdPartyPlatformConfig.java} | 6 +- .../pile/domain/ThirdPartySettingInfo.java | 4 +- ...va => ThirdPartyPlatformConfigMapper.java} | 24 ++--- ... => IThirdPartyPlatformConfigService.java} | 24 ++--- .../DockingPlatformConfigServiceImpl.java | 101 ------------------ .../ThirdPartyPlatformConfigServiceImpl.java | 101 ++++++++++++++++++ ...xml => ThirdPartyPlatformConfigMapper.xml} | 36 +++---- .../service/impl/LianLianServiceImpl.java | 22 ++-- 10 files changed, 178 insertions(+), 174 deletions(-) rename jsowell-admin/src/main/java/com/jsowell/web/controller/pile/{DockingPlatformConfigController.java => ThirdPartyPlatformConfigController.java} (63%) rename jsowell-pile/src/main/java/com/jsowell/pile/domain/{DockingPlatformConfig.java => ThirdPartyPlatformConfig.java} (95%) rename jsowell-pile/src/main/java/com/jsowell/pile/mapper/{DockingPlatformConfigMapper.java => ThirdPartyPlatformConfigMapper.java} (53%) rename jsowell-pile/src/main/java/com/jsowell/pile/service/{IDockingPlatformConfigService.java => IThirdPartyPlatformConfigService.java} (52%) delete mode 100644 jsowell-pile/src/main/java/com/jsowell/pile/service/impl/DockingPlatformConfigServiceImpl.java create mode 100644 jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyPlatformConfigServiceImpl.java rename jsowell-pile/src/main/resources/mapper/pile/{DockingPlatformConfigMapper.xml => ThirdPartyPlatformConfigMapper.xml} (76%) diff --git a/jsowell-admin/src/main/java/com/jsowell/lianlian/LianLianController.java b/jsowell-admin/src/main/java/com/jsowell/lianlian/LianLianController.java index c04c89a74..1ed426552 100644 --- a/jsowell-admin/src/main/java/com/jsowell/lianlian/LianLianController.java +++ b/jsowell-admin/src/main/java/com/jsowell/lianlian/LianLianController.java @@ -9,7 +9,7 @@ import com.jsowell.common.response.RestApiResponse; import com.jsowell.common.util.JWTUtils; import com.jsowell.common.util.StringUtils; import com.jsowell.pile.dto.*; -import com.jsowell.pile.service.IDockingPlatformConfigService; +import com.jsowell.pile.service.IThirdPartyPlatformConfigService; import com.jsowell.thirdparty.lianlian.common.CommonResult; import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO; import com.jsowell.thirdparty.lianlian.service.LianLianService; @@ -38,7 +38,7 @@ public class LianLianController extends BaseController { private LianLianService lianLianService; @Autowired - private IDockingPlatformConfigService dockingPlatformConfigService; + private IThirdPartyPlatformConfigService thirdPartyPlatformConfigService; /** * 推送充电站信息 notification_stationInfo diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/DockingPlatformConfigController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/ThirdPartyPlatformConfigController.java similarity index 63% rename from jsowell-admin/src/main/java/com/jsowell/web/controller/pile/DockingPlatformConfigController.java rename to jsowell-admin/src/main/java/com/jsowell/web/controller/pile/ThirdPartyPlatformConfigController.java index ec1e524b3..405490483 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/DockingPlatformConfigController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/ThirdPartyPlatformConfigController.java @@ -17,8 +17,8 @@ import com.jsowell.common.annotation.Log; import com.jsowell.common.core.controller.BaseController; import com.jsowell.common.core.domain.AjaxResult; import com.jsowell.common.enums.BusinessType; -import com.jsowell.pile.domain.DockingPlatformConfig; -import com.jsowell.pile.service.IDockingPlatformConfigService; +import com.jsowell.pile.domain.ThirdPartyPlatformConfig; +import com.jsowell.pile.service.IThirdPartyPlatformConfigService; import com.jsowell.common.util.poi.ExcelUtil; import com.jsowell.common.core.page.TableDataInfo; @@ -30,18 +30,18 @@ import com.jsowell.common.core.page.TableDataInfo; */ @RestController @RequestMapping("/pile/config") -public class DockingPlatformConfigController extends BaseController { +public class ThirdPartyPlatformConfigController extends BaseController { @Autowired - private IDockingPlatformConfigService dockingPlatformConfigService; + private IThirdPartyPlatformConfigService thirdPartyPlatformConfigService; /** * 查询对接平台配置信息列表 */ @PreAuthorize("@ss.hasPermi('pile:config:list')") @GetMapping("/list") - public TableDataInfo list(DockingPlatformConfig dockingPlatformConfig) { + public TableDataInfo list(ThirdPartyPlatformConfig thirdPartyPlatformConfig) { startPage(); - List list = dockingPlatformConfigService.selectDockingPlatformConfigList(dockingPlatformConfig); + List list = thirdPartyPlatformConfigService.selectThirdPartyPlatformConfigList(thirdPartyPlatformConfig); return getDataTable(list); } @@ -51,9 +51,9 @@ public class DockingPlatformConfigController extends BaseController { @PreAuthorize("@ss.hasPermi('pile:config:export')") @Log(title = "对接平台配置信息", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, DockingPlatformConfig dockingPlatformConfig) { - List list = dockingPlatformConfigService.selectDockingPlatformConfigList(dockingPlatformConfig); - ExcelUtil util = new ExcelUtil(DockingPlatformConfig.class); + public void export(HttpServletResponse response, ThirdPartyPlatformConfig thirdPartyPlatformConfig) { + List list = thirdPartyPlatformConfigService.selectThirdPartyPlatformConfigList(thirdPartyPlatformConfig); + ExcelUtil util = new ExcelUtil(ThirdPartyPlatformConfig.class); util.exportExcel(response, list, "对接平台配置信息数据"); } @@ -63,7 +63,7 @@ public class DockingPlatformConfigController extends BaseController { @PreAuthorize("@ss.hasPermi('pile:config:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Integer id) { - return AjaxResult.success(dockingPlatformConfigService.selectDockingPlatformConfigById(id)); + return AjaxResult.success(thirdPartyPlatformConfigService.selectThirdPartyPlatformConfigById(id)); } /** @@ -72,8 +72,8 @@ public class DockingPlatformConfigController extends BaseController { @PreAuthorize("@ss.hasPermi('pile:config:add')") @Log(title = "对接平台配置信息", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody DockingPlatformConfig dockingPlatformConfig) { - return toAjax(dockingPlatformConfigService.insertDockingPlatformConfig(dockingPlatformConfig)); + public AjaxResult add(@RequestBody ThirdPartyPlatformConfig thirdPartyPlatformConfig) { + return toAjax(thirdPartyPlatformConfigService.insertThirdPartyPlatformConfig(thirdPartyPlatformConfig)); } /** @@ -82,8 +82,8 @@ public class DockingPlatformConfigController extends BaseController { @PreAuthorize("@ss.hasPermi('pile:config:edit')") @Log(title = "对接平台配置信息", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody DockingPlatformConfig dockingPlatformConfig) { - return toAjax(dockingPlatformConfigService.updateDockingPlatformConfig(dockingPlatformConfig)); + public AjaxResult edit(@RequestBody ThirdPartyPlatformConfig thirdPartyPlatformConfig) { + return toAjax(thirdPartyPlatformConfigService.updateThirdPartyPlatformConfig(thirdPartyPlatformConfig)); } /** @@ -93,6 +93,6 @@ public class DockingPlatformConfigController extends BaseController { @Log(title = "对接平台配置信息", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Integer[] ids) { - return toAjax(dockingPlatformConfigService.deleteDockingPlatformConfigByIds(ids)); + return toAjax(thirdPartyPlatformConfigService.deleteThirdPartyPlatformConfigByIds(ids)); } } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/DockingPlatformConfig.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdPartyPlatformConfig.java similarity index 95% rename from jsowell-pile/src/main/java/com/jsowell/pile/domain/DockingPlatformConfig.java rename to jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdPartyPlatformConfig.java index c654cd7bf..52e64f1e2 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/domain/DockingPlatformConfig.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdPartyPlatformConfig.java @@ -6,12 +6,14 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** - * 对接平台配置信息对象 docking_platform_config + * 对接平台时,我方密钥配置信息对象 + * + * thirdparty_platform_config * * @author jsowell * @date 2023-05-27 */ -public class DockingPlatformConfig extends BaseEntity +public class ThirdPartyPlatformConfig extends BaseEntity { private static final long serialVersionUID = 1L; diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdPartySettingInfo.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdPartySettingInfo.java index fddbf3160..72f6d9bd5 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdPartySettingInfo.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdPartySettingInfo.java @@ -6,7 +6,9 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** - * 第三方平台配置对象 thirdparty_setting_info + * 第三方平台配置对象 + * (第三方平台的密钥信息) + * thirdparty_setting_info * * @author jsowell * @date 2023-05-24 diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/DockingPlatformConfigMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdPartyPlatformConfigMapper.java similarity index 53% rename from jsowell-pile/src/main/java/com/jsowell/pile/mapper/DockingPlatformConfigMapper.java rename to jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdPartyPlatformConfigMapper.java index a1bfb870b..410501dbf 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/DockingPlatformConfigMapper.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdPartyPlatformConfigMapper.java @@ -1,6 +1,6 @@ package com.jsowell.pile.mapper; -import com.jsowell.pile.domain.DockingPlatformConfig; +import com.jsowell.pile.domain.ThirdPartyPlatformConfig; import org.springframework.stereotype.Repository; import java.util.List; @@ -12,38 +12,38 @@ import java.util.List; * @date 2023-05-27 */ @Repository -public interface DockingPlatformConfigMapper { +public interface ThirdPartyPlatformConfigMapper { /** * 查询对接平台配置信息 * * @param id 对接平台配置信息主键 * @return 对接平台配置信息 */ - public DockingPlatformConfig selectDockingPlatformConfigById(Integer id); + public ThirdPartyPlatformConfig selectThirdPartyPlatformConfigById(Integer id); /** * 查询对接平台配置信息列表 * - * @param dockingPlatformConfig 对接平台配置信息 + * @param thirdPartyPlatformConfig 对接平台配置信息 * @return 对接平台配置信息集合 */ - public List selectDockingPlatformConfigList(DockingPlatformConfig dockingPlatformConfig); + public List selectThirdPartyPlatformConfigList(ThirdPartyPlatformConfig thirdPartyPlatformConfig); /** * 新增对接平台配置信息 * - * @param dockingPlatformConfig 对接平台配置信息 + * @param thirdPartyPlatformConfig 对接平台配置信息 * @return 结果 */ - public int insertDockingPlatformConfig(DockingPlatformConfig dockingPlatformConfig); + public int insertThirdPartyPlatformConfig(ThirdPartyPlatformConfig thirdPartyPlatformConfig); /** * 修改对接平台配置信息 * - * @param dockingPlatformConfig 对接平台配置信息 + * @param thirdPartyPlatformConfig 对接平台配置信息 * @return 结果 */ - public int updateDockingPlatformConfig(DockingPlatformConfig dockingPlatformConfig); + public int updateThirdPartyPlatformConfig(ThirdPartyPlatformConfig thirdPartyPlatformConfig); /** * 删除对接平台配置信息 @@ -51,7 +51,7 @@ public interface DockingPlatformConfigMapper { * @param id 对接平台配置信息主键 * @return 结果 */ - public int deleteDockingPlatformConfigById(Integer id); + public int deleteThirdPartyPlatformConfigById(Integer id); /** * 批量删除对接平台配置信息 @@ -59,7 +59,7 @@ public interface DockingPlatformConfigMapper { * @param ids 需要删除的数据主键集合 * @return 结果 */ - public int deleteDockingPlatformConfigByIds(Integer[] ids); + public int deleteThirdPartyPlatformConfigByIds(Integer[] ids); /** * 通过operatorId查询配置信息 @@ -67,5 +67,5 @@ public interface DockingPlatformConfigMapper { * @param operatorId * @return */ - DockingPlatformConfig getInfoByOperatorId(String operatorId); + ThirdPartyPlatformConfig getInfoByOperatorId(String operatorId); } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/IDockingPlatformConfigService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdPartyPlatformConfigService.java similarity index 52% rename from jsowell-pile/src/main/java/com/jsowell/pile/service/IDockingPlatformConfigService.java rename to jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdPartyPlatformConfigService.java index 9c4746de5..6c0cbf659 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/IDockingPlatformConfigService.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/IThirdPartyPlatformConfigService.java @@ -1,7 +1,7 @@ package com.jsowell.pile.service; import java.util.List; -import com.jsowell.pile.domain.DockingPlatformConfig; +import com.jsowell.pile.domain.ThirdPartyPlatformConfig; /** * 对接平台配置信息Service接口 @@ -9,7 +9,7 @@ import com.jsowell.pile.domain.DockingPlatformConfig; * @author jsowell * @date 2023-05-27 */ -public interface IDockingPlatformConfigService +public interface IThirdPartyPlatformConfigService { /** * 查询对接平台配置信息 @@ -17,31 +17,31 @@ public interface IDockingPlatformConfigService * @param id 对接平台配置信息主键 * @return 对接平台配置信息 */ - public DockingPlatformConfig selectDockingPlatformConfigById(Integer id); + public ThirdPartyPlatformConfig selectThirdPartyPlatformConfigById(Integer id); /** * 查询对接平台配置信息列表 * - * @param dockingPlatformConfig 对接平台配置信息 + * @param thirdPartyPlatformConfig 对接平台配置信息 * @return 对接平台配置信息集合 */ - public List selectDockingPlatformConfigList(DockingPlatformConfig dockingPlatformConfig); + public List selectThirdPartyPlatformConfigList(ThirdPartyPlatformConfig thirdPartyPlatformConfig); /** * 新增对接平台配置信息 * - * @param dockingPlatformConfig 对接平台配置信息 + * @param thirdPartyPlatformConfig 对接平台配置信息 * @return 结果 */ - public int insertDockingPlatformConfig(DockingPlatformConfig dockingPlatformConfig); + public int insertThirdPartyPlatformConfig(ThirdPartyPlatformConfig thirdPartyPlatformConfig); /** * 修改对接平台配置信息 * - * @param dockingPlatformConfig 对接平台配置信息 + * @param thirdPartyPlatformConfig 对接平台配置信息 * @return 结果 */ - public int updateDockingPlatformConfig(DockingPlatformConfig dockingPlatformConfig); + public int updateThirdPartyPlatformConfig(ThirdPartyPlatformConfig thirdPartyPlatformConfig); /** * 批量删除对接平台配置信息 @@ -49,7 +49,7 @@ public interface IDockingPlatformConfigService * @param ids 需要删除的对接平台配置信息主键集合 * @return 结果 */ - public int deleteDockingPlatformConfigByIds(Integer[] ids); + public int deleteThirdPartyPlatformConfigByIds(Integer[] ids); /** * 删除对接平台配置信息信息 @@ -57,12 +57,12 @@ public interface IDockingPlatformConfigService * @param id 对接平台配置信息主键 * @return 结果 */ - public int deleteDockingPlatformConfigById(Integer id); + public int deleteThirdPartyPlatformConfigById(Integer id); /** * 通过operatorId查询配置信息 * @param operatorId * @return */ - DockingPlatformConfig getInfoByOperatorId(String operatorId); + ThirdPartyPlatformConfig getInfoByOperatorId(String operatorId); } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/DockingPlatformConfigServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/DockingPlatformConfigServiceImpl.java deleted file mode 100644 index 97540bb28..000000000 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/DockingPlatformConfigServiceImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.jsowell.pile.service.impl; - -import java.util.List; - -import com.jsowell.common.util.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.jsowell.pile.mapper.DockingPlatformConfigMapper; -import com.jsowell.pile.domain.DockingPlatformConfig; -import com.jsowell.pile.service.IDockingPlatformConfigService; - -/** - * 对接平台配置信息Service业务层处理 - * - * @author jsowell - * @date 2023-05-27 - */ -@Service -public class DockingPlatformConfigServiceImpl implements IDockingPlatformConfigService { - @Autowired - private DockingPlatformConfigMapper dockingPlatformConfigMapper; - - /** - * 查询对接平台配置信息 - * - * @param id 对接平台配置信息主键 - * @return 对接平台配置信息 - */ - @Override - public DockingPlatformConfig selectDockingPlatformConfigById(Integer id) { - return dockingPlatformConfigMapper.selectDockingPlatformConfigById(id); - } - - /** - * 查询对接平台配置信息列表 - * - * @param dockingPlatformConfig 对接平台配置信息 - * @return 对接平台配置信息 - */ - @Override - public List selectDockingPlatformConfigList(DockingPlatformConfig dockingPlatformConfig) { - return dockingPlatformConfigMapper.selectDockingPlatformConfigList(dockingPlatformConfig); - } - - /** - * 新增对接平台配置信息 - * - * @param dockingPlatformConfig 对接平台配置信息 - * @return 结果 - */ - @Override - public int insertDockingPlatformConfig(DockingPlatformConfig dockingPlatformConfig) { - dockingPlatformConfig.setCreateTime(DateUtils.getNowDate()); - return dockingPlatformConfigMapper.insertDockingPlatformConfig(dockingPlatformConfig); - } - - /** - * 修改对接平台配置信息 - * - * @param dockingPlatformConfig 对接平台配置信息 - * @return 结果 - */ - @Override - public int updateDockingPlatformConfig(DockingPlatformConfig dockingPlatformConfig) { - dockingPlatformConfig.setUpdateTime(DateUtils.getNowDate()); - return dockingPlatformConfigMapper.updateDockingPlatformConfig(dockingPlatformConfig); - } - - /** - * 批量删除对接平台配置信息 - * - * @param ids 需要删除的对接平台配置信息主键 - * @return 结果 - */ - @Override - public int deleteDockingPlatformConfigByIds(Integer[] ids) { - return dockingPlatformConfigMapper.deleteDockingPlatformConfigByIds(ids); - } - - /** - * 删除对接平台配置信息信息 - * - * @param id 对接平台配置信息主键 - * @return 结果 - */ - @Override - public int deleteDockingPlatformConfigById(Integer id) { - return dockingPlatformConfigMapper.deleteDockingPlatformConfigById(id); - } - - /** - * 通过operatorId查询配置信息 - * - * @param operatorId - * @return - */ - @Override - public DockingPlatformConfig getInfoByOperatorId(String operatorId) { - return dockingPlatformConfigMapper.getInfoByOperatorId(operatorId); - } -} diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyPlatformConfigServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyPlatformConfigServiceImpl.java new file mode 100644 index 000000000..4d3ef0eb6 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/ThirdPartyPlatformConfigServiceImpl.java @@ -0,0 +1,101 @@ +package com.jsowell.pile.service.impl; + +import java.util.List; + +import com.jsowell.common.util.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.jsowell.pile.mapper.ThirdPartyPlatformConfigMapper; +import com.jsowell.pile.domain.ThirdPartyPlatformConfig; +import com.jsowell.pile.service.IThirdPartyPlatformConfigService; + +/** + * 对接平台配置信息Service业务层处理 + * + * @author jsowell + * @date 2023-05-27 + */ +@Service +public class ThirdPartyPlatformConfigServiceImpl implements IThirdPartyPlatformConfigService { + @Autowired + private ThirdPartyPlatformConfigMapper thirdPartyPlatformConfigMapper; + + /** + * 查询对接平台配置信息 + * + * @param id 对接平台配置信息主键 + * @return 对接平台配置信息 + */ + @Override + public ThirdPartyPlatformConfig selectThirdPartyPlatformConfigById(Integer id) { + return thirdPartyPlatformConfigMapper.selectThirdPartyPlatformConfigById(id); + } + + /** + * 查询对接平台配置信息列表 + * + * @param thirdPartyPlatformConfig 对接平台配置信息 + * @return 对接平台配置信息 + */ + @Override + public List selectThirdPartyPlatformConfigList(ThirdPartyPlatformConfig thirdPartyPlatformConfig) { + return thirdPartyPlatformConfigMapper.selectThirdPartyPlatformConfigList(thirdPartyPlatformConfig); + } + + /** + * 新增对接平台配置信息 + * + * @param thirdPartyPlatformConfig 对接平台配置信息 + * @return 结果 + */ + @Override + public int insertThirdPartyPlatformConfig(ThirdPartyPlatformConfig thirdPartyPlatformConfig) { + thirdPartyPlatformConfig.setCreateTime(DateUtils.getNowDate()); + return thirdPartyPlatformConfigMapper.insertThirdPartyPlatformConfig(thirdPartyPlatformConfig); + } + + /** + * 修改对接平台配置信息 + * + * @param thirdPartyPlatformConfig 对接平台配置信息 + * @return 结果 + */ + @Override + public int updateThirdPartyPlatformConfig(ThirdPartyPlatformConfig thirdPartyPlatformConfig) { + thirdPartyPlatformConfig.setUpdateTime(DateUtils.getNowDate()); + return thirdPartyPlatformConfigMapper.updateThirdPartyPlatformConfig(thirdPartyPlatformConfig); + } + + /** + * 批量删除对接平台配置信息 + * + * @param ids 需要删除的对接平台配置信息主键 + * @return 结果 + */ + @Override + public int deleteThirdPartyPlatformConfigByIds(Integer[] ids) { + return thirdPartyPlatformConfigMapper.deleteThirdPartyPlatformConfigByIds(ids); + } + + /** + * 删除对接平台配置信息信息 + * + * @param id 对接平台配置信息主键 + * @return 结果 + */ + @Override + public int deleteThirdPartyPlatformConfigById(Integer id) { + return thirdPartyPlatformConfigMapper.deleteThirdPartyPlatformConfigById(id); + } + + /** + * 通过operatorId查询配置信息 + * + * @param operatorId + * @return + */ + @Override + public ThirdPartyPlatformConfig getInfoByOperatorId(String operatorId) { + return thirdPartyPlatformConfigMapper.getInfoByOperatorId(operatorId); + } +} diff --git a/jsowell-pile/src/main/resources/mapper/pile/DockingPlatformConfigMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/ThirdPartyPlatformConfigMapper.xml similarity index 76% rename from jsowell-pile/src/main/resources/mapper/pile/DockingPlatformConfigMapper.xml rename to jsowell-pile/src/main/resources/mapper/pile/ThirdPartyPlatformConfigMapper.xml index d01599061..8bca90749 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/DockingPlatformConfigMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/ThirdPartyPlatformConfigMapper.xml @@ -2,9 +2,9 @@ - + - + @@ -19,8 +19,8 @@ - - select id, name, operator_id, operator_secret, sign_secret, data_secret, data_secret_IV, create_time, create_by, update_time, update_by, del_flag from docking_platform_config + + select id, name, operator_id, operator_secret, sign_secret, data_secret, data_secret_IV, create_time, create_by, update_time, update_by, del_flag from thirdparty_platform_config @@ -28,8 +28,8 @@ id, name, operator_id, operator_secret, sign_secret, data_secret, data_secret_IV, create_time, create_by, update_time, update_by, del_flag - + and name like concat('%', #{name}, '%') and operator_id = #{operatorId} @@ -40,13 +40,13 @@ - + where id = #{id} - - insert into docking_platform_config + + insert into thirdparty_platform_config name, operator_id, @@ -75,8 +75,8 @@ - - update docking_platform_config + + update thirdparty_platform_config name = #{name}, operator_id = #{operatorId}, @@ -93,20 +93,20 @@ where id = #{id} - - delete from docking_platform_config where id = #{id} + + delete from thirdparty_platform_config where id = #{id} - - delete from docking_platform_config where id in + + delete from thirdparty_platform_config where id in #{id} - select - from docking_platform_config + from thirdparty_platform_config where operator_id = #{operatorId,jdbcType=VARCHAR} \ No newline at end of file diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java index 7310521a8..11fd4f67c 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java @@ -90,7 +90,7 @@ public class LianLianServiceImpl implements LianLianService { private IThirdPartySettingInfoService thirdPartySettingInfoService; @Autowired - private IDockingPlatformConfigService dockingPlatformConfigService; + private IThirdPartyPlatformConfigService thirdPartyPlatformConfigService; @Autowired private IStationSettingRelationService stationSettingRelationService; @@ -232,7 +232,7 @@ public class LianLianServiceImpl implements LianLianService { // 未查到数据 return null; } - DockingPlatformConfig configInfo = dockingPlatformConfigService.getInfoByOperatorId(dto.getOperatorId()); + ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId()); if (configInfo == null) { return null; } @@ -317,7 +317,7 @@ public class LianLianServiceImpl implements LianLianService { List stationIds = dto.getStationIds(); List StationStatusInfos = new ArrayList<>(); List ConnectorStatusInfos = new ArrayList<>(); - DockingPlatformConfig configInfo = dockingPlatformConfigService.getInfoByOperatorId(dto.getOperatorId()); + ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId()); if (configInfo == null) { return null; } @@ -407,7 +407,7 @@ public class LianLianServiceImpl implements LianLianService { */ @Override public Map query_station_stats(QueryStationInfoDTO dto) { - DockingPlatformConfig configInfo = dockingPlatformConfigService.getInfoByOperatorId(dto.getOperatorId()); + ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId()); if (configInfo == null) { return null; } @@ -518,7 +518,7 @@ public class LianLianServiceImpl implements LianLianService { vo.setFailReasonMsg("未查到该桩的数据"); return null; } - DockingPlatformConfig configInfo = dockingPlatformConfigService.getInfoByOperatorId(dto.getOperatorID()); + ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorID()); if (configInfo == null) { return null; } @@ -570,7 +570,7 @@ public class LianLianServiceImpl implements LianLianService { // 平台已存在订单 return null; } - DockingPlatformConfig configInfo = dockingPlatformConfigService.getInfoByOperatorId(dto.getOperatorID()); + ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorID()); if (configInfo == null) { return null; } @@ -632,7 +632,7 @@ public class LianLianServiceImpl implements LianLianService { if (orderInfo == null) { return null; } - DockingPlatformConfig configInfo = dockingPlatformConfigService.getInfoByOperatorId(dto.getOperatorID()); + ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorID()); if (configInfo == null) { return null; } @@ -702,7 +702,7 @@ public class LianLianServiceImpl implements LianLianService { if (orderInfo == null) { return null; } - DockingPlatformConfig configInfo = dockingPlatformConfigService.getInfoByOperatorId(dto.getOperatorID()); + ThirdPartyPlatformConfig configInfo = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorID()); if (configInfo == null) { return null; } @@ -1214,7 +1214,7 @@ public class LianLianServiceImpl implements LianLianService { return null; } // 通过operatorID 查出 operatorSecret - DockingPlatformConfig platformConfig = dockingPlatformConfigService.getInfoByOperatorId(dto.getOperatorId()); + ThirdPartyPlatformConfig platformConfig = thirdPartyPlatformConfigService.getInfoByOperatorId(dto.getOperatorId()); if (platformConfig == null) { return null; } @@ -1419,7 +1419,7 @@ public class LianLianServiceImpl implements LianLianService { public Map generateToken(CommonParamsDTO dto) throws UnsupportedEncodingException { String operatorID = dto.getOperatorID(); // 通过operatorID 查出 operatorSecret - DockingPlatformConfig platformConfig = dockingPlatformConfigService.getInfoByOperatorId(operatorID); + ThirdPartyPlatformConfig platformConfig = thirdPartyPlatformConfigService.getInfoByOperatorId(operatorID); if (platformConfig == null) { return null; } @@ -1479,7 +1479,7 @@ public class LianLianServiceImpl implements LianLianService { public Map checkoutSign(CommonParamsDTO dto){ String operatorID = dto.getOperatorID(); // 通过operatorID 查出 operatorSecret - DockingPlatformConfig platformConfig = dockingPlatformConfigService.getInfoByOperatorId(operatorID); + ThirdPartyPlatformConfig platformConfig = thirdPartyPlatformConfigService.getInfoByOperatorId(operatorID); if (platformConfig == null) { return null; }