puzhibing
2024-03-01 e0ec0a20cb943b4ee92c45b64f02b007a003b0ba
cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java
@@ -124,11 +124,12 @@
    @Override
    public ResultUtil addStuOfAppUser(StuDetailsReq stu, Integer appUserId) throws Exception {
        TStudent student = new TStudent();
        if (ToolUtil.isNotEmpty(stu.getName()) && ToolUtil.isNotEmpty(stu.getIdCard())) {
            Boolean aBoolean = JuHeUtil.idcardAuthentication(stu.getIdCard(), stu.getName());
            if (!aBoolean) {
                return ResultUtil.error("身份证和姓名不匹配");
            }
        if(ToolUtil.isEmpty(stu.getIdCard())){
            return ResultUtil.error("请填写身份证号");
        }
        Boolean aBoolean = JuHeUtil.idcardAuthentication(stu.getIdCard(), stu.getName());
        if (!aBoolean) {
            return ResultUtil.error("身份证和姓名不匹配");
        }
        student.setAppUserId(appUserId);
        student.setName(stu.getName());
@@ -742,30 +743,16 @@
        citycodeResp.setLatitude(longitude);
        List<StoreDetailList> queryStoreList = storeClient.getQueryStoreList(citycodeResp);
        if (queryStoreList.size() > 0) {
            if (ToolUtil.isEmpty(space) || space ==1) {
                queryStoreList = queryStoreList.stream().sorted(Comparator.comparing(o -> o.getStoreDistance())).collect(Collectors.toList());
            } else {
                queryStoreList = queryStoreList.stream()
                        .sorted(Comparator.comparing(StoreDetailList::getStoreDistance).reversed())
                        .collect(Collectors.toList());
            }
//            if (ToolUtil.isEmpty(space) || space == 2) {
//                queryStoreList = queryStoreList.stream()
//                        .sorted(Comparator.comparing(StoreDetailList::getStoreDistance).reversed())
//                        .collect(Collectors.toList());
//
//            } else {
//                queryStoreList = queryStoreList.stream().sorted(Comparator.comparing(o -> o.getStoreDistance())).collect(Collectors.toList());
//            }
            if (ToolUtil.isNotEmpty(search)) {
                queryStoreList = queryStoreList.stream().filter(o -> o.getStoreName().contains(search)).collect(Collectors.toList());
            }
        }
        return queryStoreList;
    }