package cn.hnthyy.thmz;

import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;

import java.util.HashMap;
import java.util.Map;

public class HotelTimeTest {
    private int IsAfternoon(int currentTime) {
        System.out.println(currentTime);
        return currentTime - 12;
    }

    public static void main(String[] args) {
        HotelTimeTest htt = new HotelTimeTest();
        int flg = htt.IsAfternoon(java.util.Calendar.getInstance().getTime().getHours());
        if (flg >= 0)
            System.out.println("已经超过12点了");
        else if (flg < 0)
            System.out.println("还没有超过12点");


        String s ="";
        for (int i=0;i<20; i++){
            if(StringUtils.isBlank(s)){
                continue;
            }
            System.out.println(i);
        }




        Map<String,String> map=new HashMap<>();
        //Map 对象存入 用户名,密码,电话号码
        map.put("username", "liyang");
        map.put("pwd", "111111");
        map.put("telephone", "152232323");

        //Map 转成  JSONObject 字符串
        JSONObject jsonObj=new JSONObject(map);
        System.out.println(jsonObj.toString());

    }
}