ezhizao_zx 1 year ago
parent
commit
83011d1ae4

+ 2 - 1
src/main/java/cn/ezhizao/project/business/reconciliation/priceList/controller/BizEntrustOncePriceController.java

@@ -43,6 +43,7 @@ public class BizEntrustOncePriceController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo list(BizEntrustPrice bizEntrustPrice) throws NoSuchFieldException, IllegalAccessException {
         startPage();
+        bizEntrustPrice.setToTenantId(getTenantId());
         List<BizEntrustPrice> list = bizEntrustPriceService.getOnceList(bizEntrustPrice);
         return getDataTable(list);
     }
@@ -106,7 +107,7 @@ public class BizEntrustOncePriceController extends BaseController {
     public AjaxResult add(@RequestBody BizEntrustPrice bizEntrustPrice) throws NoSuchFieldException, IllegalAccessException {
         //判读是否存在该价目
         setTenantId(bizEntrustPrice);
-        bizEntrustPrice.setToTenantId(bizEntrustPrice.getFromTenantId());
+        bizEntrustPrice.setToTenantId(getTenantId());
         List<BizEntrustPrice> list = bizEntrustPriceService.getOnceList(bizEntrustPrice);
         if (list.size() > 0) {
             return AjaxResult.error("该价目已存在");

+ 14 - 0
src/main/java/cn/ezhizao/project/system/service/impl/SysUserServiceImpl.java

@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.validation.Validator;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
 /**
@@ -571,6 +572,19 @@ public class SysUserServiceImpl implements ISysUserService
             {
                 // 验证是否存在这个用户
                 SysUser u = userMapper.selectUserByUserName(user.getUserName());
+                // 定义手机号的正则表达式
+                String regex = "^1[0-9]{10}$";
+                if (!Pattern.matches(regex, user.getUserName()))
+                {
+                    failureNum++;
+                    failureMsg.append("<br/>" + failureNum + "、账号 " + user.getUserName() + " 用户名称应为手机号");
+                    continue;
+                }
+                if(user.getNickName().equals(" ")||user.getNickName()==null){
+                    failureNum++;
+                    failureMsg.append("<br/>" + failureNum + "、账号 " + user.getUserName() + "用户昵称不能为空");
+                    continue;
+                }
                 if (StringUtils.isNull(u))
                 {
 

+ 1 - 0
src/main/resources/mybatis/business/BizEntrustPriceMapper.xml

@@ -82,6 +82,7 @@
             <if test="provinceCode != null ">AND e.province_code = #{provinceCode}</if>
             <if test="cityCode != null ">AND e.city_code = #{cityCode}</if>
             <if test="districtCode != null ">AND e.district_code = #{districtCode}</if>
+            <if test="toTenantId != null ">AND e.to_tenant_id = #{toTenantId}</if>
         </trim>
     </select>
 

+ 1 - 1
src/main/resources/mybatis/system/SysDeptMapper.xml

@@ -47,7 +47,7 @@
 		<if test="deptId != null and deptId != 0">
 			AND d.dept_id = #{deptId}
 		</if>
-		<if test="tenantId != null and tenantId != 0">
+		<if test="tenantId != null ">
 			AND d.tenant_id = #{tenantId}
 		</if>
 		<if test="parentId != null and parentId != 0">

+ 1 - 1
src/main/resources/mybatis/system/SysUserMapper.xml

@@ -80,7 +80,7 @@
 		<if test="userId != null and userId != 0">
 			AND u.user_id = #{userId}
 		</if>
-		<if test="tenantId != null and tenantId != 0">
+		<if test="tenantId != null ">
 			AND u.user_id IN (SELECT user_id FROM biz_user_tenant WHERE deleted = 0 AND tenant_id = #{tenantId} )
 		</if>
 		<if test="snmsUserId != null and snmsUserId != 0">