Browse Source

企业新生成二维码后其他与之关联的二维码全部失效

v2
蟑螂恶霸 2 years ago
parent
commit
724ddc6340
  1. 10
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java

10
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java

@ -156,7 +156,7 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
Map<String, String> jsonMap = new HashMap<>();
jsonMap.put("salt", salt);
jsonMap.put("codeId", uuid);
jsonMap.put("type", "tmp");
jsonMap.put("type", "zfjd");
String text = JSON.toJSONString(jsonMap);
//这里设置自定义网站url
String logoPath = qrCodeUrl;
@ -352,6 +352,12 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
@Override
public int insertQrCode(String num) {
// 先将与之关联的其他二维码都失效
QrCodeGenerateHistory qrParams = new QrCodeGenerateHistory();
qrParams.setEnterpriseNumber(num);
qrParams.setStatus(1);
iQrCodeGenerateHistoryService.updateQrCodeGenerateHistoryByNumber(qrParams);
// 通过 企业编码 获取该编码在数据库中的企业信息, 将salt拿出来做生成参数
EnterpriseInformation info = new EnterpriseInformation();
info.setEnterpriseNumber(num);
@ -363,7 +369,7 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
Map<String, String> jsonMap = new HashMap<>();
jsonMap.put("salt", enterpriseInformation.getSalt());
jsonMap.put("codeId", uuid);
jsonMap.put("type", "tmp");
jsonMap.put("type", "zfjd");
String text = JSON.toJSONString(jsonMap);
//这里设置自定义网站url
String logoPath = qrCodeUrl;

Loading…
Cancel
Save