随笔分类 - 数据库
摘要:使用宝塔软件安装的redis 一直没启动起来。 使用 journalctl -xe 命令查看原因,发现redis.pid已经存在。 进入该目录,删除redis.pid。 再使用systemctl start redis 启动成功
阅读全文
摘要:插入: db.inventory.insert( { _id: 10, type: "misc", item: "card", qty: 15 } ) db.inventory.update( { type: "book", item : "journal" }, { $set : { qty: 1
阅读全文
摘要:1601-01-01 到 9999-01-01 当业务需求中只需要精确到天时, 可以用这个时间格式 1601-01-01 00:00:00 到 9999-12-31 23:59:59 当业务需求中需要精确到秒时, 可以用这个时间格式 1601-01-01 00:00:00 到 9999-12-31
阅读全文
摘要:1. sql中字符串拼接 SELECT * FROM tableName WHERE name LIKE CONCAT(CONCAT('%', #{text}), '%'); 2. 使用 ${...} 代替 #{...} SELECT * FROM tableName WHERE name LIKE
阅读全文
摘要:org.apache.ibatis.builder.IncompleteElementException: Could not find result map。。。。。。。 网上的大部分的改正方法是: 错误写法 <select id="queryXXXCount" resultMap="java.u
阅读全文
摘要:db.getCollection('costitems').find({"created":{"$gte":ISODate("2019-01-02T00:00:00Z"),"$lte":ISODate("2019-03-03T00:00:00Z")} ,financialSourceType:"xx
阅读全文