9 changed files with 175 additions and 71 deletions
@ -0,0 +1,37 @@ |
|||
package com.zdxt.enforcementcode.domain.bo; |
|||
|
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import jakarta.validation.constraints.NotBlank; |
|||
import jakarta.validation.constraints.NotNull; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 企业用户修改手机号码业务对象 |
|||
* |
|||
* @author Lion Li |
|||
* @date 2026-05-16 |
|||
*/ |
|||
@Data |
|||
@Schema(description = "企业用户修改手机号码请求对象") |
|||
public class UpdatePhoneBo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
@Schema(description = "用户ID") |
|||
@NotNull(message = "用户ID不能为空") |
|||
private Long userId; |
|||
|
|||
/** |
|||
* 新手机号码 |
|||
*/ |
|||
@Schema(description = "新手机号码") |
|||
@NotBlank(message = "手机号码不能为空") |
|||
private String phoneNumber; |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
package com.zdxt.enforcementcode.service.enterprise; |
|||
|
|||
import org.dromara.system.domain.vo.SysUserVo; |
|||
|
|||
|
|||
/** |
|||
* 企业执法-我的Service接口 |
|||
*/ |
|||
public interface IAppEnterpriseMineService { |
|||
|
|||
/** |
|||
* 企业端-根据用户ID查询用户信息 |
|||
* |
|||
* @param userId 用户ID |
|||
* @return 用户信息 |
|||
*/ |
|||
SysUserVo queryLoginUserId(String userId); |
|||
|
|||
/** |
|||
* 企业端-修改用户联系电话 |
|||
*/ |
|||
int updateUserPhone(String userId, String phone); |
|||
} |
|||
@ -1,40 +0,0 @@ |
|||
package com.zdxt.enforcementcode.service.enterprise.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|||
import com.zdxt.enforcementcode.mapper.enterprise.AppEnterpriseMineMapper; |
|||
import com.zdxt.enforcementcode.service.enterprise.IAppEnterpriseMineService; |
|||
import org.dromara.system.domain.SysUser; |
|||
import org.dromara.system.domain.vo.SysUserVo; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class AppEnterpriseMineServiceImpl implements IAppEnterpriseMineService { |
|||
|
|||
@Autowired |
|||
private AppEnterpriseMineMapper appEnterpriseMineMapper; |
|||
/** |
|||
* 企业端-获取用户信息 |
|||
* @param userId 用户ID |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public SysUserVo queryLoginUserId(String userId) { |
|||
SysUserVo sysUserVo = appEnterpriseMineMapper.queryLoginUserId(userId); |
|||
return sysUserVo; |
|||
} |
|||
|
|||
/** |
|||
* 企业端-修改用户联系电话 |
|||
* @param userId |
|||
* @param phone |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public int updateUserPhone(String userId, String phone) { |
|||
LambdaUpdateWrapper<SysUser> updateWrapper = new LambdaUpdateWrapper<>(); |
|||
updateWrapper.eq(SysUser::getUserId, Long.parseLong(userId)) |
|||
.set(SysUser::getPhonenumber, phone); |
|||
return appEnterpriseMineMapper.update(null, updateWrapper); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue