parent
0c4e8411f1
commit
a6af5c621e
14 changed files with 80 additions and 51 deletions
@ -0,0 +1,23 @@ |
||||
package com.lq.entity; |
||||
|
||||
import com.lq.code.entity.IdEntity; |
||||
|
||||
/** |
||||
* 微信公众号设置表 |
||||
*/ |
||||
public class WechatInfoSetting extends IdEntity { |
||||
|
||||
/** |
||||
* 微信公众号ID |
||||
*/ |
||||
private Long wechatInfoId; |
||||
|
||||
|
||||
public Long getWechatInfoId() { |
||||
return wechatInfoId; |
||||
} |
||||
|
||||
public void setWechatInfoId(Long wechatInfoId) { |
||||
this.wechatInfoId = wechatInfoId; |
||||
} |
||||
} |
@ -1,32 +0,0 @@ |
||||
1.数据库表与mapping.xml一一对应。 |
||||
2.dao层代码密度低,dao层代码尽量通用,以工具类形式使用。便于代码重用 |
||||
3.service 通过组合复用dao层工具类,实现业务逻辑 |
||||
4.controller 只负责简单的数据接受和转发。以及页面跳转的控制 |
||||
|
||||
mapping xml 文件模板 |
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!DOCTYPE mapper |
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="类名"> |
||||
<!-- namespace命名空间,作用是对sql进行分类化管理,理解sql隔离 --> |
||||
<!-- 注意:使用mapper代理方法开发 ,namespace有着特殊作用--> |
||||
|
||||
<select id="方法名" resultType="类名"> |
||||
SELECT * FROM `表明` |
||||
</select> |
||||
|
||||
<insert id="save" parameterType="类名" useGeneratedKeys="true" keyProperty="id"> |
||||
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="long"> |
||||
SELECT LAST_INSERT_ID() |
||||
</selectKey> |
||||
INSERT INTO |
||||
|
||||
VALUES |
||||
|
||||
</insert> |
||||
|
||||
|
||||
|
||||
</mapper> |
Loading…
Reference in new issue