修改注册问题

master
wangwei 2 years ago
parent 506b62c19a
commit 1635adae87

@ -246,10 +246,14 @@ public class RegisterController {
if (StrUtil.isNotBlank(company_check) && company_check.equals("1")) {
//新用户注册时根据往来单位字典进行企业名称校验
CustomerInfoEntity customerInfoEntity = customerInfoService.selectById(userRegisterEntity.getCompanyId());
if (customerInfoEntity != null) {
if (customerInfoEntity != null ) {
return ResultVOUtils.error(500, "该企业已被注册!");
}
}
UserRegisterEntity userRegisterEntity2 = userRegisterService.selectByCname(userRegisterEntity.getCompanyName());
if (userRegisterEntity2 !=null ) {
return ResultVOUtils.error(500, "该企业已被注册!");
}
userRegisterEntity.setRegisterTime(DateUtil.getDateTime());
userRegisterEntity.setCheckType(0);//未审核

@ -12,6 +12,10 @@ public interface UserRegisterDao {
List<UserRegisterEntity> filterUserRegisters(UserResisterFilterRequest userResisterFilterRequest);
UserRegisterEntity selectByCname(String cName);
boolean insertUserRegister(UserRegisterEntity userRegisterEntity);
boolean updateUserRegister(UserRegisterEntity userRegisterEntity);

@ -11,6 +11,8 @@ public interface UserRegisterService {
boolean insertUserRegister(UserRegisterEntity userRegisterEntity);
UserRegisterEntity selectByCname(String cName);
boolean updateUserRegister(UserRegisterEntity userRegisterEntity);
boolean deleteById(Long id);

@ -33,6 +33,11 @@ public class UserRegisterServiceImpl implements UserRegisterService {
return userRegisterDao.insertUserRegister(userRegisterEntity);
}
@Override
public UserRegisterEntity selectByCname(String cName) {
return userRegisterDao.selectByCname(cName);
}
@Override
public boolean updateUserRegister(UserRegisterEntity userRegisterEntity) {
return userRegisterDao.updateUserRegister(userRegisterEntity);

@ -17,6 +17,14 @@
</where>
</select>
<select id="selectByCname" parameterType="java.lang.String"
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
SELECT *
FROM user_register
where companyName=#{cName}
</select>
<insert id="insertUserRegister" keyProperty="id" parameterType="com.glxp.api.entity.auth.UserRegisterEntity">
INSERT INTO user_register

Loading…
Cancel
Save