mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-08 20:10:16 +08:00
update 对接lianlian平台
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
package com.jsowell.web.controller.thirdparty;
|
||||
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.thirdparty.domain.ThirdpartySecretInfo;
|
||||
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 对接三方平台配置Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-04-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/thirdparty/secret")
|
||||
public class ThirdpartySecretInfoController extends BaseController {
|
||||
@Autowired
|
||||
private ThirdpartySecretInfoService thirdpartySecretInfoService;
|
||||
|
||||
/**
|
||||
* 查询对接三方平台配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('thirdparty:secret:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ThirdpartySecretInfo thirdpartySecretInfo) {
|
||||
startPage();
|
||||
List<ThirdpartySecretInfo> list = thirdpartySecretInfoService.selectThirdpartySecretInfoList(thirdpartySecretInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出对接三方平台配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('thirdparty:secret:export')")
|
||||
@Log(title = "对接三方平台配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ThirdpartySecretInfo thirdpartySecretInfo) {
|
||||
List<ThirdpartySecretInfo> list = thirdpartySecretInfoService.selectThirdpartySecretInfoList(thirdpartySecretInfo);
|
||||
ExcelUtil<ThirdpartySecretInfo> util = new ExcelUtil<ThirdpartySecretInfo>(ThirdpartySecretInfo.class);
|
||||
util.exportExcel(response, list, "对接三方平台配置数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对接三方平台配置详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('thirdparty:secret:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(thirdpartySecretInfoService.selectThirdpartySecretInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增对接三方平台配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('thirdparty:secret:add')")
|
||||
@Log(title = "对接三方平台配置", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ThirdpartySecretInfo thirdpartySecretInfo) {
|
||||
return toAjax(thirdpartySecretInfoService.insertThirdpartySecretInfo(thirdpartySecretInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改对接三方平台配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('thirdparty:secret:edit')")
|
||||
@Log(title = "对接三方平台配置", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ThirdpartySecretInfo thirdpartySecretInfo) {
|
||||
return toAjax(thirdpartySecretInfoService.updateThirdpartySecretInfo(thirdpartySecretInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除对接三方平台配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('thirdparty:secret:remove')")
|
||||
@Log(title = "对接三方平台配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(thirdpartySecretInfoService.deleteThirdpartySecretInfoByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -36,10 +36,10 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
# url: jdbc:mysql://192.168.2.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: jsowell_dev
|
||||
url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: jsowell_prd_copy
|
||||
url: jdbc:mysql://192.168.2.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: jsowell_dev
|
||||
#url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
#username: jsowell_prd_copy
|
||||
password: 123456
|
||||
# 从库数据源
|
||||
slave:
|
||||
|
||||
222
jsowell-pile/src/main/java/com/jsowell/thirdparty/domain/ThirdpartySecretInfo.java
vendored
Normal file
222
jsowell-pile/src/main/java/com/jsowell/thirdparty/domain/ThirdpartySecretInfo.java
vendored
Normal file
@@ -0,0 +1,222 @@
|
||||
package com.jsowell.thirdparty.domain;
|
||||
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import com.jsowell.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 对接三方平台配置对象 thirdparty_secret_info
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-04-18
|
||||
*/
|
||||
public class ThirdpartySecretInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 对接平台名称 */
|
||||
@Excel(name = "对接平台名称")
|
||||
private String platformName;
|
||||
|
||||
/** 对接平台类型 */
|
||||
@Excel(name = "对接平台类型")
|
||||
private String platformType;
|
||||
|
||||
/** 接口地址前缀 */
|
||||
@Excel(name = "接口地址前缀")
|
||||
private String urlPrefix;
|
||||
|
||||
/** 对接平台标识(使用组织机构代码) */
|
||||
@Excel(name = "对接平台标识", readConverterExp = "使=用组织机构代码")
|
||||
private String theirOperatorId;
|
||||
|
||||
/** 对接平台生成的唯一识别密钥 */
|
||||
@Excel(name = "对接平台生成的唯一识别密钥")
|
||||
private String theirOperatorSecret;
|
||||
|
||||
/** 对接平台生成的消息密钥 */
|
||||
@Excel(name = "对接平台生成的消息密钥")
|
||||
private String theirDataSecret;
|
||||
|
||||
/** 对接平台生成的初始化向量 */
|
||||
@Excel(name = "对接平台生成的初始化向量")
|
||||
private String theirDataSecretIv;
|
||||
|
||||
/** 对接平台生成的签名密钥 */
|
||||
@Excel(name = "对接平台生成的签名密钥")
|
||||
private String theirSigSecret;
|
||||
|
||||
/** 我方生成的唯一识别密钥 */
|
||||
@Excel(name = "我方生成的唯一识别密钥")
|
||||
private String ourOperatorSecret;
|
||||
|
||||
/** 我方生成的消息密钥 */
|
||||
@Excel(name = "我方生成的消息密钥")
|
||||
private String ourDataSecret;
|
||||
|
||||
/** 我方生成的初始化向量 */
|
||||
@Excel(name = "我方生成的初始化向量")
|
||||
private String ourDataSecretIv;
|
||||
|
||||
/** 我方生成的签名密钥 */
|
||||
@Excel(name = "我方生成的签名密钥")
|
||||
private String ourSigSecret;
|
||||
|
||||
/** 删除标识(0-正常;1-删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPlatformName(String platformName)
|
||||
{
|
||||
this.platformName = platformName;
|
||||
}
|
||||
|
||||
public String getPlatformName()
|
||||
{
|
||||
return platformName;
|
||||
}
|
||||
public void setPlatformType(String platformType)
|
||||
{
|
||||
this.platformType = platformType;
|
||||
}
|
||||
|
||||
public String getPlatformType()
|
||||
{
|
||||
return platformType;
|
||||
}
|
||||
public void setUrlPrefix(String urlPrefix)
|
||||
{
|
||||
this.urlPrefix = urlPrefix;
|
||||
}
|
||||
|
||||
public String getUrlPrefix()
|
||||
{
|
||||
return urlPrefix;
|
||||
}
|
||||
public void setTheirOperatorId(String theirOperatorId)
|
||||
{
|
||||
this.theirOperatorId = theirOperatorId;
|
||||
}
|
||||
|
||||
public String getTheirOperatorId()
|
||||
{
|
||||
return theirOperatorId;
|
||||
}
|
||||
public void setTheirOperatorSecret(String theirOperatorSecret)
|
||||
{
|
||||
this.theirOperatorSecret = theirOperatorSecret;
|
||||
}
|
||||
|
||||
public String getTheirOperatorSecret()
|
||||
{
|
||||
return theirOperatorSecret;
|
||||
}
|
||||
public void setTheirDataSecret(String theirDataSecret)
|
||||
{
|
||||
this.theirDataSecret = theirDataSecret;
|
||||
}
|
||||
|
||||
public String getTheirDataSecret()
|
||||
{
|
||||
return theirDataSecret;
|
||||
}
|
||||
public void setTheirDataSecretIv(String theirDataSecretIv)
|
||||
{
|
||||
this.theirDataSecretIv = theirDataSecretIv;
|
||||
}
|
||||
|
||||
public String getTheirDataSecretIv()
|
||||
{
|
||||
return theirDataSecretIv;
|
||||
}
|
||||
public void setTheirSigSecret(String theirSigSecret)
|
||||
{
|
||||
this.theirSigSecret = theirSigSecret;
|
||||
}
|
||||
|
||||
public String getTheirSigSecret()
|
||||
{
|
||||
return theirSigSecret;
|
||||
}
|
||||
public void setOurOperatorSecret(String ourOperatorSecret)
|
||||
{
|
||||
this.ourOperatorSecret = ourOperatorSecret;
|
||||
}
|
||||
|
||||
public String getOurOperatorSecret()
|
||||
{
|
||||
return ourOperatorSecret;
|
||||
}
|
||||
public void setOurDataSecret(String ourDataSecret)
|
||||
{
|
||||
this.ourDataSecret = ourDataSecret;
|
||||
}
|
||||
|
||||
public String getOurDataSecret()
|
||||
{
|
||||
return ourDataSecret;
|
||||
}
|
||||
public void setOurDataSecretIv(String ourDataSecretIv)
|
||||
{
|
||||
this.ourDataSecretIv = ourDataSecretIv;
|
||||
}
|
||||
|
||||
public String getOurDataSecretIv()
|
||||
{
|
||||
return ourDataSecretIv;
|
||||
}
|
||||
public void setOurSigSecret(String ourSigSecret)
|
||||
{
|
||||
this.ourSigSecret = ourSigSecret;
|
||||
}
|
||||
|
||||
public String getOurSigSecret()
|
||||
{
|
||||
return ourSigSecret;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
||||
.append("id", getId())
|
||||
.append("platformName", getPlatformName())
|
||||
.append("platformType", getPlatformType())
|
||||
.append("urlPrefix", getUrlPrefix())
|
||||
.append("theirOperatorId", getTheirOperatorId())
|
||||
.append("theirOperatorSecret", getTheirOperatorSecret())
|
||||
.append("theirDataSecret", getTheirDataSecret())
|
||||
.append("theirDataSecretIv", getTheirDataSecretIv())
|
||||
.append("theirSigSecret", getTheirSigSecret())
|
||||
.append("ourOperatorSecret", getOurOperatorSecret())
|
||||
.append("ourDataSecret", getOurDataSecret())
|
||||
.append("ourDataSecretIv", getOurDataSecretIv())
|
||||
.append("ourSigSecret", getOurSigSecret())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
62
jsowell-pile/src/main/java/com/jsowell/thirdparty/mapper/ThirdpartySecretInfoMapper.java
vendored
Normal file
62
jsowell-pile/src/main/java/com/jsowell/thirdparty/mapper/ThirdpartySecretInfoMapper.java
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
package com.jsowell.thirdparty.mapper;
|
||||
|
||||
import com.jsowell.thirdparty.domain.ThirdpartySecretInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 对接三方平台配置Mapper接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-04-18
|
||||
*/
|
||||
public interface ThirdpartySecretInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询对接三方平台配置
|
||||
*
|
||||
* @param id 对接三方平台配置主键
|
||||
* @return 对接三方平台配置
|
||||
*/
|
||||
public ThirdpartySecretInfo selectThirdpartySecretInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询对接三方平台配置列表
|
||||
*
|
||||
* @param thirdpartySecretInfo 对接三方平台配置
|
||||
* @return 对接三方平台配置集合
|
||||
*/
|
||||
public List<ThirdpartySecretInfo> selectThirdpartySecretInfoList(ThirdpartySecretInfo thirdpartySecretInfo);
|
||||
|
||||
/**
|
||||
* 新增对接三方平台配置
|
||||
*
|
||||
* @param thirdpartySecretInfo 对接三方平台配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertThirdpartySecretInfo(ThirdpartySecretInfo thirdpartySecretInfo);
|
||||
|
||||
/**
|
||||
* 修改对接三方平台配置
|
||||
*
|
||||
* @param thirdpartySecretInfo 对接三方平台配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateThirdpartySecretInfo(ThirdpartySecretInfo thirdpartySecretInfo);
|
||||
|
||||
/**
|
||||
* 删除对接三方平台配置
|
||||
*
|
||||
* @param id 对接三方平台配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteThirdpartySecretInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除对接三方平台配置
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteThirdpartySecretInfoByIds(Long[] ids);
|
||||
}
|
||||
61
jsowell-pile/src/main/java/com/jsowell/thirdparty/service/ThirdpartySecretInfoService.java
vendored
Normal file
61
jsowell-pile/src/main/java/com/jsowell/thirdparty/service/ThirdpartySecretInfoService.java
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
package com.jsowell.thirdparty.service;
|
||||
|
||||
import com.jsowell.thirdparty.domain.ThirdpartySecretInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 对接三方平台配置Service接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-04-18
|
||||
*/
|
||||
public interface ThirdpartySecretInfoService {
|
||||
/**
|
||||
* 查询对接三方平台配置
|
||||
*
|
||||
* @param id 对接三方平台配置主键
|
||||
* @return 对接三方平台配置
|
||||
*/
|
||||
public ThirdpartySecretInfo selectThirdpartySecretInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询对接三方平台配置列表
|
||||
*
|
||||
* @param thirdpartySecretInfo 对接三方平台配置
|
||||
* @return 对接三方平台配置集合
|
||||
*/
|
||||
public List<ThirdpartySecretInfo> selectThirdpartySecretInfoList(ThirdpartySecretInfo thirdpartySecretInfo);
|
||||
|
||||
/**
|
||||
* 新增对接三方平台配置
|
||||
*
|
||||
* @param thirdpartySecretInfo 对接三方平台配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertThirdpartySecretInfo(ThirdpartySecretInfo thirdpartySecretInfo);
|
||||
|
||||
/**
|
||||
* 修改对接三方平台配置
|
||||
*
|
||||
* @param thirdpartySecretInfo 对接三方平台配置
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateThirdpartySecretInfo(ThirdpartySecretInfo thirdpartySecretInfo);
|
||||
|
||||
/**
|
||||
* 批量删除对接三方平台配置
|
||||
*
|
||||
* @param ids 需要删除的对接三方平台配置主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteThirdpartySecretInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除对接三方平台配置信息
|
||||
*
|
||||
* @param id 对接三方平台配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteThirdpartySecretInfoById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.jsowell.thirdparty.service.impl;
|
||||
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.thirdparty.domain.ThirdpartySecretInfo;
|
||||
import com.jsowell.thirdparty.mapper.ThirdpartySecretInfoMapper;
|
||||
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 对接三方平台配置Service业务层处理
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-04-18
|
||||
*/
|
||||
@Service
|
||||
public class ThirdpartySecretInfoServiceImpl implements ThirdpartySecretInfoService {
|
||||
@Autowired
|
||||
private ThirdpartySecretInfoMapper thirdpartySecretInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询对接三方平台配置
|
||||
*
|
||||
* @param id 对接三方平台配置主键
|
||||
* @return 对接三方平台配置
|
||||
*/
|
||||
@Override
|
||||
public ThirdpartySecretInfo selectThirdpartySecretInfoById(Long id) {
|
||||
return thirdpartySecretInfoMapper.selectThirdpartySecretInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询对接三方平台配置列表
|
||||
*
|
||||
* @param thirdpartySecretInfo 对接三方平台配置
|
||||
* @return 对接三方平台配置
|
||||
*/
|
||||
@Override
|
||||
public List<ThirdpartySecretInfo> selectThirdpartySecretInfoList(ThirdpartySecretInfo thirdpartySecretInfo) {
|
||||
return thirdpartySecretInfoMapper.selectThirdpartySecretInfoList(thirdpartySecretInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增对接三方平台配置
|
||||
*
|
||||
* @param thirdpartySecretInfo 对接三方平台配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertThirdpartySecretInfo(ThirdpartySecretInfo thirdpartySecretInfo) {
|
||||
thirdpartySecretInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return thirdpartySecretInfoMapper.insertThirdpartySecretInfo(thirdpartySecretInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改对接三方平台配置
|
||||
*
|
||||
* @param thirdpartySecretInfo 对接三方平台配置
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateThirdpartySecretInfo(ThirdpartySecretInfo thirdpartySecretInfo) {
|
||||
thirdpartySecretInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return thirdpartySecretInfoMapper.updateThirdpartySecretInfo(thirdpartySecretInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除对接三方平台配置
|
||||
*
|
||||
* @param ids 需要删除的对接三方平台配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteThirdpartySecretInfoByIds(Long[] ids) {
|
||||
return thirdpartySecretInfoMapper.deleteThirdpartySecretInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除对接三方平台配置信息
|
||||
*
|
||||
* @param id 对接三方平台配置主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteThirdpartySecretInfoById(Long id) {
|
||||
return thirdpartySecretInfoMapper.deleteThirdpartySecretInfoById(id);
|
||||
}
|
||||
}
|
||||
131
jsowell-pile/src/main/resources/mapper/thirdparty/ThirdpartySecretInfoMapper.xml
vendored
Normal file
131
jsowell-pile/src/main/resources/mapper/thirdparty/ThirdpartySecretInfoMapper.xml
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jsowell.thirdparty.mapper.ThirdpartySecretInfoMapper">
|
||||
|
||||
<resultMap type="ThirdpartySecretInfo" id="ThirdpartySecretInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="platformName" column="platform_name" />
|
||||
<result property="platformType" column="platform_type" />
|
||||
<result property="urlPrefix" column="url_prefix" />
|
||||
<result property="theirOperatorId" column="their_operator_id" />
|
||||
<result property="theirOperatorSecret" column="their_operator_secret" />
|
||||
<result property="theirDataSecret" column="their_data_secret" />
|
||||
<result property="theirDataSecretIv" column="their_data_secret_Iv" />
|
||||
<result property="theirSigSecret" column="their_sig_secret" />
|
||||
<result property="ourOperatorSecret" column="our_operator_secret" />
|
||||
<result property="ourDataSecret" column="our_data_secret" />
|
||||
<result property="ourDataSecretIv" column="our_data_secret_iv" />
|
||||
<result property="ourSigSecret" column="our_sig_secret" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectThirdpartySecretInfoVo">
|
||||
select id, platform_name, platform_type, url_prefix, their_operator_id, their_operator_secret, their_data_secret, their_data_secret_Iv, their_sig_secret, our_operator_secret, our_data_secret, our_data_secret_iv, our_sig_secret, create_by, create_time, update_by, update_time, del_flag from thirdparty_secret_info
|
||||
</sql>
|
||||
|
||||
<select id="selectThirdpartySecretInfoList" parameterType="ThirdpartySecretInfo" resultMap="ThirdpartySecretInfoResult">
|
||||
<include refid="selectThirdpartySecretInfoVo"/>
|
||||
<where>
|
||||
<if test="platformName != null and platformName != ''"> and platform_name like concat('%', #{platformName}, '%')</if>
|
||||
<if test="platformType != null and platformType != ''"> and platform_type = #{platformType}</if>
|
||||
<if test="urlPrefix != null and urlPrefix != ''"> and url_prefix = #{urlPrefix}</if>
|
||||
<if test="theirOperatorId != null and theirOperatorId != ''"> and their_operator_id = #{theirOperatorId}</if>
|
||||
<if test="theirOperatorSecret != null and theirOperatorSecret != ''"> and their_operator_secret = #{theirOperatorSecret}</if>
|
||||
<if test="theirDataSecret != null and theirDataSecret != ''"> and their_data_secret = #{theirDataSecret}</if>
|
||||
<if test="theirDataSecretIv != null and theirDataSecretIv != ''"> and their_data_secret_Iv = #{theirDataSecretIv}</if>
|
||||
<if test="theirSigSecret != null and theirSigSecret != ''"> and their_sig_secret = #{theirSigSecret}</if>
|
||||
<if test="ourOperatorSecret != null and ourOperatorSecret != ''"> and our_operator_secret = #{ourOperatorSecret}</if>
|
||||
<if test="ourDataSecret != null and ourDataSecret != ''"> and our_data_secret = #{ourDataSecret}</if>
|
||||
<if test="ourDataSecretIv != null and ourDataSecretIv != ''"> and our_data_secret_iv = #{ourDataSecretIv}</if>
|
||||
<if test="ourSigSecret != null and ourSigSecret != ''"> and our_sig_secret = #{ourSigSecret}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectThirdpartySecretInfoById" parameterType="Long" resultMap="ThirdpartySecretInfoResult">
|
||||
<include refid="selectThirdpartySecretInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertThirdpartySecretInfo" parameterType="ThirdpartySecretInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into thirdparty_secret_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="platformName != null">platform_name,</if>
|
||||
<if test="platformType != null">platform_type,</if>
|
||||
<if test="urlPrefix != null">url_prefix,</if>
|
||||
<if test="theirOperatorId != null">their_operator_id,</if>
|
||||
<if test="theirOperatorSecret != null">their_operator_secret,</if>
|
||||
<if test="theirDataSecret != null">their_data_secret,</if>
|
||||
<if test="theirDataSecretIv != null">their_data_secret_Iv,</if>
|
||||
<if test="theirSigSecret != null">their_sig_secret,</if>
|
||||
<if test="ourOperatorSecret != null">our_operator_secret,</if>
|
||||
<if test="ourDataSecret != null">our_data_secret,</if>
|
||||
<if test="ourDataSecretIv != null">our_data_secret_iv,</if>
|
||||
<if test="ourSigSecret != null">our_sig_secret,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="platformName != null">#{platformName},</if>
|
||||
<if test="platformType != null">#{platformType},</if>
|
||||
<if test="urlPrefix != null">#{urlPrefix},</if>
|
||||
<if test="theirOperatorId != null">#{theirOperatorId},</if>
|
||||
<if test="theirOperatorSecret != null">#{theirOperatorSecret},</if>
|
||||
<if test="theirDataSecret != null">#{theirDataSecret},</if>
|
||||
<if test="theirDataSecretIv != null">#{theirDataSecretIv},</if>
|
||||
<if test="theirSigSecret != null">#{theirSigSecret},</if>
|
||||
<if test="ourOperatorSecret != null">#{ourOperatorSecret},</if>
|
||||
<if test="ourDataSecret != null">#{ourDataSecret},</if>
|
||||
<if test="ourDataSecretIv != null">#{ourDataSecretIv},</if>
|
||||
<if test="ourSigSecret != null">#{ourSigSecret},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateThirdpartySecretInfo" parameterType="ThirdpartySecretInfo">
|
||||
update thirdparty_secret_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="platformName != null">platform_name = #{platformName},</if>
|
||||
<if test="platformType != null">platform_type = #{platformType},</if>
|
||||
<if test="urlPrefix != null">url_prefix = #{urlPrefix},</if>
|
||||
<if test="theirOperatorId != null">their_operator_id = #{theirOperatorId},</if>
|
||||
<if test="theirOperatorSecret != null">their_operator_secret = #{theirOperatorSecret},</if>
|
||||
<if test="theirDataSecret != null">their_data_secret = #{theirDataSecret},</if>
|
||||
<if test="theirDataSecretIv != null">their_data_secret_Iv = #{theirDataSecretIv},</if>
|
||||
<if test="theirSigSecret != null">their_sig_secret = #{theirSigSecret},</if>
|
||||
<if test="ourOperatorSecret != null">our_operator_secret = #{ourOperatorSecret},</if>
|
||||
<if test="ourDataSecret != null">our_data_secret = #{ourDataSecret},</if>
|
||||
<if test="ourDataSecretIv != null">our_data_secret_iv = #{ourDataSecretIv},</if>
|
||||
<if test="ourSigSecret != null">our_sig_secret = #{ourSigSecret},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteThirdpartySecretInfoById" parameterType="Long">
|
||||
delete from thirdparty_secret_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteThirdpartySecretInfoByIds" parameterType="String">
|
||||
delete from thirdparty_secret_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
44
jsowell-ui/src/api/thirdParty/secret.js
vendored
Normal file
44
jsowell-ui/src/api/thirdParty/secret.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询对接三方平台配置列表
|
||||
export function listSecret(query) {
|
||||
return request({
|
||||
url: '/thirdparty/secret/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询对接三方平台配置详细
|
||||
export function getSecret(id) {
|
||||
return request({
|
||||
url: '/thirdparty/secret/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增对接三方平台配置
|
||||
export function addSecret(data) {
|
||||
return request({
|
||||
url: '/thirdparty/secret',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改对接三方平台配置
|
||||
export function updateSecret(data) {
|
||||
return request({
|
||||
url: '/thirdparty/secret',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除对接三方平台配置
|
||||
export function delSecret(id) {
|
||||
return request({
|
||||
url: '/thirdparty/secret/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
384
jsowell-ui/src/views/thirdParty/secret/index.vue
vendored
Normal file
384
jsowell-ui/src/views/thirdParty/secret/index.vue
vendored
Normal file
@@ -0,0 +1,384 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="对接平台名称" prop="platformName">
|
||||
<el-input
|
||||
v-model="queryParams.platformName"
|
||||
placeholder="请输入对接平台名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="对接平台标识" prop="theirOperatorId">
|
||||
<el-input
|
||||
v-model="queryParams.theirOperatorId"
|
||||
placeholder="请输入对接平台标识"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!--<el-form-item label="对接平台生成的消息密钥" prop="theirDataSecret">
|
||||
<el-input
|
||||
v-model="queryParams.theirDataSecret"
|
||||
placeholder="请输入对接平台生成的消息密钥"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!--<el-form-item label="对接平台生成的初始化向量" prop="theirDataSecretIv">
|
||||
<el-input
|
||||
v-model="queryParams.theirDataSecretIv"
|
||||
placeholder="请输入对接平台生成的初始化向量"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!--<el-form-item label="对接平台生成的签名密钥" prop="theirSigSecret">
|
||||
<el-input
|
||||
v-model="queryParams.theirSigSecret"
|
||||
placeholder="请输入对接平台生成的签名密钥"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!--<el-form-item label="我方生成的唯一识别密钥" prop="ourOperatorSecret">
|
||||
<el-input
|
||||
v-model="queryParams.ourOperatorSecret"
|
||||
placeholder="请输入我方生成的唯一识别密钥"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!--<el-form-item label="我方生成的消息密钥" prop="ourDataSecret">
|
||||
<el-input
|
||||
v-model="queryParams.ourDataSecret"
|
||||
placeholder="请输入我方生成的消息密钥"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!--<el-form-item label="我方生成的初始化向量" prop="ourDataSecretIv">
|
||||
<el-input
|
||||
v-model="queryParams.ourDataSecretIv"
|
||||
placeholder="请输入我方生成的初始化向量"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<!--<el-form-item label="我方生成的签名密钥" prop="ourSigSecret">
|
||||
<el-input
|
||||
v-model="queryParams.ourSigSecret"
|
||||
placeholder="请输入我方生成的签名密钥"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['thirdparty:secret:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['thirdparty:secret:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['thirdparty:secret:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!--<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['thirdparty:secret:export']"
|
||||
>导出</el-button>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="secretList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!--<el-table-column label="主键" align="center" prop="id" />-->
|
||||
<el-table-column label="对接平台名称" align="center" prop="platformName" />
|
||||
<el-table-column label="对接平台类型" align="center" prop="platformType" />
|
||||
<el-table-column label="接口地址前缀" align="center" prop="urlPrefix" />
|
||||
<el-table-column label="对接平台标识" align="center" prop="theirOperatorId" />
|
||||
<!--<el-table-column label="对接平台生成的唯一识别密钥" align="center" prop="theirOperatorSecret" />
|
||||
<el-table-column label="对接平台生成的消息密钥" align="center" prop="theirDataSecret" />
|
||||
<el-table-column label="对接平台生成的初始化向量" align="center" prop="theirDataSecretIv" />
|
||||
<el-table-column label="对接平台生成的签名密钥" align="center" prop="theirSigSecret" />
|
||||
<el-table-column label="我方生成的唯一识别密钥" align="center" prop="ourOperatorSecret" />
|
||||
<el-table-column label="我方生成的消息密钥" align="center" prop="ourDataSecret" />
|
||||
<el-table-column label="我方生成的初始化向量" align="center" prop="ourDataSecretIv" />
|
||||
<el-table-column label="我方生成的签名密钥" align="center" prop="ourSigSecret" />-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['thirdparty:secret:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['thirdparty:secret:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改对接三方平台配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="200px">
|
||||
<el-form-item label="对接平台名称" prop="platformName">
|
||||
<el-input v-model="form.platformName" placeholder="请输入对接平台名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="接口地址前缀" prop="urlPrefix">
|
||||
<el-input v-model="form.urlPrefix" placeholder="请输入接口地址前缀" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对接平台标识" prop="theirOperatorId">
|
||||
<el-input v-model="form.theirOperatorId" placeholder="请输入对接平台标识" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对接平台生成的唯一识别密钥" prop="theirOperatorSecret">
|
||||
<el-input v-model="form.theirOperatorSecret" placeholder="请输入对接平台生成的唯一识别密钥" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对接平台生成的消息密钥" prop="theirDataSecret">
|
||||
<el-input v-model="form.theirDataSecret" placeholder="请输入对接平台生成的消息密钥" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对接平台生成的初始化向量" prop="theirDataSecretIv">
|
||||
<el-input v-model="form.theirDataSecretIv" placeholder="请输入对接平台生成的初始化向量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="对接平台生成的签名密钥" prop="theirSigSecret">
|
||||
<el-input v-model="form.theirSigSecret" placeholder="请输入对接平台生成的签名密钥" />
|
||||
</el-form-item>
|
||||
<el-form-item label="我方生成的唯一识别密钥" prop="ourOperatorSecret">
|
||||
<el-input v-model="form.ourOperatorSecret" placeholder="请输入我方生成的唯一识别密钥" />
|
||||
</el-form-item>
|
||||
<el-form-item label="我方生成的消息密钥" prop="ourDataSecret">
|
||||
<el-input v-model="form.ourDataSecret" placeholder="请输入我方生成的消息密钥" />
|
||||
</el-form-item>
|
||||
<el-form-item label="我方生成的初始化向量" prop="ourDataSecretIv">
|
||||
<el-input v-model="form.ourDataSecretIv" placeholder="请输入我方生成的初始化向量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="我方生成的签名密钥" prop="ourSigSecret">
|
||||
<el-input v-model="form.ourSigSecret" placeholder="请输入我方生成的签名密钥" />
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标识" prop="delFlag">
|
||||
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
import {addSecret, getSecret, listSecret, updateSecret} from "@/api/thirdParty/secret";
|
||||
|
||||
export default {
|
||||
name: "Secret",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 对接三方平台配置表格数据
|
||||
secretList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
platformName: null,
|
||||
platformType: null,
|
||||
urlPrefix: null,
|
||||
theirOperatorId: null,
|
||||
theirOperatorSecret: null,
|
||||
theirDataSecret: null,
|
||||
theirDataSecretIv: null,
|
||||
theirSigSecret: null,
|
||||
ourOperatorSecret: null,
|
||||
ourDataSecret: null,
|
||||
ourDataSecretIv: null,
|
||||
ourSigSecret: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询对接三方平台配置列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSecret(this.queryParams).then(response => {
|
||||
this.secretList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
platformName: null,
|
||||
platformType: null,
|
||||
urlPrefix: null,
|
||||
theirOperatorId: null,
|
||||
theirOperatorSecret: null,
|
||||
theirDataSecret: null,
|
||||
theirDataSecretIv: null,
|
||||
theirSigSecret: null,
|
||||
ourOperatorSecret: null,
|
||||
ourDataSecret: null,
|
||||
ourDataSecretIv: null,
|
||||
ourSigSecret: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
delFlag: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加对接三方平台配置";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getSecret(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改对接三方平台配置";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateSecret(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSecret(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除对接三方平台配置编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delSecret(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('thirdparty/secret/export', {
|
||||
...this.queryParams
|
||||
}, `secret_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user