Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -637,7 +637,7 @@ public class TbOrderInfoServiceImpl implements TbOrderInfoService {
|
|||||||
flow.setBizName("会员储值卡退款");
|
flow.setBizName("会员储值卡退款");
|
||||||
flow.setType("+");
|
flow.setType("+");
|
||||||
flow.setAmount(returnAmount);
|
flow.setAmount(returnAmount);
|
||||||
flow.setBalance(user.getAmount());
|
flow.setBalance(user.getAmount().add(returnAmount));
|
||||||
flow.setCreateTime(cn.hutool.core.date.DateUtil.date().toTimestamp());
|
flow.setCreateTime(cn.hutool.core.date.DateUtil.date().toTimestamp());
|
||||||
flow.setIsReturn("0");
|
flow.setIsReturn("0");
|
||||||
tbShopUserFlowMapper.insert(flow);
|
tbShopUserFlowMapper.insert(flow);
|
||||||
|
|||||||
@@ -49,9 +49,9 @@ import java.time.Instant;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @author lyf
|
||||||
* @website https://eladmin.vip
|
* @website https://eladmin.vip
|
||||||
* @description 服务实现
|
* @description 服务实现
|
||||||
* @author lyf
|
|
||||||
* @date 2023-11-07
|
* @date 2023-11-07
|
||||||
**/
|
**/
|
||||||
@Service
|
@Service
|
||||||
@@ -86,9 +86,11 @@ public class TbShopInfoServiceImpl implements TbShopInfoService {
|
|||||||
public JSONObject binding(BindingDto bindingDto) {
|
public JSONObject binding(BindingDto bindingDto) {
|
||||||
TbShopInfo tbShopInfo = tbShopInfoRepository.findById(bindingDto.getShopId()).orElseGet(null);
|
TbShopInfo tbShopInfo = tbShopInfoRepository.findById(bindingDto.getShopId()).orElseGet(null);
|
||||||
TbMerchantAccount account = merchantAccountRepository.findByAccount(tbShopInfo.getAccount());
|
TbMerchantAccount account = merchantAccountRepository.findByAccount(tbShopInfo.getAccount());
|
||||||
|
boolean isNew = true;
|
||||||
if (org.apache.commons.lang3.StringUtils.isBlank(bindingDto.getAccount())) {
|
if (org.apache.commons.lang3.StringUtils.isBlank(bindingDto.getAccount())) {
|
||||||
if (tbShopInfo != null) {
|
if (tbShopInfo != null) {
|
||||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(account.getBindAccount())) {
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(account.getBindAccount())) {
|
||||||
|
isNew = false;
|
||||||
bindingDto.setAccount(account.getBindAccount());
|
bindingDto.setAccount(account.getBindAccount());
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
@@ -98,7 +100,7 @@ public class TbShopInfoServiceImpl implements TbShopInfoService {
|
|||||||
Map<String, Object> param = new HashMap<>();
|
Map<String, Object> param = new HashMap<>();
|
||||||
param.put("account", bindingDto.getAccount());
|
param.put("account", bindingDto.getAccount());
|
||||||
JSONObject data = bindService.binding(param);
|
JSONObject data = bindService.binding(param);
|
||||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(bindingDto.getAccount())) {
|
if (isNew) {
|
||||||
account.setBindAccount(bindingDto.getAccount());
|
account.setBindAccount(bindingDto.getAccount());
|
||||||
account.setArticle(bindingDto.getArticle());
|
account.setArticle(bindingDto.getArticle());
|
||||||
account.setTaxAmount(bindingDto.getTaxAmount());
|
account.setTaxAmount(bindingDto.getTaxAmount());
|
||||||
|
|||||||
Reference in New Issue
Block a user