Selaa lähdekoodia

fix

release_toaliyun_real
winter 1 vuosi sitten
vanhempi
commit
87095406be
8 muutettua tiedostoa jossa 14 lisäystä ja 13 poistoa
  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 Näytä tiedosto

@@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; 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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
@@ -205,8 +206,8 @@ public class AliPayController extends BaseController {
* https://opendocs.alipay.com/pre-apis/00fi1b * https://opendocs.alipay.com/pre-apis/00fi1b
* @throws Exception 可能产生的任何异常 * @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 msgMethod = (String) paramMap.get("msg_method");
String notifyId = (String) paramMap.get("notify_id"); String notifyId = (String) paramMap.get("notify_id");
@@ -255,7 +256,7 @@ public class AliPayController extends BaseController {
String mallName = jo.getString("mall_name"); String mallName = jo.getString("mall_name");


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


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


+ 1
- 1
mallinkService/src/main/java/com/iformall/mapper/WxMerchantMapper.java Näytä tiedosto

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


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


int recordedAmount(WxMerchant record); int recordedAmount(WxMerchant record);




+ 1
- 1
mallinkService/src/main/java/com/iformall/service/WxMerchantService.java Näytä tiedosto

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


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


Optional<WxMerchant> findByName(String name); Optional<WxMerchant> findByName(String name);




+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/AliBusinessCircleOrderServiceImpl.java Näytä tiedosto

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


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


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBusinessCircleOrderServiceImpl.java Näytä tiedosto

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


//TODO 第三方获取门店(标识可能发生变化) //TODO 第三方获取门店(标识可能发生变化)
// WxMerchant wxMerchant = wxMerchantService.getById(Long.parseLong(record.getWxShopNumber())); // 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) { if (wxMerchant != null) {
record.setMerchantId(wxMerchant.getId()); record.setMerchantId(wxMerchant.getId());
record.setMerchantName(wxMerchant.getName()); record.setMerchantName(wxMerchant.getName());


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Näytä tiedosto

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


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


@Override @Override


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxThirdPartyOrdersServiceImpl.java Näytä tiedosto

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


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


//TODO 第三方获取门店(标识可能发生变化) //TODO 第三方获取门店(标识可能发生变化)
// WxMerchant wxMerchant = wxMerchantService.getById(Long.parseLong(record.getShopNumber())); // 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){ if(wxMerchant != null){
record.setMerchantId(wxMerchant.getId()); record.setMerchantId(wxMerchant.getId());
record.setMerchantName(wxMerchant.getName()); record.setMerchantName(wxMerchant.getName());


+ 1
- 1
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Näytä tiedosto

@@ -264,7 +264,7 @@
<select id="getMerchantByEncode" parameterType="String" resultMap="BaseResultMap"> <select id="getMerchantByEncode" parameterType="String" resultMap="BaseResultMap">
select select
<include refid="allColumns"/> <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>
<select id="getMerchantByCode" parameterType="java.util.Map" resultMap="BaseResultMap"> <select id="getMerchantByCode" parameterType="java.util.Map" resultMap="BaseResultMap">


Ladataan…
Peruuta
Tallenna