package com.bjtdba.userCenter.service.impl;

import com.bjtdba.userCenter.dao.UserDao;
import com.bjtdba.userCenter.service.UserLogoutService;
import com.bjtdba.utils.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserLogoutServiceImpl implements UserLogoutService {

    @Autowired
    private UserDao userDao;
    @Override
    public Object userLogout(String phone) {
        int is_del = 1;
        String phoneDel = phone+"del";
        String account = phone+"del";
        int a = userDao.updatePhoneByphone(phoneDel,is_del,phone);
        if(a > 0){
            return ResponseUtil.ok();
        }else{
            return ResponseUtil.fail();
        }
    }
}
