diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index b7de469d..8beec699 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -517,6 +517,7 @@ public class UsersController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); + // if(pd.get("USERAVATARURL")!=null && !pd.getString("USERAVATARURL").equals("")){ // System.out.println("USERAVATARURL原长度:"+pd.getString("USERAVATARURL").length()); // String USERAVATARURL64 = ImageAnd64Binary.zipBase64(pd.getString("USERAVATARURL")); @@ -562,6 +563,12 @@ public class UsersController extends BaseController { if ("true".equals(pd.getString("ISSTUDENT"))) { pd.put("IS_ONLINELEARNING", '1'); } + // todo + // 定位卡号 规则 如果俩个人使用同一一个卡号,最后一个人会是这个卡号。保证一个卡号一个人用。(11.28) + // 不同的公司,它定位卡的配置方案是不一样的,就你像九公司,九公司的卡是随机的。就他不是卡跟着人走,他就一天一变。 目前暂定这样 + if (Tools.notEmpty(pd.getString("CARDNO"))) { + usersService.resetCardNo(pd); + } usersService.editUser(pd); //执行修改 if ("true".equals(pd.getString("ISSTUDENT"))) { pd.put("IS_ONLINELEARNING", "1"); @@ -909,6 +916,14 @@ public class UsersController extends BaseController { if ("true".equals(pd.getString("ISSTUDENT"))) { pd.put("IS_ONLINELEARNING", '1'); } + // todo + // 定位卡号 规则 如果俩个人使用同一一个卡号,最后一个人会是这个卡号。保证一个卡号一个人用。(11.28) + // 不同的公司,它定位卡的配置方案是不一样的,就你像九公司,九公司的卡是随机的。就他不是卡跟着人走,他就一天一变。 目前暂定这样 + if (Tools.notEmpty(pd.getString("CARDNO"))) { + usersService.resetCardNo(pd); + }else { + pd.put("CARDNO",null); + } usersService.saveUser(pd); //执行保存 if ("true".equals(pd.getString("ISSTUDENT"))) { diff --git a/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java b/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java index 6ee4ca91..63de3eb8 100644 --- a/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/system/UsersMapper.java @@ -290,4 +290,6 @@ public interface UsersMapper { PageData findByCorpInfoId(PageData pd); List selectUserListByUserIds(PageData pd); + + void resetCardNo(PageData pd); } diff --git a/src/main/java/com/zcloud/service/system/UsersService.java b/src/main/java/com/zcloud/service/system/UsersService.java index 3d8efa78..74747c24 100644 --- a/src/main/java/com/zcloud/service/system/UsersService.java +++ b/src/main/java/com/zcloud/service/system/UsersService.java @@ -341,4 +341,6 @@ public interface UsersService { List selectUserListByUserIds(PageData selectPageData); + + void resetCardNo(PageData pd); } diff --git a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java index 6c69c16f..9bec3e26 100644 --- a/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java +++ b/src/main/java/com/zcloud/service/system/impl/UsersServiceImpl.java @@ -429,4 +429,9 @@ public class UsersServiceImpl implements UsersService { public List selectUserListByUserIds(PageData pd) { return usersMapper.selectUserListByUserIds(pd); } + + @Override + public void resetCardNo(PageData pd) { + usersMapper.resetCardNo(pd); + } } diff --git a/src/main/resources/mybatis/datasource/system/UsersMapper.xml b/src/main/resources/mybatis/datasource/system/UsersMapper.xml index b81ad005..52653c68 100644 --- a/src/main/resources/mybatis/datasource/system/UsersMapper.xml +++ b/src/main/resources/mybatis/datasource/system/UsersMapper.xml @@ -90,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WORKPERIOD, JCR, CORPINFO_ID, + CARDNO, ISDELETE @@ -129,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" f.WORKPERIOD, f.JCR, f.CORPINFO_ID, + f.CARDNO, f.ISDELETE @@ -165,6 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{WORKPERIOD}, #{JCR}, #{CORPINFO_ID}, + #{CARDNO}, #{ISDELETE} @@ -381,6 +384,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" IS_HAZARDCONFIRMER = #{IS_HAZARDCONFIRMER}, IS_ONLINELEARNING = #{IS_ONLINELEARNING}, PHONE = #{PHONE} + + ,CARDNO = #{CARDNO} + ,DURATION = #{DURATION} @@ -1164,6 +1170,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where USER_ID = #{USER_ID} + + update sys_user set CARDNO = null where CARDNO = #{CARDNO} +