门店号管理

master
LegnaYet 6 years ago
parent 3187a664b5
commit da6125dc57

@ -207,6 +207,7 @@ public class StoreEmployeeService {
* @throws Exception
*/
public String getQrCodeFromBSD(String cpUserId,String type,String state,String storeNo) throws Exception {
String url = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Map<String, Object> params = new HashMap<>();
params.put("userId", cpUserId);
@ -216,10 +217,10 @@ public class StoreEmployeeService {
String message = HttpClientUtil.httpPost(qrCodeBsdUrl + MD5FileUtil.getMD5String("BOSIDENG" + sdf.format(new Date())), JSONObject.toJSONString(params)).getMessage();
JSONObject qrCodeJson = JSONObject.parseObject(message);
BsdShareCodeResponse bsdResponse = qrCodeJson.toJavaObject(BsdShareCodeResponse.class);
if (bsdResponse.getSuccess()){
return bsdResponse.getData();
if (bsdResponse.getSuccess() && StringUtils.isNotBlank(bsdResponse.getData())){
url = bsdResponse.getData();
}
return null;
return url;
}

@ -100,6 +100,7 @@ public class PromotionCodeService {
* @throws Exception
*/
public String getQrCodeFromBSD(String cpUserId,String type,String state,String storeNo) throws Exception {
String url = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Map<String, Object> params = new HashMap<>();
params.put("userId", cpUserId);
@ -109,8 +110,8 @@ public class PromotionCodeService {
String message = HttpClientUtil.httpPost(qrCodeBsdUrl + MD5FileUtil.getMD5String("BOSIDENG" + sdf.format(new Date())), JSONObject.toJSONString(params)).getMessage();
JSONObject qrCodeJson = JSONObject.parseObject(message);
BsdShareCodeResponse bsdResponse = qrCodeJson.toJavaObject(BsdShareCodeResponse.class);
if (bsdResponse.getSuccess()){
return bsdResponse.getData();
if (bsdResponse.getSuccess() && StringUtils.isNotBlank(bsdResponse.getData())){
url = bsdResponse.getData();
}
return null;
}

Loading…
Cancel
Save