老师求指教:update时last
老师求指教:update时 last
老师求指教:update时 last_edit_time无法插入麻烦老师帮我看一下,我把last_edit_time字段依次换成了Date、timestamp、varchar类型,对应的Java实体类中类型为java.sql.Date、timestamp和String类型,可是就是报错、错误代码如下:
org.springframework.jdbc.BadSqlGrammarException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'last_edit_time='2018-06-12 07:02:46'
where area_id = 3' at line 3
### The error may involve com.lxinyu.demo.dao.AreaDao.updateArea-Inline
### The error occurred while setting parameters
### SQL: update tb_area SET priority=? last_edit_time=? where area_id = ?
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'last_edit_time='2018-06-12 07:02:46'
where area_id = 3' at line 3
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'last_edit_time='2018-06-12 07:02:46'
where area_id = 3' at line 3
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
at com.sun.proxy.$Proxy73.update(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:294)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
at com.sun.proxy.$Proxy78.updateArea(Unknown Source)
at com.lxinyu.demo.dao.AreaDaoTest.updateArea(AreaDaoTest.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:73)
at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:83)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'last_edit_time='2018-06-12 07:02:46'
where area_id = 3' at line 3
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2486)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:67)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:46)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
... 36 more
数字货币领域还处于类似原始状态的蛮荒时代,而认知水平将决定你在这个领域的角色。
你可能写下难以想象的财富传奇,也可能因为认知不足被别人割了韭菜。快速提升认知水平,是你分秒必争要做的事情。
币市远比股市收益更高,风险也更大。币市的筹码更集中,庄家更强势,24小时交易,无封顶无熔断,一觉醒来账上多了十几万,又一觉醒来亏了几十万。
欢迎大家来一起交流,互相学习!
老师求指教:update时 last
------
延伸阅读:
干货四大短线炒币技巧
币市变化多端,炒短线更是高手的游戏。短线选币关键在热点,投资者一定要对热点的形成有敏锐的洞察力。
短线选币应掌握以下四大技巧:
一看成交量俗 话说“量为价先导”,量是价的先行者。币价的上涨,一定要有量的配合。成交量的放大,意味着换手率的提高、平均持仓成本的上升,上档抛压因此减轻,币价才 会持续上涨。有时,在庄家筹码锁定良好的情况下,币价也可能缩量上攻,但缩量上攻的局面不会持续太久。否则平均持仓成本无法提高,抛压大增,币价缺乏持续 上升动能。因此,短线操作一定要选择带量的币种,对底部放量的币价尤其应加以关注。雅晴wei:LXS2051
二看图形短线操作,除了应高度重视成交量外,还应留意图形的变化。有几种图形值得高度关注:v形反转、w底、头肩底、圆弧底、平台、上升通道等。w底、头肩底、圆弧底放量突破颈线位时,应是买入最佳时机。有两点必须高度注意:一是必须放量突破,方为有效突破;二是在低价位的突破可靠性更高。
三看技术指标比特币市场的各 种技术指标数不胜数。它们各有侧重,投资者不可能面面俱到,只需熟悉其中几种便可。常用的技术指标有随机指标(kdj)、相对强弱指标(rsi)等。一般 而言,k值在低位(20%左右)2次上穿d值时,是较佳的买入时机;在高位(80%以上)2次下穿d值时,形成死叉,是较佳的卖出时机。rsi指标在 0~20时,币价处于超卖,可建仓;在80~100时属超买,可平仓。雅晴wei:LXS2051
四看均线短线操作一般要参照5日、10日、30日均线。5日均线上穿10日、30日均线,10日均线上穿30日均线,称作金叉,是买进时机;反之则称作死叉,是卖出时机。三条均线都向上排列称为多头排列,是强势的表现,币价缩量回抽5日、10日、30日均线是买入时机。
此外,炒短线还应学会一样重要的东西:割肉。
------------------
推荐阅读:
2018年5月7日市场整体下跌,ETC逆势大涨12.18%,市值前100币种中85%币种下跌
Decrypt专访孙宇晨:香港开放加密货币散户交易是“向前的一大步”