工单信息修正、小程序登录修正

This commit is contained in:
2025-12-28 14:58:09 +08:00
parent 7eddf00705
commit 8448a801ce
11 changed files with 62 additions and 27 deletions

View File

@@ -226,9 +226,15 @@ public class SysUserServiceImpl implements SysUserService {
public ResultDomain<SysUserVO> getLoginUser(SysUserVO filter) {
// 登录查询语义与 getUser 相同(可根据用户名/手机号/邮箱/wechatId查询
if(NonUtils.isNotNull(filter.getPhone())){
// 确保 phoneHash 被正确设置
filter.setPhone(filter.getPhone());
logger.info("登录查询 - phone: {}, phoneHash: {}", filter.getPhone(), filter.getPhoneHash());
}
if(NonUtils.isNotNull(filter.getWechatId())){
logger.info("登录查询 - wechatId: {}", filter.getWechatId());
}
List<SysUserVO> list = userMapper.getUserByFilter(filter);
logger.info("登录查询结果数量: {}", list != null ? list.size() : 0);
if (list == null || list.isEmpty()) {
return ResultDomain.failure("用户不存在");
}

View File

@@ -63,7 +63,7 @@
password,
<!-- 可空/有默认值字段:按是否有入参动态拼接 -->
<if test="email != null and email != ''">email,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="phone != null and phone != ''">phone, phone_hash,</if>
<if test="wechatId != null and wechatId != ''">wechat_id,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
@@ -79,7 +79,7 @@
#{password},
<!-- 可空/有默认值字段对应的值 -->
<if test="email != null and email != ''">#{email},</if>
<if test="phone != null and phone != ''">#{phone, typeHandler=org.xyzh.common.jdbc.handler.EncryptedStringTypeHandler},</if>
<if test="phone != null and phone != ''">#{phone, typeHandler=org.xyzh.common.jdbc.handler.EncryptedStringTypeHandler}, #{phoneHash},</if>
<if test="wechatId != null and wechatId != ''">#{wechatId},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
@@ -93,9 +93,6 @@
<update id="updateUser" parameterType="org.xyzh.common.dto.sys.TbSysUserDTO">
UPDATE sys.tb_sys_user
<set>
<if test="username != null and username != ''">
username = #{username},
</if>
<if test="password != null and password != ''">
password = #{password},
</if>
@@ -104,6 +101,7 @@
</if>
<if test="phone != null and phone != ''">
phone = #{phone, typeHandler=org.xyzh.common.jdbc.handler.EncryptedStringTypeHandler},
phone_hash = #{phoneHash},
</if>
<if test="wechatId != null and wechatId != ''">
wechat_id = #{wechatId},