- 博客(32)
- 资源 (5)
- 收藏
- 关注
原创 powerdesigner预览时加字段
Tools-->Display Preferences-->Table-->Advince-->Columns
2016-08-02 15:43:24 490
原创 异步请求方法
private static ExecutorService executor = Executors.newSingleThreadExecutor();private void asynchSend(final Message msg) {try {executor.execute(new Runnable() {@Overridepublic void run()
2016-07-20 18:22:19 340
原创 javascript时间戳转换为date类型
javascript时间戳转换为date类型var newTime = new Date(时间戳);
2016-03-10 19:24:25 590
原创 mysql安装设置
mysql -uroot -proot1.root用户可以从任何主机连接到mysql服务器,并以root作为密码mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;mysql> FLUSH PRIVILEGES;
2016-02-02 10:30:09 256
原创 oracle模糊查询用法
SELECT *FROM Certificates cWHERE 1 = 1AND instr('130',c.IDCARD)>0ORDER BY c.certificatenum DESC
2016-01-27 19:41:34 450
原创 ORACLE case when查询语句用法
SELECT CE."ID",CE.OLDVALUE,CE."VALUE",CE.CERTIFICATEID,CASE CE.STATUSWHEN 1 THEN '勘误'WHEN 2 THEN '修改'WHEN 3 THEN '变更'END AS STATUS,CE.CREATETIME,US."NAME" FROM CERTIFICATE
2016-01-26 16:01:19 489
原创 oracle创建函数例子
create or replace function GETEXAMINEENAMEBYID(PARAM_ID NUMBER)return VARCHAR2isEXANNAME VARCHAR2(50);beginSELECT NAME into EXANNAME FROM EXAMINEE WHERE ID=PARAM_ID;return EXANNAME;end;
2016-01-26 14:44:55 530
原创 java字符串按照逗号分开
if (serviceCatepic.getPicIds() != null && !"".equals(serviceCatepic.getPicIds())) { StringTokenizer st = new StringTokenizer(serviceCatepic.getPicIds(),","); while(st.ha
2016-01-19 18:12:35 2307
原创 easyui初始化combobox
//状态初始化function statuscomboboxInit(){ statuscombobox = $('#status').combobox({ url : ctx + '/sysController/find.do', queryParams : { key: '003' },
2016-01-19 11:11:31 1105
原创 easyui异步
/** 号场列表 */var venueSiteDatagrid;/** 编辑状态 */var editRow = undefined;/** 场馆Id */var venueId;/** 名称 */var venueName;$(function() { venueId = $('#venueId').val(); venueName =
2016-01-12 19:45:49 454
原创 自己做得json测试类,包含JSONArray,JSONObject,Gson基本使用方法
public class MainClass { public static void main(String[] args) { List list = new ArrayList(); MessageModel msg = new MessageModel(); MessageModel msg1 = new MessageM
2015-12-22 17:47:14 572
原创 calendar控件时间比较
Calendar c = Calendar.getInstance();Date date = new Date();c.setTime(date);c.add(Calendar.MINUTE, 30);Date date = new Date();if(date.getTime()>c.getTime().getTime()){}
2015-12-11 14:11:57 291
原创 距离时间
param_createTime VARCHAR(20),param_type VARCHAR(10),param_status VARCHAR(10)BEGIN DECLARE param_second BIGINT;DECLARE param_minute BIGINT;DECLARE param_hour BIGINT;DECLARE param_d
2015-12-10 15:58:16 311
原创 mysql创建时间距离函数
param_createTime传入的创建时间param_distanceday传入的过期天数CREATE FUNCTION f_getLeftTime(param_createTime VARCHAR(20),param_distanceday INT) RETURNS VARCHAR(10) BEGIN DECLARE
2015-12-10 14:32:24 293
原创 获得当前时间差
DECLARE param_second BIGINT;DECLARE param_minute BIGINT;DECLARE param_hour BIGINT;DECLARE param_day BIGINT;DECLARE param_month BIGINT;DECLARE param_year BIGINT;DECLARE param_return VARCHAR
2015-12-10 12:00:30 326
原创 Spring配置事务
一、采用的基本搭建环境:SpringMVC、MyBatis、MySQL、tomcat Spring事务管理分解了传统的全局事务管理和本地事务管理的劣势,使得在任何环境中都可以使用统一的事务管理模型,你可以写一次代码,然后在不同的环境从你的代码里面配置不同的事务管理策略,Spring提供两种事务管理策略:一种是声明式事务管理策略,另一种是编程式事务管理策略,这里主要介
2015-11-26 10:20:49 254
原创 GSON解析list
GSON转List代码示例:List modelList = gson.fromJson(json串, new TypeToken>(){}.getType());for(int i = 0; i System.out.println(modelList.get(i));}
2015-11-26 10:18:42 641
转载 mysql报错unknown/unsupported storage engine: InnoDB
mysql5.5.28错误unknown/unsupported storage engine: InnoDB环境:win7(x64)专业版一路安装后mysql后出现错误提示:unknown/unsupported storage engine: InnoDB;把my.ini的default-storage-engine=innoDB改为:MyISAM即可启动。
2015-11-23 15:59:31 3793
原创 JsonArray跟JsonObject用法
VenueOrderModel vt = new VenueOrderModel();vt.setCouponId(1L);vt.setUserId(2L);vt.setVenueId(2L);vt.setPayWay(4);vt.setPayPrice(5.8);vt.setOriginalPrice(6.6);List lv1 = new ArrayList();
2015-11-23 13:50:01 458
转载 jsonObject获取json串的值
String str="{"Date":"2012-1-4T00:00:00","keywords":null,"NeededString":"this is the sample string I am needed for my project","others":"not needed"}";JsonObject jobj=new JsonObject(str);String need
2015-11-21 20:07:25 720
原创 SQL 查询出两个字段相同的大于一行的数
Select userId,activityId From activity_users group by userId,activityId having count(*)>1
2015-11-21 12:37:57 2809
原创 sql select if使用方法
SELECT IF((SELECT COUNT(id) FROM activity_users WHERE userId=param_userId AND activityId =param_activityId)=0 OR (SELECT `status` FROM activity_users WHERE userId=param_userId AND activityId =param_ac
2015-11-21 11:02:56 4670
原创 js给li标签中的所有a标签加点击事件
javascript中$('#sportsItem2 a').click(function() {var $this = $(this);$ids = $this.attr("id");console.info($ids);$("#club-list").empty();$this.addClass("on").parents().siblings().chil
2015-11-18 15:57:06 8441
原创 监听器application级别获得bean方法
public void contextInitialized(ServletContextEvent sce) {BeanFactory beans = WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext());dictionaryService = (IDictionaryService) b
2015-11-18 13:32:54 291
原创 Junit4+Spring单元测试写到类上面的注解
@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration(locations = { "classpath:spring.xml", "classpath:spring-mybatis.xml" })public class PushLogControllerTest {}
2015-11-18 09:27:21 662
原创 mybatis 批量插入
INSERT INTO push_log(userId,msgId,title,isCheck,createBy,createTime) VALUES(${item.userId},${item.msgId},#{item.title},2,${item.createBy},now())
2015-11-17 17:24:19 265
原创 springMvc时间格式化model的时间字段上填写
@DateTimeFormat(pattern = "yyyy-MM-dd")@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")private Date craeteTime;
2015-11-16 10:42:57 1638
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人