添加作废的二维码日志。

dev_0531
kevin jiang 5 years ago
parent 8fd1c1069d
commit 05f1883902

@ -198,6 +198,22 @@ public class StoreStaffController extends BaseController {
}
}
/**
*
* @author dexiang.jiang
* @date 2020/05/19 19:24
*/
@RequestMapping(value = "/add/qrcode",method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> addQrCode(@RequestParam("cpUserId") String cpUserId,@RequestParam("type") String type,@RequestParam("state") String state,@RequestParam("storeNo") String storeNo) {
try {
return data(storeEmployeeService.getQrCodeFromBSDNew(cpUserId,type, state, storeNo));
} catch (Exception e) {
log.error("生成二维码", e);
return fail();
}
}
/**
*
* @author dexiang.jiang

@ -285,6 +285,30 @@ public class StoreEmployeeService {
return url;
}
/**
*
*
* @param cpUserId
* @param type
* @param state
* @param storeNo
* @return
* @throws Exception
*/
public BsdShareCodeResponse getQrCodeFromBSDNew(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);
params.put("type", type);
params.put("state", state);
params.put("storeNo", storeNo);
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);
return bsdResponse;
}
/**
*

Loading…
Cancel
Save