winter 1 год назад
Родитель
Сommit
87095406be
8 измененных файлов: 14 добавлений и 13 удалений
  1. +5
    -4
      mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/WxMerchantMapper.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/service/WxMerchantService.java
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java
  5. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBusinessCircleOrderServiceImpl.java
  6. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java
  7. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java
  8. +1
    -1
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml

+ 5
- 4
mallinkCallback/src/main/java/com/iformall/controller/callback/AliPayController.java Просмотреть файл

@@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@@ -205,8 +206,8 @@ public class AliPayController extends BaseController {
* https://opendocs.alipay.com/pre-apis/00fi1b
* @throws Exception 可能产生的任何异常
*/
@RequestMapping(value = "/notify")
public String __Notify(@RequestParam Map<String, Object> paramMap) throws Exception {
@RequestMapping(value = "/notify/{tenantId}")
public String __Notify(@PathVariable String tenantId,@RequestParam Map<String, Object> paramMap) throws Exception {

String msgMethod = (String) paramMap.get("msg_method");
String notifyId = (String) paramMap.get("notify_id");
@@ -255,7 +256,7 @@ public class AliPayController extends BaseController {
String mallName = jo.getString("mall_name");

// WxMerchant merchant = wxMerchantService.getById(Long.parseLong(mallStoreId));
WxMerchant merchant = wxMerchantService.getMerchantByEncode(mallStoreId);
WxMerchant merchant = wxMerchantService.getMerchantByEncode(tenantId,mallStoreId);
if(merchant == null){
logger.error("alipay notify . 找不到门店:"+paramMap);
return "fail";
@@ -301,7 +302,7 @@ public class AliPayController extends BaseController {
String mallName = jo.getString("mall_name");

// WxMerchant merchant = wxMerchantService.getById(Long.parseLong(mallStoreId));
WxMerchant merchant = wxMerchantService.getMerchantByEncode(mallStoreId);
WxMerchant merchant = wxMerchantService.getMerchantByEncode(tenantId,mallStoreId);
if(merchant == null){
logger.error("alipay notify . 找不到门店:"+paramMap);
return "fail";


+ 1
- 1
mallinkService/src/main/java/com/iformall/mapper/WxMerchantMapper.java Просмотреть файл

@@ -46,7 +46,7 @@ public interface WxMerchantMapper extends CommonMapper<WxMerchant, Long> {
void reSetCashCount(WxMerchant record);

WxMerchant getMerchantByEncode(@Param("encode")String encode);
WxMerchant getMerchantByEncode(@Param("tenantId")String tenantId,@Param("encode")String encode);

int recordedAmount(WxMerchant record);



+ 1
- 1
mallinkService/src/main/java/com/iformall/service/WxMerchantService.java Просмотреть файл

@@ -169,7 +169,7 @@ public interface WxMerchantService {
boolean hasMerchantBrand(WxMerchant wxMerchant);
boolean hasMerchantIsAdmin(WxMerchant wxMerchant);

WxMerchant getMerchantByEncode(String encode);
WxMerchant getMerchantByEncode(String tenantId,String encode);

Optional<WxMerchant> findByName(String name);



+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java Просмотреть файл

@@ -134,7 +134,7 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder
record.setUpdateTime(now);

if(wxMerchant == null && StringUtils.isNotBlank(record.getMallStoreId())){
wxMerchant = wxMerchantService.getMerchantByEncode(record.getMallStoreId());
wxMerchant = wxMerchantService.getMerchantByEncode(record.getTenantId(),record.getMallStoreId());
}
if(wxMerchant != null){
record.setMerchantId(wxMerchant.getId());


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBusinessCircleOrderServiceImpl.java Просмотреть файл

@@ -162,7 +162,7 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe

//TODO 第三方获取门店(标识可能发生变化)
// WxMerchant wxMerchant = wxMerchantService.getById(Long.parseLong(record.getWxShopNumber()));
WxMerchant wxMerchant = wxMerchantService.getMerchantByEncode(record.getWxShopNumber());
WxMerchant wxMerchant = wxMerchantService.getMerchantByEncode(record.getTenantId(),record.getWxShopNumber());
if (wxMerchant != null) {
record.setMerchantId(wxMerchant.getId());
record.setMerchantName(wxMerchant.getName());


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Просмотреть файл

@@ -1143,8 +1143,8 @@ public class WxMerchantServiceImpl implements WxMerchantService {
}

@Override
public WxMerchant getMerchantByEncode(String encode){
return wxMerchantMapper.getMerchantByEncode(encode);
public WxMerchant getMerchantByEncode(String tenantId,String encode){
return wxMerchantMapper.getMerchantByEncode(tenantId,encode);
}

@Override


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java Просмотреть файл

@@ -138,7 +138,7 @@ public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService

//TODO 第三方获取门店(标识可能发生变化)
// WxMerchant wxMerchant = wxMerchantService.getById(Long.parseLong(record.getShopNumber()));
WxMerchant wxMerchant = wxMerchantService.getMerchantByEncode(record.getShopNumber());
WxMerchant wxMerchant = wxMerchantService.getMerchantByEncode(record.getTenantId(),record.getShopNumber());
if(wxMerchant != null){
record.setMerchantId(wxMerchant.getId());
record.setMerchantName(wxMerchant.getName());
@@ -408,7 +408,7 @@ public class WxThirdPartyOrdersServiceImpl implements WxThirdPartyOrdersService

//TODO 第三方获取门店(标识可能发生变化)
// WxMerchant wxMerchant = wxMerchantService.getById(Long.parseLong(record.getShopNumber()));
WxMerchant wxMerchant = wxMerchantService.getMerchantByEncode(record.getShopNumber());
WxMerchant wxMerchant = wxMerchantService.getMerchantByEncode(record.getTenantId(),record.getShopNumber());
if(wxMerchant != null){
record.setMerchantId(wxMerchant.getId());
record.setMerchantName(wxMerchant.getName());


+ 1
- 1
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Просмотреть файл

@@ -264,7 +264,7 @@
<select id="getMerchantByEncode" parameterType="String" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_merchant m where m.encode = #{encode}
from wx_merchant m where m.`tenant_id` = #{tenantId} and m.encode = #{encode}
</select>
<select id="getMerchantByCode" parameterType="java.util.Map" resultMap="BaseResultMap">


Загрузка…
Отмена
Сохранить