|
@@ -203,20 +203,18 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
public String checkApp(CommonUser commonUser) throws ServiceException {
|
|
public String checkApp(CommonUser commonUser) throws ServiceException {
|
|
// 查询pc账号
|
|
// 查询pc账号
|
|
CommonStaff commonStaff = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
|
|
CommonStaff commonStaff = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
|
|
- .eq("staff_mobile_phone", commonUser.getPhone()).eq("enabled", "1"));
|
|
|
|
|
|
+ .eq("comp_id",commonUser.getCompanyId())
|
|
|
|
+ .eq("staff_mobile_phone", commonUser.getPhone())
|
|
|
|
+ .eq("enabled", "1"));
|
|
// 查询app 账号
|
|
// 查询app 账号
|
|
CommonUser user = this.selectOne(new EntityWrapper<CommonUser>().eq("phone", commonUser.getPhone()));
|
|
CommonUser user = this.selectOne(new EntityWrapper<CommonUser>().eq("phone", commonUser.getPhone()));
|
|
if (user != null) {
|
|
if (user != null) {
|
|
-// if ("1".equals(commonUser.getFlag())) {
|
|
|
|
- this.deleteById(user.getId());
|
|
|
|
- user.setId(commonStaff.getStaffId());
|
|
|
|
- this.insert(user);
|
|
|
|
- return "OK";
|
|
|
|
-// } else if ("2".equals(commonUser.getFlag())) {
|
|
|
|
-// return "OK";
|
|
|
|
-// } else {
|
|
|
|
-// return "是否覆盖APP账号";
|
|
|
|
-// }
|
|
|
|
|
|
+ CommonUser user1=new CommonUser();
|
|
|
|
+ user1=user;
|
|
|
|
+ user1.setId(commonStaff.getStaffId());
|
|
|
|
+ this.insert(user1);
|
|
|
|
+ user.setDeleteFlag("1");
|
|
|
|
+ this.updateById(user);
|
|
|
|
|
|
}
|
|
}
|
|
return "NG";
|
|
return "NG";
|