Browse Source

[EXCEPTION][修改]:扫码异常处理

release_toaliyun_real
Stormeye Wu 7 years ago
parent
commit
13b9626a75
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      mallinkCApi/src/main/java/com/iformall/controller/WxMerchantController.java

+ 6
- 1
mallinkCApi/src/main/java/com/iformall/controller/WxMerchantController.java View File

@@ -7,6 +7,7 @@ import com.iformall.service.WxMerchantService;
import com.iformall.utils.HashUtil; import com.iformall.utils.HashUtil;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
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;
@@ -34,9 +35,13 @@ public class WxMerchantController extends BaseController {
if(merchantCode == null) { if(merchantCode == null) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);
} }
String codeMD5 = HashUtil.DecodeByMD5(merchantCode);
if(StringUtils.isBlank(codeMD5)) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);
}
HashMap<String, String> params = new HashMap<String, String>(); HashMap<String, String> params = new HashMap<String, String>();
params.put("tenantId", getTenantId()); params.put("tenantId", getTenantId());
params.put("merchantCode", HashUtil.DecodeByMD5(merchantCode));
params.put("merchantCode", codeMD5);
WxMerchantVo wxMerchant = wxMerchantService.getMerchantInfo(params); WxMerchantVo wxMerchant = wxMerchantService.getMerchantInfo(params);
return new ResultData(wxMerchant); return new ResultData(wxMerchant);
} }


Loading…
Cancel
Save