ssm
一叶扁舟3
这个作者很懒,什么都没留下…
展开
-
Autowired
(@Autowired)@Autowiredprivate SysLogDao sysLogDao;/*public void setSysLogDao(SysLogDao sysLogDao) { this.sysLogDao = sysLogDao; }*/ public SysLogDao getSysLogDao() { return sysLogDao; }原创 2018-09-28 10:23:59 · 1654 阅读 · 0 评论 -
多条件关联查询
select <include refid="Detail_Refund"></include> from order_detail as a left join mj_refund as b on a.orderNo=b.orderNo where 1=1 and b.refundStatu...原创 2019-04-18 15:10:37 · 709 阅读 · 0 评论 -
插入一条不重复的数据
insert into sys_user (username, password, likeName, imgurl, email, mobile, userType, remark, enabledFlag, creattime, updatetime,lastPasswordTime,`rank`,score,balance,referrerId...原创 2019-04-08 14:39:39 · 313 阅读 · 0 评论 -
Column 'creatUser' in where clause is ambiguous
该查询是否是多表查询,每张表都有该字段,原创 2019-03-22 14:56:02 · 1276 阅读 · 0 评论 -
mybatis更新记录时与原来数据不重复
where id = #{id} and NOT EXISTS( SELECT a.configCode from ( SELECT configCode FROM sys_conf WHERE configCode = #{configcode} AND id !=#{id}) a)原创 2019-03-08 14:30:49 · 500 阅读 · 0 评论 -
分页查询插件pagehelper用法
1.依赖<dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2....原创 2019-01-30 13:56:15 · 278 阅读 · 0 评论 -
There is no getter for property named 'xxx' in 'class com.mjs.mojisishop.entity.xxx
出现这种报错说明实体类中没有该属性出现的原因:一般在数据库中新加字段之后或更改字段类型解决方法:1.去实体类检查是否有该属性,2.去mybatis文件中检查是否有该字段特别注意大小写,尤其是你的mybatis文件是自动生成的,后面又新加字段...原创 2019-01-30 12:04:28 · 647 阅读 · 0 评论 -
mybtis foreach写法
delete from sys_logs where id in #{item}原创 2019-02-21 14:38:52 · 162 阅读 · 0 评论 -
文件上传到oss服务器报错Unable to execute HTTP request: Connection pool shut down
把static改成构造public+类名原创 2019-01-29 08:53:42 · 19819 阅读 · 0 评论 -
mybatis 查询条件为小于等于0,查询到了所有数据
&amp;lt;if test=&quot;store != null and goodsstatus != '' &quot;&amp;gt; and store &amp;lt;![CDATA[ &amp;lt;= ]]&amp;gt; #{store} &amp;lt;/if&amp;gt; 改成原创 2019-01-28 10:41:54 · 1431 阅读 · 0 评论 -
Ambiguous mapping. Cannot map 'XXXXXController' method
1.controller层方法重名原创 2019-01-22 16:58:31 · 2022 阅读 · 0 评论 -
mybatis一对多关系映射,一对一映射
...原创 2019-01-25 10:40:32 · 105 阅读 · 0 评论 -
多条件查询
&amp;lt;select id=&quot;selectByPrimaryKeySelective&quot; parameterType=&quot;com.mjs.mojisishop.entity.OrderInfo&quot; resultMap=&quot;orderInfoMap&quot;&amp;gt; select原创 2019-01-25 10:09:27 · 340 阅读 · 0 评论 -
mybatis中插入记录后返回该记录的主键id
&amp;lt;insert id=&quot;insert&quot; parameterType=&quot;com.mjs.mojisishop.entity.ItemCat&quot; useGeneratedKeys=&quot;true&quot; keyProperty=&quot;id&quot;&amp;gt; i原创 2019-01-25 09:22:03 · 197 阅读 · 0 评论 -
mybatis中in对一个string数组取值
@Select("select * from discount_code where id in (${disCode})") List<DiscountCodeInfo> selectByIds(@Param("disCode") String disCode);原创 2019-08-13 16:33:52 · 1995 阅读 · 0 评论