yangdamao 2 anos atrás
pai
commit
bf6d9c956b

+ 16 - 27
zhongzheng-admin/src/main/java/com/zhongzheng/controller/user/UserController.java

@@ -1,43 +1,32 @@
 package com.zhongzheng.controller.user;
 
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.*;
-
 import cn.afterturn.easypoi.excel.entity.ExportParams;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
-import com.zhongzheng.common.core.domain.entity.SysUser;
-import com.zhongzheng.common.core.domain.model.LoginUser;
-import com.zhongzheng.common.utils.ServletUtils;
-import com.zhongzheng.modules.alisms.service.IAliSmsService;
-import com.zhongzheng.modules.course.vo.CourseSectionImport;
-import com.zhongzheng.modules.grade.vo.ClassPeriodStudentExportVo;
-import com.zhongzheng.modules.user.bo.*;
-import com.zhongzheng.modules.user.service.IUserService;
-import com.zhongzheng.modules.user.vo.*;
-import io.netty.util.internal.ObjectUtil;
-import lombok.RequiredArgsConstructor;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
 import com.zhongzheng.common.annotation.Log;
 import com.zhongzheng.common.core.controller.BaseController;
 import com.zhongzheng.common.core.domain.AjaxResult;
+import com.zhongzheng.common.core.page.TableDataInfo;
 import com.zhongzheng.common.enums.BusinessType;
 import com.zhongzheng.common.utils.poi.ExcelUtil;
-import com.zhongzheng.common.core.page.TableDataInfo;
+import com.zhongzheng.modules.alisms.service.IAliSmsService;
+import com.zhongzheng.modules.user.bo.*;
+import com.zhongzheng.modules.user.service.IUserService;
+import com.zhongzheng.modules.user.vo.UserIdCardBatchVo;
+import com.zhongzheng.modules.user.vo.UserStatstVo;
+import com.zhongzheng.modules.user.vo.UserStudyRecordVo;
+import com.zhongzheng.modules.user.vo.UserVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+
 /**
  * 客户端用户Controller
  *

+ 15 - 11
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -625,12 +625,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         if(bo.getTel().length()!=11){
             throw new CustomException("手机号格式错误");
         }
-        if(bo.getIdcard()==null){
-            throw new CustomException("身份证不能为空");
-        }
-        if(bo.getIdcard().length()!=18){
-            throw new CustomException("身份证格式错误");
-        }
+//        if(bo.getIdcard()==null){
+//            throw new CustomException("身份证不能为空");
+//        }
+//        if(bo.getIdcard().length()!=18){
+//            throw new CustomException("身份证格式错误");
+//        }
 //        if(bo.getRealname()==null){
 //            throw new CustomException("真实姓名不能为空");
 //        }
@@ -654,7 +654,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         SnowflakeIdUtils idWorker = new SnowflakeIdUtils(3, 1);
         inertData.setUserAccount(String.valueOf(idWorker.nextId()));
         inertData.setSex(1);
-        inertData.setIdCard(bo.getIdcard());
+        if (ObjectUtils.isNotNull(bo.getIdcard())){
+            inertData.setIdCard(bo.getIdcard());
+        }
         inertData.setRealname(bo.getRealname());
         inertData.setStatus(1);
         inertData.setRegisterPlat(bo.getRegisterPlat());
@@ -887,9 +889,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
             if(Validator.isEmpty(bo.getTelphone())){
                 throw new CustomException("用户手机号码缺失");
             }
-            if(Validator.isEmpty(bo.getIdCard())){
-                throw new CustomException("用户身份证号码缺失");
-            }
+//            if(Validator.isEmpty(bo.getIdCard())){
+//                throw new CustomException("用户身份证号码缺失");
+//            }
             User user1 = getOne(new LambdaQueryWrapper<User>()
                     .eq(User::getTelphone,EncryptHandler.encrypt(bo.getTelphone())).last("limit 1"));
             //手机号码存在
@@ -900,7 +902,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
                 }
                 if(Validator.isEmpty(user1.getIdCard())){
                     //更新身份证和姓名
-                    user1.setIdCard(bo.getIdCard());
+                    if (ObjectUtil.isNotNull(bo.getIdCard())){
+                        user1.setIdCard(bo.getIdCard());
+                    }
                     user1.setRealname(bo.getRealname());
                     updateById(user1);
                 }

+ 7 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -1253,16 +1253,16 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
     public String getGoodsStudyUrl(GoodsStudyUrlBo bo) {
         String url = "";
         //中正学堂PC域名和H5域名 https://zzyxt.gdzzkj.net/  h.gdzzkj.net
-//        String domain = "http://192.168.1.222:6002/";
-//        String domainH5 = "https://h.xyyxt.net";
-        String domain = "https://zzyxt.gdzzkj.net/";
-        String domainH5 = "https://h.gdzzkj.net";
+        String domain = "http://192.168.1.222:6002/";
+        String domainH5 = "https://h.xyyxt.net";
+//        String domain = "https://zzyxt.gdzzkj.net/";
+//        String domainH5 = "https://h.gdzzkj.net";
         Long tenantId = 867735392558919680L; //祥粤云
         if (ObjectUtils.isNotNull(bo.getTenantId()) && bo.getTenantId().equals(tenantId)){
-            domain = "https://web.xyyxt.net/";
-            domainH5 = "https://h.xyyxt.net";
-//            domain = "http://192.168.1.222:6002/";
+//            domain = "https://web.xyyxt.net/";
 //            domainH5 = "https://h.xyyxt.net";
+            domain = "http://192.168.1.222:6002/";
+            domainH5 = "https://h.xyyxt.net";
         }
         Goods goods = baseMapper.queryGoodsByIdTenant(bo.getGoodsId(), bo.getTenantId());
         if (ObjectUtils.isNull(goods)) {