|
@@ -175,6 +175,31 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 查验app 账号
|
|
|
+ *
|
|
|
+ * @param commonUser
|
|
|
+ * @return
|
|
|
+ * @throws ServiceException
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public String checkApp(CommonUser commonUser) throws ServiceException {
|
|
|
+ // 查询pc账号
|
|
|
+ CommonStaff commonStaff = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
|
|
|
+ .eq("staff_mobile_phone", commonUser.getPhone()).eq("enabled", "1"));
|
|
|
+ // 查询app 账号
|
|
|
+ CommonUser user = this.selectOne(new EntityWrapper<CommonUser>().eq("phone",commonUser.getPhone()));
|
|
|
+ if(user != null){
|
|
|
+ this.deleteById(user.getId());
|
|
|
+ user.setId(commonStaff.getStaffId());
|
|
|
+ this.insert(user);
|
|
|
+ return "OK";
|
|
|
+ }
|
|
|
+ return "NG";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 重置密码
|
|
|
*
|