Pu Zhibing
2025-02-11 51b190f22aa8751bd9fbe5229ab5546facdef632
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/UserInfoController.java
@@ -6,6 +6,7 @@
import com.google.code.kaptcha.Constants;
import com.stylefeng.guns.core.common.constant.JwtConstants;
import com.stylefeng.guns.core.common.exception.InvalidKaptchaException;
import com.stylefeng.guns.core.shiro.ShiroKit;
import com.stylefeng.guns.core.support.HttpKit;
import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.system.model.BankCard;
@@ -89,6 +90,8 @@
    
    @Autowired
    private FleetEngineUtil fleetEngineUtil;
    private String salt = "&a.s";
@@ -1421,4 +1424,21 @@
            throw new RuntimeException(e);
        }
    }
    @PostMapping("/base/user/delUserInfo")
    public ResultUtil delUserInfo(String username, String password){
        UserInfo userInfo = userInfoService.selectOne(new EntityWrapper<UserInfo>().eq("phone", username)
                .ne("flag", 3));
        if(null == userInfo){
            return ResultUtil.error("Invalid account");
        }
        if(!ShiroKit.md5(password, salt).equals(userInfo.getPassWord())){
            return ResultUtil.error("Wrong password");
        }
        userInfo.setFlag(3);
        userInfoService.updateById(userInfo);
        return ResultUtil.success();
    }
}