package com.china317.yzjg.dao;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Test1 {
public static void main(String[] args) {
String t1 = “18:30”;
String t2 = “17:30”;
DateFormat formart = new SimpleDateFormat(“hh:mm”);
Date parse = null;
Date parse1=null;
try {
parse = formart.parse(t1);
parse1= formart.parse(t2);
} catch (ParseException e) {
e.printStackTrace();
}
if(parse.compareTo(parse1)>0)
{
System.out.println(“营业开始时间不能大于营业结束时间”);
}
else {
System.out.println(“zhdengchneg”);
}
System.out.println(“parse = “+parse);
System.out.println(” parse1=”+parse1);
}
}
2月25建表语句:
CREATE TABLE bd_universal
(
id
bigint(20) NOT NULL AUTO_INCREMENT COMMENT ‘id主键’,
create_time
datetime DEFAULT NULL COMMENT ‘创建日期’,
update_time
datetime DEFAULT NULL COMMENT ‘更新日期’,
city
varchar(20) DEFAULT NULL COMMENT ‘区域’,
service_name
varchar(50) DEFAULT NULL COMMENT ‘营业场所名称’,
service_full_address
varchar(500) DEFAULT NULL COMMENT ‘详细地址’,
handle_business
varchar(255) DEFAULT NULL COMMENT ‘开办业务’,
business_weeks
varchar(50) DEFAULT NULL COMMENT ‘营业周期,数组格式,数组长度至多为7,数字1~7分别代表周几’,
from_time
varchar(20) DEFAULT NULL COMMENT ‘营业开始时间’,
to_time
varchar(20) DEFAULT NULL COMMENT ‘营业结束时间’,
contact_phone
varchar(50) DEFAULT NULL COMMENT ‘联系电话’,
postal_code
varchar(50) DEFAULT NULL COMMENT ‘邮政编码’,
remarks
varchar(500) DEFAULT NULL COMMENT ‘备注’,
delete_flag
int(11) DEFAULT ‘0’ COMMENT ‘删除位’,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT=‘普服名录数据’;