商家的账号注册登录接口,增加代理商的支持。
This commit is contained in:
parent
fa7c4b8c4c
commit
4e6927d2b9
@ -28,7 +28,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.util.Pair;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -234,9 +233,9 @@ public class LoginController extends BaseControllerImpl {
|
||||
return CommonResult.success(accountUserBaseService.doAppConnectLogin(bind_name, code));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "商家版注册与登录")
|
||||
@ApiOperation(value = "商家(代理商)注册与登录")
|
||||
@RequestMapping(value = "/doMerchSmsRegisterAndLogin", method = RequestMethod.POST)
|
||||
public CommonResult doMerchSmsRegisterAndLogin(HttpServletRequest request, @RequestBody JSONObject paramJSON) {
|
||||
public CommonResult doMerchSmsRegisterAndLogin(@RequestBody(required = false) JSONObject paramJSON) {
|
||||
if (paramJSON == null) {
|
||||
return CommonResult.failed("缺少必要参数!");
|
||||
}
|
||||
@ -256,8 +255,10 @@ public class LoginController extends BaseControllerImpl {
|
||||
|
||||
String cid = paramJSON.getStr("cid");
|
||||
String osType = paramJSON.getStr("os_type");
|
||||
// 用户类型:0-普通买家; 1-管理员;2-入驻商家;3-代理商;
|
||||
Integer userType = paramJSON.getInt("user_type");
|
||||
|
||||
return accountUserBaseService.doMerchSmsRegisterAndLogin(userMobile, randKey, verifyCode, cid, osType);
|
||||
return accountUserBaseService.doMerchSmsRegisterAndLogin(userMobile, randKey, verifyCode, userType, cid, osType);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "微信用户一键登录与注册")
|
||||
@ -288,9 +289,11 @@ public class LoginController extends BaseControllerImpl {
|
||||
@ApiOperation(value = "忘记密码-更改新密码")
|
||||
@RequestMapping(value = "/edit/forgetPassword", method = RequestMethod.POST)
|
||||
public CommonResult editForgetPassword(@RequestBody JSONObject paramJSON) {
|
||||
// TODO 这个方法肯定有问题,待修改
|
||||
return accountUserBaseService.doMerchSmsRegisterAndLogin(paramJSON.getStr("user_mobile"),
|
||||
paramJSON.getStr("rand_key"),
|
||||
paramJSON.getStr("verify_code"),
|
||||
paramJSON.getInt("user_type"),
|
||||
paramJSON.getStr("cid"), paramJSON.getStr("os_type"));
|
||||
}
|
||||
|
||||
|
||||
@ -142,11 +142,12 @@ public interface AccountUserBaseService extends IBaseService<AccountUserBase> {
|
||||
* @param user_mobile
|
||||
* @param rand_key 防机器人刷验证码
|
||||
* @param verify_code
|
||||
* @param userType 用户类型:0-普通买家; 1-管理员;2-入驻商家;3-代理商;
|
||||
* @param cid 推送 cid
|
||||
* @param osType 手机系统类型 :1-Android;2-iOS;3-微信小程序;
|
||||
* @return
|
||||
*/
|
||||
CommonResult doMerchSmsRegisterAndLogin(String user_mobile, String rand_key, String verify_code, String cid, String osType);
|
||||
CommonResult doMerchSmsRegisterAndLogin(String user_mobile, String rand_key, String verify_code, Integer userType, String cid, String osType);
|
||||
|
||||
/**
|
||||
* 微信小程序一键登录注册接口
|
||||
|
||||
@ -51,7 +51,6 @@ import com.suisung.mall.common.modules.distribution.ShopDistributionUserCommissi
|
||||
import com.suisung.mall.common.modules.pay.PayUserResource;
|
||||
import com.suisung.mall.common.modules.plantform.ShopPlantformSubsiteUser;
|
||||
import com.suisung.mall.common.modules.store.ShopStoreBase;
|
||||
import com.suisung.mall.common.modules.store.ShopStoreInfo;
|
||||
import com.suisung.mall.common.modules.store.ShopStoreMember;
|
||||
import com.suisung.mall.common.modules.store.ShopStoreMemberLevel;
|
||||
import com.suisung.mall.common.pojo.dto.SmsDto;
|
||||
@ -1682,8 +1681,8 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl<AccountUserBaseM
|
||||
String verifyCode = (String) userInfo.get("verify_code");
|
||||
String verify_token = (String) userInfo.get("verify_token");
|
||||
String rand_key = (String) userInfo.get("rand_key");
|
||||
Integer userIsAdmin = Convert.toInt(userInfo.getOrDefault("user_is_admin", CommonConstant.USER_TYPE_NORMAL)); // 用户类型:0-普通买家; 1-管理员;2-入驻商家;
|
||||
Integer userType = userIsAdmin; // 用户身份:0-普通买家; 1-管理员;2-入驻商家;
|
||||
Integer userIsAdmin = Convert.toInt(userInfo.getOrDefault("user_is_admin", CommonConstant.USER_TYPE_NORMAL)); // 用户类型:0-普通买家; 1-管理员;2-入驻商家;3-代理商;
|
||||
Integer userType = userIsAdmin; // 用户类型:0-普通买家; 1-管理员;2-入驻商家;3-代理商;
|
||||
String user_email = (String) userInfo.get("user_email");
|
||||
Integer bind_type = getParameter("bind_type", BindCode.MOBILE);
|
||||
|
||||
@ -2960,12 +2959,13 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl<AccountUserBaseM
|
||||
* @param user_mobile
|
||||
* @param rand_key 防机器人刷验证码
|
||||
* @param verify_code
|
||||
* @param userType 用户类型:0-普通买家; 1-管理员;2-入驻商家;3-代理商;
|
||||
* @param cid 推送 cid
|
||||
* @param osType 手机系统类型 :1-Android;2-iOS;3-微信小程序;
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public CommonResult doMerchSmsRegisterAndLogin(String user_mobile, String rand_key, String verify_code, String cid, String osType) {
|
||||
public CommonResult doMerchSmsRegisterAndLogin(String user_mobile, String rand_key, String verify_code, Integer userType, String cid, String osType) {
|
||||
// 流程:通过手机号检查是否有绑定关系?没有就直接注册,有就直接登录,返回登录后的所有信息,附加是否已经申请入驻标记?
|
||||
// 商家入驻账号,都是需要手机号绑定的。账号组成:1000000+(数字加法)自增ID,密码随机6位数
|
||||
if (StrUtil.isBlank(user_mobile) || StrUtil.isBlank(verify_code)) {
|
||||
@ -2986,7 +2986,7 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl<AccountUserBaseM
|
||||
|
||||
// rmk 为什么随机数和手机号一致?
|
||||
if (ObjectUtil.notEqual(user_mobile, rand_key)) {
|
||||
return CommonResult.failed(_("非法数据,或者提交超时,请刷新页面重新提交!"));
|
||||
return CommonResult.failed(_("非法数据,请刷新页面重新提交!"));
|
||||
}
|
||||
|
||||
String verifyMobile = PhoneNumberUtils.convZhPhoneNumber(user_mobile);
|
||||
@ -2996,9 +2996,11 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl<AccountUserBaseM
|
||||
return CommonResult.failed(_("验证码错误!"));
|
||||
}
|
||||
|
||||
userType = CheckUtil.isEmpty(userType) ? CommonConstant.USER_TYPE_MCH : userType;
|
||||
|
||||
// 找出手机对应的绑定用户
|
||||
// 是否为手机号注册,密码6位随机数
|
||||
return doMobileBindLogin(verifyMobile, CommonConstant.USER_TYPE_MCH, cid, osType);
|
||||
return doMobileBindLogin(verifyMobile, userType, cid, osType);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3275,7 +3277,7 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl<AccountUserBaseM
|
||||
*
|
||||
* @param user_mobile
|
||||
* @param regPwd 注册用途
|
||||
* @param userType
|
||||
* @param userType 用户类型:0-普通买家; 1-管理员;2-入驻商家;3-代理商;
|
||||
* @param cid
|
||||
* @param osType
|
||||
* @return
|
||||
@ -3294,6 +3296,7 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl<AccountUserBaseM
|
||||
AccountUserBindConnect bind_row = accountUserBindConnectService.getBindByBindId(user_mobile, BindCode.MOBILE, userType);
|
||||
AccountUserBase accountUserBase;
|
||||
if (bind_row != null) {
|
||||
|
||||
// 已经注册账号的,绑定了手机的情况,
|
||||
Integer user_id = bind_row.getUser_id();
|
||||
accountUserBase = get(user_id);
|
||||
@ -3306,7 +3309,7 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl<AccountUserBaseM
|
||||
Map<String, Object> userInfo = new HashMap<>();
|
||||
userInfo.put("user_account", user_mobile);
|
||||
userInfo.put("user_mobile", user_mobile);
|
||||
userInfo.put("user_is_admin", userType); // 商家入驻注册
|
||||
userInfo.put("user_is_admin", userType); // 商家或代理商入驻注册
|
||||
String user_password = regPwd;
|
||||
if (StrUtil.isBlank(user_password)) {
|
||||
// 随机数明文密码
|
||||
@ -3330,7 +3333,8 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl<AccountUserBaseM
|
||||
params.put("username", accountUserBase.getUser_account());
|
||||
params.put("password", "");
|
||||
params.put("user_mobile", user_mobile);
|
||||
params.put("is_merch", CommonConstant.Enable.toString()); // 是否为商家入驻 1-是;其他-否
|
||||
params.put("is_merch", CommonConstant.USER_TYPE_MCH.equals(userType) ? "1" : "2"); // 是否为商家入驻 1-是;其他-否
|
||||
params.put("is_agent", CommonConstant.USER_TYPE_AGENT.equals(userType) ? "1" : "2"); // 是否为代理商入驻 1-是;其他-否
|
||||
|
||||
if (StrUtil.isNotBlank(cid)) {
|
||||
params.put("cid", cid); // 个推客户端Id
|
||||
|
||||
@ -94,7 +94,7 @@ public class AdminAppMarketUpdateServiceImpl extends BaseServiceImpl<AdminAppMar
|
||||
QueryWrapper<AdminAppMarketUpdate> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("market_id", marketId).eq("status", CommonConstant.Enable).orderByDesc("version_key");
|
||||
|
||||
AdminAppMarketUpdate adminAppMarketUpdate = findOne(queryWrapper);
|
||||
AdminAppMarketUpdate adminAppMarketUpdate = getOne(queryWrapper, false);
|
||||
if (adminAppMarketUpdate == null) {
|
||||
return CommonResult.success(null, "没有找到最新版本");
|
||||
}
|
||||
@ -285,6 +285,6 @@ public class AdminAppMarketUpdateServiceImpl extends BaseServiceImpl<AdminAppMar
|
||||
queryWrapper.eq("market_id", marketId).eq("status", CommonConstant.Enable)
|
||||
.eq("package_name", packageName).orderByDesc("version_key");
|
||||
|
||||
return findOne(queryWrapper);
|
||||
return getOne(queryWrapper, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,8 +10,8 @@ import com.suisung.mall.common.exception.ApiException;
|
||||
import com.suisung.mall.common.exception.ApiUserException;
|
||||
import com.suisung.mall.common.modules.cms.CmsArticleComment;
|
||||
import com.suisung.mall.common.modules.cms.CmsArticleCommentHelpful;
|
||||
import com.suisung.mall.core.web.service.impl.BaseServiceImpl;
|
||||
import com.suisung.mall.common.utils.I18nUtil;
|
||||
import com.suisung.mall.core.web.service.impl.BaseServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -48,13 +48,13 @@ public class CmsArticleCommentHelpfulServiceImpl extends BaseServiceImpl<CmsArti
|
||||
queryWrapper.eq("user_id", user.getId());
|
||||
queryWrapper.eq("article_id", cmsArticleCommentHelpful.getArticle_id());
|
||||
|
||||
CmsArticleCommentHelpful dbArticleCommentHelpful = findOne(queryWrapper);
|
||||
CmsArticleCommentHelpful dbArticleCommentHelpful = getOne(queryWrapper, false);
|
||||
|
||||
QueryWrapper<CmsArticleComment> commentQueryWrapper = new QueryWrapper<>();
|
||||
commentQueryWrapper.eq("comment_id", cmsArticleCommentHelpful.getComment_id());
|
||||
commentQueryWrapper.eq("article_id", cmsArticleCommentHelpful.getArticle_id());
|
||||
commentQueryWrapper.eq("user_id", user.getId());
|
||||
CmsArticleComment dbArticleComment = cmsArticleCommentService.findOne(commentQueryWrapper);
|
||||
CmsArticleComment dbArticleComment = cmsArticleCommentService.getOne(commentQueryWrapper, false);
|
||||
|
||||
if (null == dbArticleCommentHelpful) {
|
||||
cmsArticleCommentHelpful.setUser_id(user.getId());
|
||||
|
||||
@ -20,11 +20,12 @@ public class CommonConstant {
|
||||
public static final Integer Delivery_Amount_Comput_Type_Payment = 3;
|
||||
|
||||
/**
|
||||
* 用户类型:0-普通用户;1-管理员;2-入驻商户
|
||||
* 用户类型:0-普通买家; 1-管理员;2-入驻商家;3-代理商;
|
||||
*/
|
||||
public static final Integer USER_TYPE_NORMAL = 0;
|
||||
public static final Integer USER_TYPE_ADMIN = 1;
|
||||
public static final Integer USER_TYPE_MCH = 2;
|
||||
public static final Integer USER_TYPE_AGENT = 3;
|
||||
|
||||
// 国际电话区号
|
||||
public static final String IDD_ZH_CN = "+86"; //中国
|
||||
|
||||
@ -264,7 +264,7 @@ public class IndexController extends BaseControllerImpl {
|
||||
QueryWrapper<PayConsumeTrade> tradeQueryWrapper = new QueryWrapper<>();
|
||||
tradeQueryWrapper.eq("order_id", order_id);
|
||||
tradeQueryWrapper.eq("buyer_id", userDto.getId());
|
||||
PayConsumeTrade payConsumeTrade = payConsumeTradeService.findOne(tradeQueryWrapper);
|
||||
PayConsumeTrade payConsumeTrade = payConsumeTradeService.getOne(tradeQueryWrapper, false);
|
||||
Integer trade_is_paid = payConsumeTrade.getTrade_is_paid();
|
||||
if (trade_is_paid.equals(StateCode.ORDER_PAID_STATE_YES)) {
|
||||
return CommonResult.success("订单已支付");
|
||||
|
||||
@ -229,7 +229,7 @@ public class PayConsumeDepositServiceImpl extends BaseServiceImpl<PayConsumeDepo
|
||||
}
|
||||
|
||||
// 读取最新记录
|
||||
deposit_row = findOne(deposit_column_row);
|
||||
deposit_row = getOne(deposit_column_row, false);
|
||||
|
||||
// 待走流程
|
||||
if (deposit_row != null) {
|
||||
|
||||
@ -1261,7 +1261,7 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
|
||||
// 不可以联合支付。
|
||||
QueryWrapper<PayConsumeTrade> tradeQueryWrapper = new QueryWrapper<>();
|
||||
tradeQueryWrapper.eq("order_id", order_id);
|
||||
PayConsumeTrade trade_row_tmp = payConsumeTradeService.findOne(tradeQueryWrapper);
|
||||
PayConsumeTrade trade_row_tmp = payConsumeTradeService.getOne(tradeQueryWrapper, false);
|
||||
|
||||
// 固定死, 是门店收银还是店铺收银。, 统一店铺收银
|
||||
if (true) {
|
||||
@ -1296,7 +1296,7 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
|
||||
logger.info(String.format(I18nUtil._("支付回调验签结果:verifyResult【%s】"), verifyResult));
|
||||
QueryWrapper<PayPaymentChannel> channelQueryWrapper = new QueryWrapper<>();
|
||||
channelQueryWrapper.eq("payment_channel_code", payment_channel_code);
|
||||
PayPaymentChannel payPaymentChannel = payPaymentChannelService.findOne(channelQueryWrapper);
|
||||
PayPaymentChannel payPaymentChannel = payPaymentChannelService.getOne(channelQueryWrapper, false);
|
||||
Integer payment_channel_id = payPaymentChannel.getPayment_channel_id();
|
||||
|
||||
// 插入充值记录
|
||||
@ -1416,7 +1416,7 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
|
||||
logger.debug("[拉卡拉支付通知] 查询交易信息: orderId={}", orderId);
|
||||
QueryWrapper<PayConsumeTrade> tradeQueryWrapper = new QueryWrapper<>();
|
||||
tradeQueryWrapper.eq("order_id", orderId);
|
||||
PayConsumeTrade trade_row_tmp = payConsumeTradeService.findOne(tradeQueryWrapper);
|
||||
PayConsumeTrade trade_row_tmp = payConsumeTradeService.getOne(tradeQueryWrapper, false);
|
||||
|
||||
Integer payment_store_id = trade_row_tmp != null ? trade_row_tmp.getStore_id() : 0;
|
||||
String orderSubject = trade_row_tmp != null ? trade_row_tmp.getTrade_title() : "";
|
||||
@ -1437,7 +1437,7 @@ public class PayUserPayServiceImpl extends BaseServiceImpl<PayUserPayMapper, Pay
|
||||
logger.debug("[拉卡拉支付通知] 查询支付渠道: channelCode=lakala");
|
||||
QueryWrapper<PayPaymentChannel> channelQueryWrapper = new QueryWrapper<>();
|
||||
channelQueryWrapper.eq("payment_channel_code", "lakala");
|
||||
PayPaymentChannel payPaymentChannel = payPaymentChannelService.findOne(channelQueryWrapper);
|
||||
PayPaymentChannel payPaymentChannel = payPaymentChannelService.getOne(channelQueryWrapper, false);
|
||||
|
||||
if (payPaymentChannel == null) {
|
||||
logger.error("[拉卡拉支付通知] 支付渠道不存在: channelCode=lakala");
|
||||
|
||||
@ -251,7 +251,7 @@ public class KdApiExpressSearchServiceImpl implements KdApiExpressSearchService
|
||||
queryWrapper.eq("order_id", orderId);
|
||||
queryWrapper.eq("logistics_enable", CommonConstant.Enable);
|
||||
|
||||
ShopOrderLogistics shopOrderLogistic = shopOrderLogisticsService.findOne(queryWrapper);
|
||||
ShopOrderLogistics shopOrderLogistic = shopOrderLogisticsService.getOne(queryWrapper, false);
|
||||
if (ObjectUtil.isEmpty(shopOrderLogistic)) {
|
||||
logger.warn(I18nUtil._("未找到发货记录"));
|
||||
return null;
|
||||
@ -313,7 +313,7 @@ public class KdApiExpressSearchServiceImpl implements KdApiExpressSearchService
|
||||
public CommonResult returnLogistics(String return_tracking_name, String return_tracking_number, String order_id) {
|
||||
QueryWrapper<ShopBaseExpress> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("express_name", return_tracking_name);
|
||||
ShopBaseExpress shopBaseExpress = shopBaseExpressService.findOne(wrapper);
|
||||
ShopBaseExpress shopBaseExpress = shopBaseExpressService.getOne(wrapper, false);
|
||||
if (shopBaseExpress == null) {
|
||||
throw new ApiException(I18nUtil._("系统中未配置该物流信息,请检查发货信息是否正确!"));
|
||||
}
|
||||
@ -331,7 +331,7 @@ public class KdApiExpressSearchServiceImpl implements KdApiExpressSearchService
|
||||
QueryWrapper<ShopOrderReturn> orderReturnQueryWrapper = new QueryWrapper<>();
|
||||
orderReturnQueryWrapper.eq("return_tracking_number", return_tracking_number);
|
||||
orderReturnQueryWrapper.eq("return_tracking_name", return_tracking_name);
|
||||
ShopOrderReturn orderReturn = shopOrderReturnService.findOne(orderReturnQueryWrapper);
|
||||
ShopOrderReturn orderReturn = shopOrderReturnService.getOne(orderReturnQueryWrapper, false);
|
||||
|
||||
if (orderReturn == null) {
|
||||
throw new ApiException(I18nUtil._("退款退货信息不存在!"));
|
||||
|
||||
@ -30,14 +30,12 @@ import java.util.Map;
|
||||
@Service
|
||||
public class ShopBaseCurrencyServiceImpl extends BaseServiceImpl<ShopBaseCurrencyMapper, ShopBaseCurrency> implements ShopBaseCurrencyService {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(ShopBaseCurrencyServiceImpl.class);
|
||||
@Autowired
|
||||
private AccountBaseConfigService accountBaseConfigService;
|
||||
|
||||
@Autowired
|
||||
private HttpServletRequest servletRequest;
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(ShopBaseCurrencyServiceImpl.class);
|
||||
|
||||
/**
|
||||
* 获取当前汇率
|
||||
*/
|
||||
@ -62,7 +60,7 @@ public class ShopBaseCurrencyServiceImpl extends BaseServiceImpl<ShopBaseCurrenc
|
||||
} else {
|
||||
QueryWrapper<ShopBaseCurrency> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("currency_is_default", 1);
|
||||
user_currency_row = findOne(queryWrapper);
|
||||
user_currency_row = getOne(queryWrapper, false);
|
||||
}
|
||||
if (user_currency_row != null) {
|
||||
currency_exchange_rate = user_currency_row.getCurrency_exchange_rate();
|
||||
@ -94,7 +92,7 @@ public class ShopBaseCurrencyServiceImpl extends BaseServiceImpl<ShopBaseCurrenc
|
||||
} else {
|
||||
QueryWrapper<ShopBaseCurrency> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("currency_is_default", 1);
|
||||
user_currency_row = findOne(queryWrapper);
|
||||
user_currency_row = getOne(queryWrapper, false);
|
||||
}
|
||||
|
||||
if (user_currency_row != null) {
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
package com.suisung.mall.shop.esign.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.suisung.mall.common.constant.CommonConstant;
|
||||
@ -83,8 +84,8 @@ public class EsignPlatformInfoServiceImpl extends BaseServiceImpl<EsignPlatformI
|
||||
.eq("status", CommonConstant.Enable)
|
||||
.orderByAsc("id");
|
||||
|
||||
EsignPlatformInfo esignPlatformInfo = findOne(queryWrapper);
|
||||
if (esignPlatformInfo == null || esignPlatformInfo.getId() == null || esignPlatformInfo.getId() <= 0) {
|
||||
EsignPlatformInfo esignPlatformInfo = getOne(queryWrapper, false);
|
||||
if (ObjectUtil.isEmpty(esignPlatformInfo)) {
|
||||
log.error("[获取平台和代理商信息] 未找到有效的平台方记录");
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@ -108,14 +109,13 @@ public class EsignPlatformInfoServiceImpl extends BaseServiceImpl<EsignPlatformI
|
||||
return esignPlatformInfos;
|
||||
}
|
||||
|
||||
|
||||
// 获取县级代理商的省级代理商
|
||||
queryWrapper.clear();
|
||||
queryWrapper.eq("id", agent2nd.getParent_id())
|
||||
.eq("level", CommonConstant.Agent_Level_1st)
|
||||
.gt("split_ratio", 0)
|
||||
.eq("status", CommonConstant.Enable);
|
||||
EsignPlatformInfo agent1st = findOne(queryWrapper);
|
||||
EsignPlatformInfo agent1st = getOne(queryWrapper, false);
|
||||
if (agent1st != null) {
|
||||
esignPlatformInfos.add(agent1st);
|
||||
log.debug("[获取平台和代理商信息] 成功获取一级代理信息,ID: {}", agent1st.getId());
|
||||
@ -149,7 +149,7 @@ public class EsignPlatformInfoServiceImpl extends BaseServiceImpl<EsignPlatformI
|
||||
queryWrapper.eq("license_number", licenseNumber);
|
||||
}
|
||||
|
||||
return findOne(queryWrapper);
|
||||
return getOne(queryWrapper, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -185,7 +185,7 @@ public class EsignPlatformInfoServiceImpl extends BaseServiceImpl<EsignPlatformI
|
||||
.eq("status", CommonConstant.Enable)
|
||||
.select("telephone", "license_number", "legal_person_mobile");
|
||||
|
||||
EsignPlatformInfo esignPlatformInfo = findOne(queryWrapper);
|
||||
EsignPlatformInfo esignPlatformInfo = getOne(queryWrapper, false);
|
||||
if (esignPlatformInfo == null) {
|
||||
log.warn("[获取平台方信息] 未找到有效的平台方记录");
|
||||
return null;
|
||||
@ -253,7 +253,7 @@ public class EsignPlatformInfoServiceImpl extends BaseServiceImpl<EsignPlatformI
|
||||
// 优先使用指定的分销商ID查询,否则使用区域信息查询
|
||||
if (shopMchEntry.getDistributor_id() != null && shopMchEntry.getDistributor_id() > 0) {
|
||||
queryWrapper.eq("id", shopMchEntry.getDistributor_id());
|
||||
result = findOne(queryWrapper);
|
||||
result = getOne(queryWrapper, false);
|
||||
|
||||
log.debug("[获取二级代理] 使用指定分销商ID查询,distributorId={}", shopMchEntry.getDistributor_id());
|
||||
|
||||
@ -264,7 +264,7 @@ public class EsignPlatformInfoServiceImpl extends BaseServiceImpl<EsignPlatformI
|
||||
queryWrapper.eq("license_district_id", shopMchEntry.getStore_district())
|
||||
.gt("shipping_fee", 0).ne("supplier_id", "")
|
||||
.orderByAsc("id");
|
||||
result = findOne(queryWrapper);
|
||||
result = getOne(queryWrapper, false);
|
||||
|
||||
log.debug("[获取二级代理] 使用区域信息查询,districtId={}", shopMchEntry.getStore_district());
|
||||
|
||||
|
||||
@ -76,12 +76,10 @@ public class LklLedgerReceiverServiceImpl extends BaseServiceImpl<LklLedgerRecei
|
||||
}
|
||||
queryWrapper.eq("platform_id", platformId).eq("status", CommonConstant.Enable);
|
||||
|
||||
List<LklLedgerReceiver> existsRecordList = list(queryWrapper);
|
||||
if (CollectionUtil.isNotEmpty(existsRecordList)
|
||||
&& existsRecordList.get(0) != null
|
||||
&& existsRecordList.get(0).getId() > 0) {
|
||||
LklLedgerReceiver existsRecord = getOne(queryWrapper, false);
|
||||
if (ObjectUtil.isNotEmpty(existsRecord)) {
|
||||
// 更新记录
|
||||
record.setId(existsRecordList.get(0).getId());
|
||||
record.setId(existsRecord.getId());
|
||||
return updateById(record);
|
||||
}
|
||||
|
||||
@ -147,7 +145,6 @@ public class LklLedgerReceiverServiceImpl extends BaseServiceImpl<LklLedgerRecei
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
JSONArray reqParams = new JSONArray();
|
||||
for (EsignPlatformInfo esignPlatformInfo : esignPlatformInfoList) {
|
||||
JSONObject reqParam = new JSONObject();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user