fix(appuser): 修复用户状态查询逻辑

- 在 AppUserMapper.xml 中修改了用户状态查询条件,避免当 state 为 0 时返回空数据
- 在 AppUserController 中添加了 @RefreshScope 注解,以支持配置刷新
This commit is contained in:
曹鹏飞 2025-03-25 10:26:12 +08:00
parent 3f89429512
commit afabf64e39
2 changed files with 3 additions and 1 deletions

View File

@ -23,6 +23,7 @@ import com.nflg.mobilebroken.starter.annotation.MethodInfoMark;
import com.nflg.mobilebroken.starter.service.EmailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@ -45,6 +46,7 @@ import java.util.stream.Collectors;
* @author 曹鹏飞
*/
@Slf4j
@RefreshScope
@RestController
@RequestMapping("/appuser")
public class AppUserController extends ControllerBase {

View File

@ -143,7 +143,7 @@
<if test="userState!=null">
AND 0=#{userState}
</if>
<if test="state!=null">
<if test="state!=null and state!=0">
AND 1=2
</if>
</select>