组织查询修改
parent
f25631558e
commit
31e95b7582
|
|
@ -42,6 +42,7 @@ import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.whdc.model.MyConstant.REDIS_KEY;
|
import static com.whdc.model.MyConstant.REDIS_KEY;
|
||||||
|
import static com.whdc.service.impl.AdinfoServiceImpl.TREE_ALL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xusan
|
* @author xusan
|
||||||
|
|
@ -545,7 +546,7 @@ public class AddressBookController {
|
||||||
adnm = "";
|
adnm = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
List<AdcdTree> tree = adinfoService.tree(null, null);
|
List<AdcdTree> tree = adinfoService.tree(TREE_ALL, TREE_ALL);
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(tree)) {
|
if (CollectionUtils.isEmpty(tree)) {
|
||||||
throw new MyException("当前行政区划不存在");
|
throw new MyException("当前行政区划不存在");
|
||||||
|
|
@ -626,7 +627,7 @@ public class AddressBookController {
|
||||||
throw new MyException("文件为空");
|
throw new MyException("文件为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<AdcdTree> tree = adinfoService.tree(null, null);
|
List<AdcdTree> tree = adinfoService.tree(TREE_ALL, TREE_ALL);
|
||||||
|
|
||||||
appends.forEach(vo ->{
|
appends.forEach(vo ->{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.whdc.service.impl.AdinfoServiceImpl.TREE_ALL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xusan
|
* @author xusan
|
||||||
* @date 2024-05-11
|
* @date 2024-05-11
|
||||||
|
|
@ -60,7 +62,7 @@ public class AdinfoController {
|
||||||
String adcdOradnm) {
|
String adcdOradnm) {
|
||||||
|
|
||||||
|
|
||||||
List<AdcdTree> list = service.tree(null, null);
|
List<AdcdTree> list = service.tree(TREE_ALL, TREE_ALL);
|
||||||
// 查询全部标识
|
// 查询全部标识
|
||||||
if ("all".equals(adcdOradnm)) {
|
if ("all".equals(adcdOradnm)) {
|
||||||
return ResultJson.ok(list);
|
return ResultJson.ok(list);
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.whdc.model.MyConstant.REDIS_KEY;
|
import static com.whdc.model.MyConstant.REDIS_KEY;
|
||||||
|
import static com.whdc.service.impl.AdinfoServiceImpl.TREE_ALL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description:
|
* Description:
|
||||||
|
|
@ -390,7 +391,7 @@ public class WarningController {
|
||||||
|
|
||||||
// 进行行政区划匹配
|
// 进行行政区划匹配
|
||||||
if (CollectionUtils.isNotEmpty(voList)) {
|
if (CollectionUtils.isNotEmpty(voList)) {
|
||||||
List<AdcdTree> tree = adinfoService.tree(null, null);
|
List<AdcdTree> tree = adinfoService.tree(TREE_ALL, TREE_ALL);
|
||||||
Map<String, List<WarningHistoryListVo>> areaMap = voList.stream()
|
Map<String, List<WarningHistoryListVo>> areaMap = voList.stream()
|
||||||
.collect(Collectors
|
.collect(Collectors
|
||||||
.groupingBy(WarningHistoryListVo::getEffectArea, Collectors.toList()));
|
.groupingBy(WarningHistoryListVo::getEffectArea, Collectors.toList()));
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ import static com.whdc.model.MyConstant.REDIS_KEY;
|
||||||
public class AdinfoServiceImpl extends ServiceImpl<AdinfoMapper, Adinfo> implements IAdinfoService {
|
public class AdinfoServiceImpl extends ServiceImpl<AdinfoMapper, Adinfo> implements IAdinfoService {
|
||||||
|
|
||||||
public static final String ADINFO_REDIS_KEY = REDIS_KEY + "adinfo";
|
public static final String ADINFO_REDIS_KEY = REDIS_KEY + "adinfo";
|
||||||
|
public static final String TREE_ALL = REDIS_KEY + "tree_all";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<Adinfo> page(Adinfo dto) {
|
public IPage<Adinfo> page(Adinfo dto) {
|
||||||
|
|
@ -60,6 +61,12 @@ public class AdinfoServiceImpl extends ServiceImpl<AdinfoMapper, Adinfo> impleme
|
||||||
@Cacheable(cacheNames = {ADINFO_REDIS_KEY}, key = "getMethodName()", condition = "#adcd + #adnm", unless = "false")
|
@Cacheable(cacheNames = {ADINFO_REDIS_KEY}, key = "getMethodName()", condition = "#adcd + #adnm", unless = "false")
|
||||||
public List<AdcdTree> tree(String adcd, String adnm) {
|
public List<AdcdTree> tree(String adcd, String adnm) {
|
||||||
|
|
||||||
|
if (TREE_ALL.equals(adcd)){
|
||||||
|
adcd = null;
|
||||||
|
}
|
||||||
|
if (TREE_ALL.equals(adnm)){
|
||||||
|
adnm = null;
|
||||||
|
}
|
||||||
List<Adinfo> list = treeList(adcd, adnm);
|
List<Adinfo> list = treeList(adcd, adnm);
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(list)){
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
|
|
||||||
|
|
@ -172,6 +172,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(book.getOpenid())){
|
if (StringUtils.isNotBlank(book.getOpenid())){
|
||||||
|
|
||||||
|
System.out.println("openid1:"+sysUser.getAbId());
|
||||||
|
System.out.println("openid2:"+openid);
|
||||||
|
System.out.println("openid3:"+book.getOpenid());
|
||||||
|
|
||||||
if(!openid.equals(book.getOpenid())){
|
if(!openid.equals(book.getOpenid())){
|
||||||
throw new MyException("当前手机号已绑定其他账号,请先解绑!");
|
throw new MyException("当前手机号已绑定其他账号,请先解绑!");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue