mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-10 18:30:02 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -201,7 +201,8 @@ public class TempController extends BaseController {
|
|||||||
List<String> dateList = DateUtils.getAllDatesInTheDateRange(startTime, endTime);
|
List<String> dateList = DateUtils.getAllDatesInTheDateRange(startTime, endTime);
|
||||||
|
|
||||||
for (String tradeDate : dateList) {
|
for (String tradeDate : dateList) {
|
||||||
orderBasicInfoService.tempOrderSplittingOperations(dto.getMerchantId(), tradeDate);
|
// orderBasicInfoService.tempOrderSplittingOperations(dto.getMerchantId(), tradeDate);
|
||||||
|
orderBasicInfoService.orderSplittingOperations(dto.getMerchantId(), tradeDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
response = new RestApiResponse<>();
|
response = new RestApiResponse<>();
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public class MemberService {
|
|||||||
// throw new BusinessException(ReturnCodeEnum.CODE_GET_MERCHANT_ID_BY_APP_ID_ERROR);
|
// throw new BusinessException(ReturnCodeEnum.CODE_GET_MERCHANT_ID_BY_APP_ID_ERROR);
|
||||||
// }
|
// }
|
||||||
// 查询手机号码是否注册过
|
// 查询手机号码是否注册过
|
||||||
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(phoneNumber);
|
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(phoneNumber, merchantId);
|
||||||
if (Objects.isNull(memberBasicInfo)) {
|
if (Objects.isNull(memberBasicInfo)) {
|
||||||
// 不存在则新增数据
|
// 不存在则新增数据
|
||||||
String memberId = generateNewMemberId();
|
String memberId = generateNewMemberId();
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ public class PileService {
|
|||||||
|
|
||||||
|
|
||||||
// 通过前端传的手机号查询是否有此用户
|
// 通过前端传的手机号查询是否有此用户
|
||||||
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(dto.getPhoneNumber());
|
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(dto.getPhoneNumber(), dto.getMerchantId());
|
||||||
if (memberBasicInfo == null) {
|
if (memberBasicInfo == null) {
|
||||||
// 为空说明此用户未注册平台账号
|
// 为空说明此用户未注册平台账号
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_USER_IS_NOT_REGISTER);
|
throw new BusinessException(ReturnCodeEnum.CODE_USER_IS_NOT_REGISTER);
|
||||||
|
|||||||
@@ -44,6 +44,17 @@ public class PileMerchantInfoController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询一级运营商列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('pile:merchant:list')")
|
||||||
|
@GetMapping("queryFirstLevelMerchant")
|
||||||
|
public TableDataInfo queryFirstLevelMerchant() {
|
||||||
|
List<PileMerchantInfo> list = pileMerchantInfoService.queryFirstLevelMerchant();
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取运营商列表 不分页
|
* 获取运营商列表 不分页
|
||||||
* @param pileMerchantInfo
|
* @param pileMerchantInfo
|
||||||
|
|||||||
@@ -189,6 +189,24 @@ public class SpringBootTestController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ClearingWithdrawInfoService clearingWithdrawInfoService;
|
private ClearingWithdrawInfoService clearingWithdrawInfoService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreateConfirmReverse() throws BaseAdaPayException {
|
||||||
|
List<String> list = Lists.newArrayList();
|
||||||
|
list.add("0022120230803181514990533118848148987904");
|
||||||
|
list.add("0022120230803181514990533118849771606016");
|
||||||
|
list.add("0022120230803181514990533118851194695680");
|
||||||
|
list.add("0022120230803181515990533118852380536832");
|
||||||
|
list.add("0022120230803181515990533118853825003520");
|
||||||
|
list.add("0022120230803181515990533118855098966016");
|
||||||
|
list.add("0022120230803181516990533118856510251008");
|
||||||
|
list.add("0022120230803181516990533118858177568768");
|
||||||
|
list.add("0022120230803181517990533118859674951680");
|
||||||
|
list.add("0022120230803181517990533118861063364608");
|
||||||
|
for (String s : list) {
|
||||||
|
adapayMemberService.createConfirmReverse(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testClearingWithdraw() {
|
public void testClearingWithdraw() {
|
||||||
// 保存提现记录
|
// 保存提现记录
|
||||||
|
|||||||
@@ -563,4 +563,17 @@ public class AdapayMemberService {
|
|||||||
Map<String, Object> paymentResult = AdapayCommon.requestAdapay(balanceParam);
|
Map<String, Object> paymentResult = AdapayCommon.requestAdapay(balanceParam);
|
||||||
log.info("创建余额支付param:{}, result:{}", JSON.toJSONString(balanceParam), JSON.toJSONString(paymentResult));
|
log.info("创建余额支付param:{}, result:{}", JSON.toJSONString(balanceParam), JSON.toJSONString(paymentResult));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建支付确认撤销
|
||||||
|
*/
|
||||||
|
public void createConfirmReverse(String paymentConfirmId) throws BaseAdaPayException {
|
||||||
|
Map<String, Object> confirmReverseParams = Maps.newHashMap();
|
||||||
|
confirmReverseParams.put("adapay_func_code", "payments.confirm.reverse");
|
||||||
|
confirmReverseParams.put("payment_confirm_id", paymentConfirmId);
|
||||||
|
confirmReverseParams.put("reason", "支付确认撤销");
|
||||||
|
confirmReverseParams.put("order_no", IdUtils.fastSimpleUUID());
|
||||||
|
Map<String, Object> confirmReverseResult = AdapayCommon.requestAdapay(confirmReverseParams);
|
||||||
|
log.info("创建支付确认撤销param:{}, result:{}", JSON.toJSONString(confirmReverseParams), JSON.toJSONString(confirmReverseResult));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,16 @@ public class PileMerchantInfo extends BaseEntity {
|
|||||||
@Excel(name = "运营商名称")
|
@Excel(name = "运营商名称")
|
||||||
private String merchantName;
|
private String merchantName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商等级(1-一级运营商;2-二级运营商)
|
||||||
|
*/
|
||||||
|
private String merchantLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级运营商id
|
||||||
|
*/
|
||||||
|
private String parentId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 地址
|
* 地址
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.jsowell.pile.domain;
|
|||||||
|
|
||||||
import com.jsowell.common.annotation.Excel;
|
import com.jsowell.common.annotation.Excel;
|
||||||
import com.jsowell.common.core.domain.BaseEntity;
|
import com.jsowell.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
@@ -11,6 +13,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||||||
* @author jsowell
|
* @author jsowell
|
||||||
* @date 2023-04-19
|
* @date 2023-04-19
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
public class PileStationWhitelist extends BaseEntity {
|
public class PileStationWhitelist extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@@ -19,6 +23,12 @@ public class PileStationWhitelist extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商id
|
||||||
|
*/
|
||||||
|
@Excel(name = "运营商id")
|
||||||
|
private String merchantId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 站点id
|
* 站点id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -25,4 +25,6 @@ public class PileAuthCardDTO {
|
|||||||
private String phoneNumber;
|
private String phoneNumber;
|
||||||
|
|
||||||
private String verificationCode;
|
private String verificationCode;
|
||||||
|
|
||||||
|
private String merchantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,4 +34,6 @@ public class PileMemberBindingDTO {
|
|||||||
* 用户memberId
|
* 用户memberId
|
||||||
*/
|
*/
|
||||||
private String memberId;
|
private String memberId;
|
||||||
|
|
||||||
|
private String merchantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,4 +84,9 @@ public interface PileMerchantInfoMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PileMerchantInfo> queryInfoListByIds(@Param("deptIds") List<String> deptIds);
|
List<PileMerchantInfo> queryInfoListByIds(@Param("deptIds") List<String> deptIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询一级运营商
|
||||||
|
*/
|
||||||
|
List<PileMerchantInfo> queryFirstLevelMerchant();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public interface IMemberBasicInfoService {
|
|||||||
* @param mobileNumber 手机号
|
* @param mobileNumber 手机号
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
MemberBasicInfo selectInfoByMobileNumber(String mobileNumber);
|
// MemberBasicInfo selectInfoByMobileNumber(String mobileNumber);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据会员id查询会员信息
|
* 根据会员id查询会员信息
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
|
|||||||
import com.jsowell.pile.domain.AdapayMemberAccount;
|
import com.jsowell.pile.domain.AdapayMemberAccount;
|
||||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||||
import com.jsowell.pile.domain.OrderDetail;
|
import com.jsowell.pile.domain.OrderDetail;
|
||||||
|
import com.jsowell.pile.domain.SettleOrderReport;
|
||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
||||||
import com.jsowell.pile.vo.base.OrderAmountDetailVO;
|
import com.jsowell.pile.vo.base.OrderAmountDetailVO;
|
||||||
@@ -142,6 +143,8 @@ public interface IOrderBasicInfoService {
|
|||||||
|
|
||||||
List<OrderVO> getListByMemberIdAndOrderStatus(String memberId, List<String> orderStatusList, LocalDateTime dateTime, String stationId);
|
List<OrderVO> getListByMemberIdAndOrderStatus(String memberId, List<String> orderStatusList, LocalDateTime dateTime, String stationId);
|
||||||
|
|
||||||
|
void orderSplittingOperations(AdapayMemberAccount adapayMemberAccount, List<SettleOrderReport> stationReportList);
|
||||||
|
|
||||||
void orderSplittingOperations(String merchantId, String tradeDate);
|
void orderSplittingOperations(String merchantId, String tradeDate);
|
||||||
|
|
||||||
void tempOrderSplittingOperations(String merchantId, String tradeDate);
|
void tempOrderSplittingOperations(String merchantId, String tradeDate);
|
||||||
|
|||||||
@@ -85,4 +85,10 @@ public interface IPileMerchantInfoService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PileMerchantInfo> queryInfoListByIds(AuthorizedDeptVO authorizedMap);
|
List<PileMerchantInfo> queryInfoListByIds(AuthorizedDeptVO authorizedMap);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询一级运营商列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PileMerchantInfo> queryFirstLevelMerchant();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,10 +142,10 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
|||||||
return memberBasicInfoMapper.selectInfoByMobileNumberAndMerchantId(mobileNumber, merchantId);
|
return memberBasicInfoMapper.selectInfoByMobileNumberAndMerchantId(mobileNumber, merchantId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public MemberBasicInfo selectInfoByMobileNumber(String mobileNumber) {
|
// public MemberBasicInfo selectInfoByMobileNumber(String mobileNumber) {
|
||||||
return selectInfoByMobileNumber(mobileNumber, null);
|
// return selectInfoByMobileNumber(mobileNumber, null);
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MemberBasicInfo selectInfoByMemberId(String memberId) {
|
public MemberBasicInfo selectInfoByMemberId(String memberId) {
|
||||||
|
|||||||
@@ -873,22 +873,24 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
* 只有开通结算账户的运营商才走分账逻辑
|
* 只有开通结算账户的运营商才走分账逻辑
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void orderSplittingOperations(String merchantId, String tradeDate) {
|
public void orderSplittingOperations(AdapayMemberAccount adapayMemberAccount, List<SettleOrderReport> stationReportList) {
|
||||||
logger.info("运营商:{}, 交易日期:{}, 进行分账处理start", merchantId, tradeDate);
|
logger.info("运营商:{}, 交易日期:{}, 进行分账处理start", adapayMemberAccount, stationReportList);
|
||||||
|
|
||||||
// 查询运营商有没有开通结算账户
|
// 运营商有没有开通结算账户
|
||||||
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(merchantId);
|
|
||||||
if (adapayMemberAccount == null) {
|
if (adapayMemberAccount == null) {
|
||||||
logger.error("订单分账逻辑error, 运营商id:{}, 未配置结算账户", merchantId);
|
logger.error("订单分账逻辑error-运营商有没有开通结算账户");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollectionUtils.isEmpty(stationReportList)) {
|
||||||
|
logger.error("订单分账逻辑error-stationReportList为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据交易日期查询运营商下面所有站点的交易日报
|
|
||||||
List<SettleOrderReport> stationReportList = settleOrderReportService.selectByMerchantIdAndDate(merchantId, tradeDate);
|
|
||||||
for (SettleOrderReport orderReport : stationReportList) {
|
for (SettleOrderReport orderReport : stationReportList) {
|
||||||
String orderCodes = orderReport.getOrderCodes();
|
String orderCodes = orderReport.getOrderCodes();
|
||||||
if (StringUtils.isBlank(orderCodes)) {
|
if (StringUtils.isBlank(orderCodes)) {
|
||||||
logger.info("站点:{}, 日期:{}, 没有查到订单数据", orderReport.getStationId(), tradeDate);
|
logger.info("站点:{}, 日期:{}, 没有查到订单数据", orderReport.getStationId(), orderReport.getTradeDate());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
List<String> orderCodeList = Lists.newArrayList(StringUtils.split(orderCodes, ","));
|
List<String> orderCodeList = Lists.newArrayList(StringUtils.split(orderCodes, ","));
|
||||||
@@ -903,7 +905,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
String clearingBillCode = "CLE" + IdUtils.getOrderCode();
|
String clearingBillCode = "CLE" + IdUtils.getOrderCode();
|
||||||
clearingBillInfo.setClearingBillCode(clearingBillCode);
|
clearingBillInfo.setClearingBillCode(clearingBillCode);
|
||||||
clearingBillInfo.setClearingTime(DateUtils.getNowDate());
|
clearingBillInfo.setClearingTime(DateUtils.getNowDate());
|
||||||
clearingBillInfo.setMerchantId(merchantId);
|
clearingBillInfo.setMerchantId(orderReport.getMerchantId());
|
||||||
clearingBillInfo.setOrderSource("1");
|
clearingBillInfo.setOrderSource("1");
|
||||||
|
|
||||||
// 应收金额
|
// 应收金额
|
||||||
@@ -967,7 +969,20 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
dto.setBillDetailList(billDetailList);
|
dto.setBillDetailList(billDetailList);
|
||||||
transactionService.createClearingBill(dto);
|
transactionService.createClearingBill(dto);
|
||||||
}
|
}
|
||||||
logger.info("运营商:{}, 交易日期:{}, 进行分账处理end", merchantId, tradeDate);
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void orderSplittingOperations(String merchantId, String tradeDate) {
|
||||||
|
// 查询运营商有没有开通结算账户
|
||||||
|
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(merchantId);
|
||||||
|
if (adapayMemberAccount == null) {
|
||||||
|
logger.error("订单分账逻辑error, 运营商id:{}, 未配置结算账户", merchantId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据交易日期查询运营商下面所有站点的交易日报
|
||||||
|
List<SettleOrderReport> stationReportList = settleOrderReportService.selectByMerchantIdAndDate(merchantId, tradeDate);
|
||||||
|
orderSplittingOperations(adapayMemberAccount, stationReportList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,25 +1,23 @@
|
|||||||
package com.jsowell.pile.service.impl;
|
package com.jsowell.pile.service.impl;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
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.StringUtils;
|
import com.jsowell.common.util.StringUtils;
|
||||||
import com.jsowell.pile.domain.MemberBasicInfo;
|
import com.jsowell.pile.domain.MemberBasicInfo;
|
||||||
import com.jsowell.pile.dto.MemberRegisterAndLoginDTO;
|
import com.jsowell.pile.domain.PileAuthCard;
|
||||||
import com.jsowell.pile.dto.PileAuthCardDTO;
|
import com.jsowell.pile.dto.PileAuthCardDTO;
|
||||||
|
import com.jsowell.pile.mapper.PileAuthCardMapper;
|
||||||
import com.jsowell.pile.service.IMemberBasicInfoService;
|
import com.jsowell.pile.service.IMemberBasicInfoService;
|
||||||
|
import com.jsowell.pile.service.IPileAuthCardService;
|
||||||
import com.jsowell.pile.vo.uniapp.AuthCardVO;
|
import com.jsowell.pile.vo.uniapp.AuthCardVO;
|
||||||
import com.jsowell.pile.vo.web.PileAuthCardVO;
|
import com.jsowell.pile.vo.web.PileAuthCardVO;
|
||||||
import org.apache.commons.lang3.RandomStringUtils;
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.jsowell.pile.mapper.PileAuthCardMapper;
|
|
||||||
import com.jsowell.pile.domain.PileAuthCard;
|
import java.math.BigDecimal;
|
||||||
import com.jsowell.pile.service.IPileAuthCardService;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充电站鉴权卡Service业务层处理
|
* 充电站鉴权卡Service业务层处理
|
||||||
@@ -108,7 +106,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
|||||||
memberBasicInfo.setStatus("0"); // 0-待激活
|
memberBasicInfo.setStatus("0"); // 0-待激活
|
||||||
}else {
|
}else {
|
||||||
// 通过手机号查询memberId
|
// 通过手机号查询memberId
|
||||||
memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(dto.getPhoneNumber());
|
memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(dto.getPhoneNumber(), dto.getMerchantId());
|
||||||
if (memberBasicInfo == null) {
|
if (memberBasicInfo == null) {
|
||||||
// 为空则说明未查到该用户的注册信息
|
// 为空则说明未查到该用户的注册信息
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_USER_IS_NOT_REGISTER);
|
throw new BusinessException(ReturnCodeEnum.CODE_USER_IS_NOT_REGISTER);
|
||||||
@@ -139,7 +137,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
|||||||
@Override
|
@Override
|
||||||
public int updateCardInfo(PileAuthCardDTO dto) {
|
public int updateCardInfo(PileAuthCardDTO dto) {
|
||||||
// 通过手机号查询memberId
|
// 通过手机号查询memberId
|
||||||
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(dto.getPhoneNumber());
|
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(dto.getPhoneNumber(), dto.getMerchantId());
|
||||||
if (memberBasicInfo == null) {
|
if (memberBasicInfo == null) {
|
||||||
// 为空则说明未查到该用户的注册信息
|
// 为空则说明未查到该用户的注册信息
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_USER_IS_NOT_REGISTER);
|
throw new BusinessException(ReturnCodeEnum.CODE_USER_IS_NOT_REGISTER);
|
||||||
@@ -228,7 +226,7 @@ public class PileAuthCardServiceImpl implements IPileAuthCardService {
|
|||||||
public int bindAuthCard(PileAuthCardDTO dto) {
|
public int bindAuthCard(PileAuthCardDTO dto) {
|
||||||
String phoneNumber = dto.getPhoneNumber();
|
String phoneNumber = dto.getPhoneNumber();
|
||||||
// 判断此用户是否已注册小程序账号
|
// 判断此用户是否已注册小程序账号
|
||||||
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(phoneNumber);
|
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMobileNumber(phoneNumber, dto.getMerchantId());
|
||||||
if (memberBasicInfo == null) {
|
if (memberBasicInfo == null) {
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_USER_IS_NOT_REGISTER);
|
throw new BusinessException(ReturnCodeEnum.CODE_USER_IS_NOT_REGISTER);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -332,4 +332,13 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
|||||||
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
|
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询一级运营商列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PileMerchantInfo> queryFirstLevelMerchant() {
|
||||||
|
return pileMerchantInfoMapper.queryFirstLevelMerchant();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class PileStationWhitelistServiceImpl implements IPileStationWhitelistSer
|
|||||||
if (StringUtils.isBlank(pileStationWhitelist.getMobileNumber())) {
|
if (StringUtils.isBlank(pileStationWhitelist.getMobileNumber())) {
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||||
}
|
}
|
||||||
MemberBasicInfo memberInfo = memberBasicInfoService.selectInfoByMobileNumber(pileStationWhitelist.getMobileNumber());
|
MemberBasicInfo memberInfo = memberBasicInfoService.selectInfoByMobileNumber(pileStationWhitelist.getMobileNumber(), pileStationWhitelist.getMerchantId());
|
||||||
if (memberInfo == null) {
|
if (memberInfo == null) {
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_MEMBER_NOT_FOUND_ERROR);
|
throw new BusinessException(ReturnCodeEnum.CODE_MEMBER_NOT_FOUND_ERROR);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
<resultMap type="com.jsowell.pile.domain.PileMerchantInfo" id="PileMerchantInfoResult">
|
<resultMap type="com.jsowell.pile.domain.PileMerchantInfo" id="PileMerchantInfoResult">
|
||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
<result property="merchantName" column="merchant_name"/>
|
<result property="merchantName" column="merchant_name"/>
|
||||||
|
<result property="merchantLevel" column="merchant_level"/>
|
||||||
|
<result property="parentId" column="parent_id"/>
|
||||||
<result property="address" column="address"/>
|
<result property="address" column="address"/>
|
||||||
<result property="status" column="status"/>
|
<result property="status" column="status"/>
|
||||||
<result property="organizationCode" column="organization_code"/>
|
<result property="organizationCode" column="organization_code"/>
|
||||||
@@ -25,6 +27,8 @@
|
|||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id,
|
id,
|
||||||
merchant_name,
|
merchant_name,
|
||||||
|
merchant_level,
|
||||||
|
parent_id,
|
||||||
address,
|
address,
|
||||||
status,
|
status,
|
||||||
organization_code,
|
organization_code,
|
||||||
@@ -99,6 +103,12 @@
|
|||||||
<if test="merchantName != null">
|
<if test="merchantName != null">
|
||||||
merchant_name,
|
merchant_name,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="merchantLevel != null">
|
||||||
|
merchant_level,
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
parent_id,
|
||||||
|
</if>
|
||||||
<if test="address != null">
|
<if test="address != null">
|
||||||
address,
|
address,
|
||||||
</if>
|
</if>
|
||||||
@@ -149,6 +159,12 @@
|
|||||||
<if test="merchantName != null">
|
<if test="merchantName != null">
|
||||||
#{merchantName},
|
#{merchantName},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="merchantLevel != null">
|
||||||
|
#{merchantLevel},
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
#{parentId},
|
||||||
|
</if>
|
||||||
<if test="address != null">
|
<if test="address != null">
|
||||||
#{address},
|
#{address},
|
||||||
</if>
|
</if>
|
||||||
@@ -200,6 +216,12 @@
|
|||||||
<if test="merchantName != null">
|
<if test="merchantName != null">
|
||||||
merchant_name = #{merchantName},
|
merchant_name = #{merchantName},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="merchantLevel != null">
|
||||||
|
merchant_level = #{merchantLevel},
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
parent_id = #{parentId},
|
||||||
|
</if>
|
||||||
<if test="address != null">
|
<if test="address != null">
|
||||||
address = #{address},
|
address = #{address},
|
||||||
</if>
|
</if>
|
||||||
@@ -302,4 +324,13 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryFirstLevelMerchant" resultMap="PileMerchantInfoResult">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
from
|
||||||
|
pile_merchant_info
|
||||||
|
where del_flag = '0'
|
||||||
|
and merchant_level = '1'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
<resultMap type="com.jsowell.pile.domain.PileStationWhitelist" id="PileStationWhitelistResult">
|
<resultMap type="com.jsowell.pile.domain.PileStationWhitelist" id="PileStationWhitelistResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
|
<result property="merchantId" column="merchant_id" />
|
||||||
<result property="stationId" column="station_id" />
|
<result property="stationId" column="station_id" />
|
||||||
<result property="memberId" column="member_id" />
|
<result property="memberId" column="member_id" />
|
||||||
<result property="mobileNumber" column="mobile_number" />
|
<result property="mobileNumber" column="mobile_number" />
|
||||||
@@ -17,7 +18,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, station_id, member_id, mobile_number, create_time, create_by, update_time, update_by, del_flag
|
id, merchant_id, station_id, member_id, mobile_number, create_time, create_by, update_time, update_by, del_flag
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="selectPileStationWhitelistVo">
|
<sql id="selectPileStationWhitelistVo">
|
||||||
@@ -29,6 +30,7 @@
|
|||||||
<select id="selectPileStationWhitelistList" parameterType="com.jsowell.pile.domain.PileStationWhitelist" resultMap="PileStationWhitelistResult">
|
<select id="selectPileStationWhitelistList" parameterType="com.jsowell.pile.domain.PileStationWhitelist" resultMap="PileStationWhitelistResult">
|
||||||
<include refid="selectPileStationWhitelistVo"/>
|
<include refid="selectPileStationWhitelistVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="merchantId != null and merchantId != ''"> and merchant_id = #{merchantId}</if>
|
||||||
<if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
|
<if test="stationId != null and stationId != ''"> and station_id = #{stationId}</if>
|
||||||
<if test="memberId != null and memberId != ''"> and member_id = #{memberId}</if>
|
<if test="memberId != null and memberId != ''"> and member_id = #{memberId}</if>
|
||||||
<if test="mobileNumber != null and mobileNumber != ''"> and mobile_number = #{mobileNumber}</if>
|
<if test="mobileNumber != null and mobileNumber != ''"> and mobile_number = #{mobileNumber}</if>
|
||||||
@@ -44,6 +46,7 @@
|
|||||||
insert into pile_station_whitelist
|
insert into pile_station_whitelist
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">id,</if>
|
<if test="id != null">id,</if>
|
||||||
|
<if test="merchantId != null">merchant_id,</if>
|
||||||
<if test="stationId != null">station_id,</if>
|
<if test="stationId != null">station_id,</if>
|
||||||
<if test="memberId != null">member_id,</if>
|
<if test="memberId != null">member_id,</if>
|
||||||
<if test="mobileNumber != null">mobile_number,</if>
|
<if test="mobileNumber != null">mobile_number,</if>
|
||||||
@@ -55,6 +58,7 @@
|
|||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">#{id},</if>
|
<if test="id != null">#{id},</if>
|
||||||
|
<if test="merchantId != null">#{merchantId},</if>
|
||||||
<if test="stationId != null">#{stationId},</if>
|
<if test="stationId != null">#{stationId},</if>
|
||||||
<if test="memberId != null">#{memberId},</if>
|
<if test="memberId != null">#{memberId},</if>
|
||||||
<if test="mobileNumber != null">#{mobileNumber},</if>
|
<if test="mobileNumber != null">#{mobileNumber},</if>
|
||||||
@@ -69,6 +73,7 @@
|
|||||||
<update id="updatePileStationWhitelist" parameterType="com.jsowell.pile.domain.PileStationWhitelist">
|
<update id="updatePileStationWhitelist" parameterType="com.jsowell.pile.domain.PileStationWhitelist">
|
||||||
update pile_station_whitelist
|
update pile_station_whitelist
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="merchantId != null">merchant_id = #{merchantId},</if>
|
||||||
<if test="stationId != null">station_id = #{stationId},</if>
|
<if test="stationId != null">station_id = #{stationId},</if>
|
||||||
<if test="memberId != null">member_id = #{memberId},</if>
|
<if test="memberId != null">member_id = #{memberId},</if>
|
||||||
<if test="mobileNumber != null">mobile_number = #{mobileNumber},</if>
|
<if test="mobileNumber != null">mobile_number = #{mobileNumber},</if>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export function selectAdapayMember(data) {
|
|||||||
// 营收报表
|
// 营收报表
|
||||||
export function getMerchantOrderReport(data) {
|
export function getMerchantOrderReport(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pile/report/getMerchantOrderReport',
|
url: '/order/report/getMerchantOrderReport',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -125,10 +125,16 @@ export default {
|
|||||||
// let lnglat = [lng, lat];
|
// let lnglat = [lng, lat];
|
||||||
// console.log("经纬度", lnglat);
|
// console.log("经纬度", lnglat);
|
||||||
});
|
});
|
||||||
|
marker.on("click", (e) => {
|
||||||
|
let lat = e.lnglat.lat;
|
||||||
|
let lng = e.lnglat.lng;
|
||||||
|
this.getLngLatService(lat, lng);
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
select(e) {
|
select(e) {
|
||||||
this.placeSearch.search(e.poi.name); //关键字查询查询
|
this.placeSearch.search(e.poi.name); //关键字查询查询
|
||||||
|
|||||||
@@ -256,6 +256,32 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="运营商等级" prop="merchantLevel">
|
||||||
|
<el-select v-model="form.merchantLevel" placeholder="请选择运营商等级">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="上级运营商" prop="parentId">
|
||||||
|
<el-select v-model="form.parentId" placeholder="请选择上级运营商">
|
||||||
|
<el-option
|
||||||
|
v-for="item in merchantList"
|
||||||
|
:key="item.merchantName"
|
||||||
|
:label="item.merchantName"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-form-item label="公司logo" prop="logoUrl">
|
<el-form-item label="公司logo" prop="logoUrl">
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
@@ -361,6 +387,13 @@ export default {
|
|||||||
servicePhone: null,
|
servicePhone: null,
|
||||||
logoUrl: null,
|
logoUrl: null,
|
||||||
},
|
},
|
||||||
|
options: [{
|
||||||
|
value: '1',
|
||||||
|
label: '一级运营商'
|
||||||
|
}, {
|
||||||
|
value: '2',
|
||||||
|
label: '二级运营商'
|
||||||
|
}],
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
|
|||||||
Reference in New Issue
Block a user