获取手机号
This commit is contained in:
@@ -8,9 +8,11 @@ import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.chaozhanggui.system.cashierservice.util.IpUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
@CrossOrigin(origins = "*")
|
||||
@RestController
|
||||
@@ -50,4 +52,12 @@ public class LoginContoller {
|
||||
return loginService.getShopInfo(token);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "getPhone")
|
||||
public Result getPhone( @RequestBody Map<String, String> map){
|
||||
if (CollectionUtils.isEmpty(map) || !map.containsKey("userId")) {
|
||||
return Result.fail("id不允许为空");
|
||||
}
|
||||
return loginService.getPhone(Integer.valueOf(map.get("userId").toString()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user