This commit is contained in:
Lemon
2025-03-06 15:46:07 +08:00
11 changed files with 118 additions and 19 deletions

View File

@@ -6,22 +6,18 @@ import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.core.page.TableDataInfo; import com.jsowell.common.core.page.TableDataInfo;
import com.jsowell.common.enums.BusinessType; import com.jsowell.common.enums.BusinessType;
import com.jsowell.common.exception.BusinessException; import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.common.util.PageUtils; import com.jsowell.common.util.PageUtils;
import com.jsowell.common.util.poi.ExcelUtil; import com.jsowell.common.util.poi.ExcelUtil;
import com.jsowell.pile.domain.PileMerchantInfo; import com.jsowell.pile.domain.PileMerchantInfo;
import com.jsowell.pile.dto.CreateMerchantDTO; import com.jsowell.pile.dto.CreateMerchantDTO;
import com.jsowell.pile.dto.QueryMerchantInfoDTO; import com.jsowell.pile.dto.QueryMerchantInfoDTO;
import com.jsowell.pile.service.PileMerchantInfoService; import com.jsowell.pile.service.PileMerchantInfoService;
import com.jsowell.pile.util.UserUtils; import com.jsowell.pile.vo.web.MerchantWithdrawalTypeVO;
import com.jsowell.pile.vo.base.MerchantInfoVO;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@@ -140,4 +136,23 @@ public class PileMerchantInfoController extends BaseController {
PageUtils.startPage(pageNum, pageSize); PageUtils.startPage(pageNum, pageSize);
return getDataTable(pileMerchantInfoService.queryMerchantInfoListByAuth(dto)); return getDataTable(pileMerchantInfoService.queryMerchantInfoListByAuth(dto));
} }
/**
* 查询运营商配置的提现方式
*/
@PreAuthorize("@ss.hasPermi('pile:merchant:query')")
@PostMapping("/queryWithdrawalType")
public AjaxResult queryWithdrawalType(@RequestBody QueryMerchantInfoDTO dto) {
return AjaxResult.success(pileMerchantInfoService.queryWithdrawalType(dto));
}
/**
* 修改提现方式
*/
@PreAuthorize("@ss.hasPermi('pile:merchant:edit')")
@Log(title = "修改提现方式", businessType = BusinessType.UPDATE)
@PutMapping("/updateWithdrawalType")
public AjaxResult updateWithdrawalType(@RequestBody MerchantWithdrawalTypeVO dto) {
return toAjax(pileMerchantInfoService.updateWithdrawalType(dto));
}
} }

View File

@@ -0,0 +1,6 @@
package com.jsowell.pile.dto;
import com.jsowell.pile.vo.web.MerchantWithdrawalTypeVO;
public class MerchantWithdrawalTypeDTO extends MerchantWithdrawalTypeVO {
}

View File

@@ -5,6 +5,7 @@ import com.jsowell.pile.dto.CreateMerchantDTO;
import com.jsowell.pile.dto.QueryMerchantInfoDTO; import com.jsowell.pile.dto.QueryMerchantInfoDTO;
import com.jsowell.pile.vo.base.MerchantInfoVO; import com.jsowell.pile.vo.base.MerchantInfoVO;
import com.jsowell.pile.vo.web.MerchantSettleInfoVO; import com.jsowell.pile.vo.web.MerchantSettleInfoVO;
import com.jsowell.pile.vo.web.MerchantWithdrawalTypeVO;
import com.jsowell.pile.vo.web.PileMerchantInfoVO; import com.jsowell.pile.vo.web.PileMerchantInfoVO;
import java.util.List; import java.util.List;
@@ -187,4 +188,8 @@ public interface PileMerchantInfoService {
* @return * @return
*/ */
PileMerchantInfoVO queryMerchantInfoByStationId(String stationId); PileMerchantInfoVO queryMerchantInfoByStationId(String stationId);
MerchantWithdrawalTypeVO queryWithdrawalType(QueryMerchantInfoDTO dto);
int updateWithdrawalType(MerchantWithdrawalTypeVO dto);
} }

View File

@@ -8,10 +8,7 @@ import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
import com.jsowell.common.enums.adapay.AdapayPayChannelEnum; import com.jsowell.common.enums.adapay.AdapayPayChannelEnum;
import com.jsowell.common.enums.ykc.ReturnCodeEnum; import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException; import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.DateUtils; import com.jsowell.common.util.*;
import com.jsowell.common.util.DictUtils;
import com.jsowell.common.util.PageUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.spring.SpringUtils; import com.jsowell.common.util.spring.SpringUtils;
import com.jsowell.pile.domain.PileMerchantInfo; import com.jsowell.pile.domain.PileMerchantInfo;
import com.jsowell.pile.dto.CreateMerchantDTO; import com.jsowell.pile.dto.CreateMerchantDTO;
@@ -21,6 +18,7 @@ import com.jsowell.pile.service.PileMerchantInfoService;
import com.jsowell.pile.util.UserUtils; import com.jsowell.pile.util.UserUtils;
import com.jsowell.pile.vo.base.MerchantInfoVO; import com.jsowell.pile.vo.base.MerchantInfoVO;
import com.jsowell.pile.vo.web.MerchantSettleInfoVO; import com.jsowell.pile.vo.web.MerchantSettleInfoVO;
import com.jsowell.pile.vo.web.MerchantWithdrawalTypeVO;
import com.jsowell.pile.vo.web.PileMerchantInfoVO; import com.jsowell.pile.vo.web.PileMerchantInfoVO;
import com.jsowell.system.service.SysDeptService; import com.jsowell.system.service.SysDeptService;
import com.jsowell.system.service.SysUserService; import com.jsowell.system.service.SysUserService;
@@ -643,4 +641,33 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
return pileMerchantInfoMapper.queryMerchantInfoByStationId(stationId); return pileMerchantInfoMapper.queryMerchantInfoByStationId(stationId);
} }
@Override
public MerchantWithdrawalTypeVO queryWithdrawalType(QueryMerchantInfoDTO dto) {
PileMerchantInfo pileMerchantInfo = pileMerchantInfoMapper.selectPileMerchantInfoById(Long.parseLong(dto.getMerchantId()));
if (pileMerchantInfo != null) {
MerchantWithdrawalTypeVO merchantWithdrawalTypeVO = new MerchantWithdrawalTypeVO();
merchantWithdrawalTypeVO.setMerchantId(pileMerchantInfo.getId() + "");
merchantWithdrawalTypeVO.setWithdrawalType(pileMerchantInfo.getDelayMode());
merchantWithdrawalTypeVO.setReservedAmount(pileMerchantInfo.getReservedAmount());
return merchantWithdrawalTypeVO;
}
return null;
}
@Override
public int updateWithdrawalType(MerchantWithdrawalTypeVO dto) {
if (dto == null || StringUtils.isBlank(dto.getMerchantId()) || StringUtils.isBlank(dto.getWithdrawalType())) {
return 0;
}
PileMerchantInfo merchantInfo = new PileMerchantInfo();
merchantInfo.setId(Long.parseLong(dto.getMerchantId()));
merchantInfo.setWithdrawalType(dto.getWithdrawalType());
if (dto.getReservedAmount() != null) {
merchantInfo.setReservedAmount(dto.getReservedAmount());
}
merchantInfo.setUpdateBy(SecurityUtils.getUsername());
merchantInfo.setUpdateTime(DateUtils.getNowDate());
return pileMerchantInfoMapper.updatePileMerchantInfo(merchantInfo);
}
} }

View File

@@ -5,6 +5,8 @@ import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.math.BigDecimal;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@@ -50,4 +52,14 @@ public class MerchantInfoVO {
*/ */
private String adapayMemberId; private String adapayMemberId;
/**
* 提现类型(1-手动提现, 2-自动提现)
*/
private String withdrawalType;
/**
* 预留金额
*/
private BigDecimal reservedAmount;
} }

View File

@@ -0,0 +1,32 @@
package com.jsowell.pile.vo.web;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* 运营商提现类型VO
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class MerchantWithdrawalTypeVO {
/**
* 运营商ID
*/
private String merchantId;
/**
* 提现类型(1-手动提现, 2-自动提现)
*/
private String withdrawalType;
/**
* 预留金额
*/
private BigDecimal reservedAmount;
}

View File

@@ -1,11 +1,11 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 万车充运营管理平台 VUE_APP_TITLE = 万车充运营管理平台
# 开发环境配置 # pre环境配置
ENV = 'development' ENV = 'development'
# 万车充运营管理平台/开发环境 # 万车充运营管理平台/pre环境
VUE_APP_BASE_API = '/dev-api' VUE_APP_BASE_API = 'https://apitest.jsowellcloud.com'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@@ -1,8 +1,8 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 万车充运营管理平台 VUE_APP_TITLE = 万车充运营管理平台
# 生产环境配置 # 正式环境配置
ENV = 'production' ENV = 'production'
# 万车充运营管理平台/生产环境 # 万车充运营管理平台/正式环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = 'https://api.jsowellcloud.com'

View File

@@ -5,7 +5,7 @@ VUE_APP_TITLE = 万车充运营管理平台
ENV = 'staging' ENV = 'staging'
# 万车充运营管理平台/测试环境 # 万车充运营管理平台/测试环境
VUE_APP_BASE_API = '/dev-api' VUE_APP_BASE_API = 'http://192.168.2.21:8080'
# 开发环境配置 # 开发环境配置
NODE_ENV = production NODE_ENV = production

View File

@@ -3,7 +3,9 @@
"version": "1.0.0", "version": "1.0.0",
"description": "万车充管理系统", "description": "万车充管理系统",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve --mode production",
"pre": "vue-cli-service serve --mode development",
"test": "vue-cli-service serve --mode staging",
"build:prod": "vue-cli-service build", "build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview",

View File

@@ -35,12 +35,12 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://localhost:8080`, target: `http://localhost:8080`,
// 更改代理为本地地址 // 更改代理为本地地址
// target: `http://106.14.94.149:8080`, // target: `http://106.14.94.149:8080`,
// target: `http://192.168.2.21:8080`, // target: `http://192.168.2.21:8080`,
// target: `https://api.jsowellcloud.com`, // target: `https://api.jsowellcloud.com`,
target: `https://apitest.jsowellcloud.com`, // target: `https://apitest.jsowellcloud.com`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",