fix(appuser): 修复用户状态查询逻辑
- 在 AppUserMapper.xml 中修改了用户状态查询条件,避免当 state 为 0 时返回空数据 - 在 AppUserController 中添加了 @RefreshScope 注解,以支持配置刷新
This commit is contained in:
parent
3f89429512
commit
afabf64e39
|
|
@ -23,6 +23,7 @@ import com.nflg.mobilebroken.starter.annotation.MethodInfoMark;
|
||||||
import com.nflg.mobilebroken.starter.service.EmailService;
|
import com.nflg.mobilebroken.starter.service.EmailService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
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.data.redis.core.RedisTemplate;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -45,6 +46,7 @@ import java.util.stream.Collectors;
|
||||||
* @author 曹鹏飞
|
* @author 曹鹏飞
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@RefreshScope
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/appuser")
|
@RequestMapping("/appuser")
|
||||||
public class AppUserController extends ControllerBase {
|
public class AppUserController extends ControllerBase {
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
<if test="userState!=null">
|
<if test="userState!=null">
|
||||||
AND 0=#{userState}
|
AND 0=#{userState}
|
||||||
</if>
|
</if>
|
||||||
<if test="state!=null">
|
<if test="state!=null and state!=0">
|
||||||
AND 1=2
|
AND 1=2
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue