|
|
|
@ -111,6 +111,9 @@ public class StoreEmployeeService {
|
|
|
|
|
@Value("${bsd.qrCode}")
|
|
|
|
|
private String qrCodeBsdUrl;
|
|
|
|
|
|
|
|
|
|
@Value("${bsd.cancelQrCode}")
|
|
|
|
|
private String cancelQrCode;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询门店号
|
|
|
|
|
*
|
|
|
|
@ -162,6 +165,7 @@ public class StoreEmployeeService {
|
|
|
|
|
PrivilageOrganizational region = retailCompanyMapper.selectById(company.getParentId());
|
|
|
|
|
|
|
|
|
|
cpUserStore.setCompanyName(company.getName());
|
|
|
|
|
cpUserStore.setCompanyCode(company.getCode());
|
|
|
|
|
cpUserStore.setRegionName(region.getName());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -859,4 +863,28 @@ public class StoreEmployeeService {
|
|
|
|
|
}
|
|
|
|
|
outputStream.flush();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 作废波司登分享二维码
|
|
|
|
|
* @param cpUserId 用户ID
|
|
|
|
|
* @param state 场景
|
|
|
|
|
* @return 返回是否成功
|
|
|
|
|
* @throws Exception 异常
|
|
|
|
|
* @author dexiang.jiang
|
|
|
|
|
* @date 2020/05/05 17:24
|
|
|
|
|
*/
|
|
|
|
|
public String cancelQrCodeFromBSD(String cpUserId,String state) {
|
|
|
|
|
String url = "";
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
|
|
params.put("userId", cpUserId);
|
|
|
|
|
params.put("state", state);
|
|
|
|
|
String message = HttpClientUtil.httpPost(cancelQrCode + 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() && StringUtils.isNotBlank(bsdResponse.getData())){
|
|
|
|
|
url = bsdResponse.getData();
|
|
|
|
|
}
|
|
|
|
|
return url;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|