小程序-机构加盟-申请驳回再提交增加验证:无信息变更时提示无需提交
This commit is contained in:
parent
b2be83a8b2
commit
4a09cfb609
|
|
@ -402,8 +402,19 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
|
|||
public boolean validateChanged(OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
|
||||
QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>();
|
||||
qw.eq("pk_id", orgApplyInfoApiEntity.getPkId());
|
||||
qw.eq("status", "2");
|
||||
if ("1".equals(orgApplyInfoApiEntity.getStatus())) {
|
||||
qw.eq("status", "3");
|
||||
} else if ("4".equals(orgApplyInfoApiEntity.getStatus())) {
|
||||
qw.eq("status", "2");
|
||||
} else {
|
||||
qw.eq("status", "-1314");
|
||||
}
|
||||
OrgApplyInfo dbRecord = baseMapper.selectOne(qw);
|
||||
if ("1".equals(orgApplyInfoApiEntity.getStatus())) {
|
||||
if (dbRecord == null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
OrgApplyInfo inputRecord = new OrgApplyInfo();
|
||||
BeanUtils.copyProperties(orgApplyInfoApiEntity, inputRecord);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class WxNoticeServiceImpl extends ServiceImpl<WxNoticeMapper, WxNotice> i
|
|||
qw.select("id");
|
||||
qw.eq("open_id", openId);
|
||||
qw.eq("iz_read", "1");
|
||||
qw.eq("client_type", clientType);//哪个端(机构?员工?家属?)
|
||||
qw.eq("client_type", clientType);//哪个端(1机构2员工3家属)
|
||||
List<WxNotice> wxNotices = baseMapper.selectList(qw);
|
||||
return wxNotices == null ? 0 : wxNotices.size();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,14 +31,14 @@ public class OrgApplyInfoApi {
|
|||
*/
|
||||
@AutoLog(value = "新增/编辑机构加盟申请信息")
|
||||
@PostMapping("/save")
|
||||
public Result<Object> save(@RequestParam("ukey") String ukey,@RequestBody OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
|
||||
public Result<Object> save(@RequestParam("ukey") String ukey, @RequestBody OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
|
||||
//变更信息时 验证是否有变化 没有变化不允许提交
|
||||
if ("4".equals(orgApplyInfoApiEntity.getStatus())) {
|
||||
if(!orgApplyInfoApi.validateChanged(orgApplyInfoApiEntity)){
|
||||
if ("1".equals(orgApplyInfoApiEntity.getStatus()) || "4".equals(orgApplyInfoApiEntity.getStatus())) {
|
||||
if (!orgApplyInfoApi.validateChanged(orgApplyInfoApiEntity)) {
|
||||
return Result.ok("未做变更");
|
||||
}
|
||||
}
|
||||
if(NuRedisUtils.existKey(ukey)){
|
||||
if (NuRedisUtils.existKey(ukey)) {
|
||||
return Result.ok("重复提交");
|
||||
}
|
||||
System.out.println("-----------新增/编辑机构加盟申请信息--------tel------------" + orgApplyInfoApiEntity.getTel());
|
||||
|
|
@ -73,7 +73,7 @@ public class OrgApplyInfoApi {
|
|||
if (StringUtils.isBlank(openId)) {
|
||||
return Result.error("未填写openId");
|
||||
}
|
||||
return Result.ok(orgApplyInfoApi.queryAuditInfo(openId, id,status));
|
||||
return Result.ok(orgApplyInfoApi.queryAuditInfo(openId, id, status));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue