|
|
|
@ -76,7 +76,7 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl<EpidemicSentr |
|
|
|
/** |
|
|
|
* 小程序首页 |
|
|
|
*/ |
|
|
|
private static String MA_FRONT_PAGE_URL = "pages/index/index"; |
|
|
|
private static String MA_FRONT_PAGE_URL = "pages/fromVirus/fromVirus"; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<EpidemicSentryPostDTO> page(Map<String, Object> params) { |
|
|
|
@ -201,6 +201,9 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl<EpidemicSentr |
|
|
|
if (!StringUtils.isNotBlank(entity.getGridId())) { |
|
|
|
throw new RenException("根据哨卡id未查到网格id信息!"); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(entity.getMaCodeUrl())) { |
|
|
|
throw new RenException("该小程序码已经存在!"); |
|
|
|
} |
|
|
|
String param = entity.getGridId().concat("-").concat(entity.getSentryPostCode()); |
|
|
|
entity.setMaCodeUrl(this.createMaCode(param, MA_FRONT_PAGE_URL)); |
|
|
|
baseDao.updateById(entity); |
|
|
|
@ -220,10 +223,18 @@ public class EpidemicSentryPostServiceImpl extends BaseServiceImpl<EpidemicSentr |
|
|
|
if (CollUtil.isEmpty(categoryEntityList)) { |
|
|
|
throw new RenException("根据网格id未查到哨卡信息!"); |
|
|
|
} |
|
|
|
Boolean isHave = false; |
|
|
|
for (EpidemicSentryPostEntity entity : categoryEntityList) { |
|
|
|
if (StringUtils.isNotBlank(entity.getMaCodeUrl())) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
String param = entity.getGridId().concat("-").concat(entity.getSentryPostCode()); |
|
|
|
entity.setMaCodeUrl(this.createMaCode(param, MA_FRONT_PAGE_URL)); |
|
|
|
baseDao.updateById(entity); |
|
|
|
isHave = true; |
|
|
|
} |
|
|
|
if(!isHave){ |
|
|
|
throw new RenException("该网格下的哨卡编码已经全部存在,不可重复生成!"); |
|
|
|
} |
|
|
|
return new Result().ok("批量生成小程序码成功。"); |
|
|
|
} |
|
|
|
|