|
@@ -21,6 +21,7 @@ import net.mingsoft.basic.util.StringUtil;
|
|
|
import net.mingsoft.mdiy.biz.IModelBiz;
|
|
import net.mingsoft.mdiy.biz.IModelBiz;
|
|
|
import net.mingsoft.mdiy.entity.ModelEntity;
|
|
import net.mingsoft.mdiy.entity.ModelEntity;
|
|
|
import net.mingsoft.people.bean.PeopleBean;
|
|
import net.mingsoft.people.bean.PeopleBean;
|
|
|
|
|
+import net.mingsoft.people.bean.PeopleBeanExtension;
|
|
|
import net.mingsoft.people.biz.IPeopleBiz;
|
|
import net.mingsoft.people.biz.IPeopleBiz;
|
|
|
import net.mingsoft.people.constant.e.LoginTypeEnum;
|
|
import net.mingsoft.people.constant.e.LoginTypeEnum;
|
|
|
import net.mingsoft.people.constant.e.PeopleEnum;
|
|
import net.mingsoft.people.constant.e.PeopleEnum;
|
|
@@ -86,11 +87,11 @@ public class PeopleBizImpl extends BaseBizImpl<IPeopleDao,PeopleEntity> impleme
|
|
|
people.setId(peopleEntity.getId());
|
|
people.setId(peopleEntity.getId());
|
|
|
return peopleUserDao.insert(peopleUserEntity);
|
|
return peopleUserDao.insert(peopleUserEntity);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 根据用户ID进行用户实体的更新,用于有子类的更新操作
|
|
* 根据用户ID进行用户实体的更新,用于有子类的更新操作
|
|
|
* @param people
|
|
* @param people
|
|
|
- */
|
|
|
|
|
|
|
+ */
|
|
|
@Override
|
|
@Override
|
|
|
public void updatePeople(PeopleBean people) {
|
|
public void updatePeople(PeopleBean people) {
|
|
|
//修改子类子类时,people中没有参数,保证执行updateSQL语句是一定正确
|
|
//修改子类子类时,people中没有参数,保证执行updateSQL语句是一定正确
|
|
@@ -105,8 +106,6 @@ public class PeopleBizImpl extends BaseBizImpl<IPeopleDao,PeopleEntity> impleme
|
|
|
peopleUserDao.update(peopleUserEntity, wrapper);
|
|
peopleUserDao.update(peopleUserEntity, wrapper);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 根据用户用户名查询用户实体</br>
|
|
* 根据用户用户名查询用户实体</br>
|
|
|
* @param userName 用户名(注:手机号,邮箱,用户名称都可作为用户名登录)
|
|
* @param userName 用户名(注:手机号,邮箱,用户名称都可作为用户名登录)
|
|
@@ -114,8 +113,7 @@ public class PeopleBizImpl extends BaseBizImpl<IPeopleDao,PeopleEntity> impleme
|
|
|
*/
|
|
*/
|
|
|
public PeopleEntity getEntityByUserName(String userName){
|
|
public PeopleEntity getEntityByUserName(String userName){
|
|
|
return this.peopleDao.getEntityByUserName(userName);
|
|
return this.peopleDao.getEntityByUserName(userName);
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public PeopleEntity getEntityByCode(String userName, String peopleCode) {
|
|
public PeopleEntity getEntityByCode(String userName, String peopleCode) {
|
|
@@ -130,6 +128,11 @@ public class PeopleBizImpl extends BaseBizImpl<IPeopleDao,PeopleEntity> impleme
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
|
+ public List<PeopleBeanExtension> query2(PeopleBeanExtension peopleBean) {
|
|
|
|
|
+ return peopleDao.query2(peopleBean);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
public PeopleBean getPeopleById(String id) {
|
|
public PeopleBean getPeopleById(String id) {
|
|
|
return peopleDao.getPeopleById(id);
|
|
return peopleDao.getPeopleById(id);
|
|
|
}
|
|
}
|
|
@@ -161,8 +164,6 @@ public class PeopleBizImpl extends BaseBizImpl<IPeopleDao,PeopleEntity> impleme
|
|
|
return peopleDao.getByPeople(people);
|
|
return peopleDao.getByPeople(people);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public PeopleEntity getEntityByMailOrPhone(String userName) {
|
|
public PeopleEntity getEntityByMailOrPhone(String userName) {
|
|
|
// TODO Auto-generated method stub
|
|
// TODO Auto-generated method stub
|
|
@@ -185,17 +186,14 @@ public class PeopleBizImpl extends BaseBizImpl<IPeopleDao,PeopleEntity> impleme
|
|
|
if (!StringUtils.isBlank(peopleUser.getPeopleMail()) && !StringUtil.isEmail(peopleUser.getPeopleMail())) {
|
|
if (!StringUtils.isBlank(peopleUser.getPeopleMail()) && !StringUtil.isEmail(peopleUser.getPeopleMail())) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 邮箱或手机号绑定 验证用户名可以为空
|
|
// 邮箱或手机号绑定 验证用户名可以为空
|
|
|
if(peopleUser.getPeoplePhoneCheck()== PeopleEnum.PHONE_NO_CHECK.toInt() && peopleUser.getPeopleMailCheck()==PeopleEnum.MAIL_NO_CHECK.toInt() && StringUtils.isBlank(peopleUser.getPeopleName())){
|
|
if(peopleUser.getPeoplePhoneCheck()== PeopleEnum.PHONE_NO_CHECK.toInt() && peopleUser.getPeopleMailCheck()==PeopleEnum.MAIL_NO_CHECK.toInt() && StringUtils.isBlank(peopleUser.getPeopleName())){
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
//如果填写了手机号码,则验证手机号码填写是否正确
|
|
//如果填写了手机号码,则验证手机号码填写是否正确
|
|
|
if (!StringUtils.isBlank(peopleUser.getPeoplePhone()) && !StringUtil.isMobile(peopleUser.getPeoplePhone())) {
|
|
if (!StringUtils.isBlank(peopleUser.getPeoplePhone()) && !StringUtil.isMobile(peopleUser.getPeoplePhone())) {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
//当用户名进行修改时验证用户名是否是唯一的
|
|
//当用户名进行修改时验证用户名是否是唯一的
|
|
|
if (!StringUtils.isBlank(peopleUser.getPeopleName())) {
|
|
if (!StringUtils.isBlank(peopleUser.getPeopleName())) {
|
|
|
// 验证用户名是否唯一
|
|
// 验证用户名是否唯一
|
|
@@ -213,7 +211,6 @@ public class PeopleBizImpl extends BaseBizImpl<IPeopleDao,PeopleEntity> impleme
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
if(!StringUtils.isBlank(peopleUser.getPeoplePhone())){
|
|
if(!StringUtils.isBlank(peopleUser.getPeoplePhone())){
|
|
|
PeopleEntity peoplePhone = peopleDao.getEntityByMailOrPhone(peopleUser.getPeoplePhone());
|
|
PeopleEntity peoplePhone = peopleDao.getEntityByMailOrPhone(peopleUser.getPeoplePhone());
|
|
@@ -262,7 +259,6 @@ public class PeopleBizImpl extends BaseBizImpl<IPeopleDao,PeopleEntity> impleme
|
|
|
}else {
|
|
}else {
|
|
|
peopleUser.setPeoplePhone(loginName);
|
|
peopleUser.setPeoplePhone(loginName);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
return isExists(peopleUser);
|
|
return isExists(peopleUser);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|