提交 | 用户 | age
|
51ec88
|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
A |
2 |
<!DOCTYPE mapper |
|
3 |
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
4 |
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
5 |
<!-- namespace:该mapper.xml映射文件的 唯一标识 --> |
|
6 |
<mapper namespace="com.hx.phip.dao.mapper.ComparePhotoRecordMapper"> |
|
7 |
|
|
8 |
<!-- 整个实体类修改,表字段=实体类字段--> |
|
9 |
<sql id="Update_Column_All"> |
|
10 |
<trim prefixOverrides=","> |
52e01a
|
11 |
,userId = #{userId},projectId = #{projectId},projectFrequency = #{projectFrequency},type = #{type},remark = #{remark},userProjectId = #{userProjectId},deductionProjectId = #{deductionProjectId},deductionSingleId = #{deductionSingleId},isDel = #{isDel},createTime = #{createTime} |
51ec88
|
12 |
</trim> |
A |
13 |
</sql> |
|
14 |
|
|
15 |
<!-- 后续通过 namespace.id--> |
|
16 |
<!--parameterType:输入参数的类型 |
|
17 |
resultType:查询返回结果值的类型 ,返回类型 --> |
|
18 |
<insert id="insert" parameterType="com.hx.phiappt.model.ComparePhotoRecord"> |
|
19 |
<selectKey keyProperty="id" resultType="String" order="BEFORE"> |
|
20 |
select replace(uuid(),'-','') from dual |
|
21 |
</selectKey> |
52e01a
|
22 |
insert into compare_photo_record (id,userId,projectId,projectFrequency,type,remark,userProjectId,deductionProjectId,deductionSingleId,isDel,createTime) values (#{id},#{userId},#{projectId},#{projectFrequency},#{type},#{remark},#{userProjectId},#{deductionProjectId},#{deductionSingleId},#{isDel},#{createTime}) |
51ec88
|
23 |
</insert> |
A |
24 |
|
|
25 |
<select id="selectList" resultType="com.hx.phiappt.model.ComparePhotoRecord" parameterType="com.hx.mybatisTool.SqlSentence" > |
|
26 |
${sqlSentence} |
|
27 |
</select> |
|
28 |
|
|
29 |
<select id="selectListMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
|
30 |
${sqlSentence} |
|
31 |
</select> |
|
32 |
|
|
33 |
<select id="selectOne" resultType="com.hx.phiappt.model.ComparePhotoRecord" parameterType="com.hx.mybatisTool.SqlSentence" > |
|
34 |
${sqlSentence} |
|
35 |
</select> |
|
36 |
|
|
37 |
<select id="selectOneMap" resultType="java.util.Map" parameterType="com.hx.mybatisTool.SqlSentence" > |
|
38 |
${sqlSentence} |
|
39 |
</select> |
|
40 |
|
|
41 |
<select id="selectCount" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
|
42 |
select |
|
43 |
COUNT(*) |
|
44 |
from compare_photo_record |
|
45 |
WHERE ${sqlSentence} |
|
46 |
</select> |
|
47 |
|
|
48 |
<select id="selectCountSql" resultType="int" parameterType="com.hx.mybatisTool.SqlSentence" > |
|
49 |
${sqlSentence} |
|
50 |
</select> |
|
51 |
|
b3afa9
|
52 |
<select id="selectOneByDeductionSingleId" resultType="com.hx.phiappt.model.ComparePhotoRecord" > |
A |
53 |
select |
|
54 |
* |
|
55 |
from compare_photo_record |
|
56 |
WHERE isDel=0 AND deductionProjectId = #{deductionProjectId} AND deductionSingleId = #{deductionSingleId} |
|
57 |
</select> |
|
58 |
|
51ec88
|
59 |
<select id="selectOneByKey" resultType="com.hx.phiappt.model.ComparePhotoRecord" parameterType="java.lang.Object" > |
A |
60 |
select |
52e01a
|
61 |
id,userId,projectId,projectFrequency,type,remark,userProjectId,deductionProjectId,deductionSingleId,isDel,createTime |
51ec88
|
62 |
from compare_photo_record |
A |
63 |
WHERE id = #{value} |
|
64 |
</select> |
|
65 |
|
|
66 |
<select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.ComparePhotoRecord" parameterType="java.lang.Object" > |
|
67 |
select |
52e01a
|
68 |
id,userId,projectId,projectFrequency,type,remark,userProjectId,deductionProjectId,deductionSingleId,isDel,createTime |
51ec88
|
69 |
from compare_photo_record |
A |
70 |
WHERE id = #{value} |
|
71 |
</select> |
|
72 |
|
|
73 |
<update id="updateWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
|
74 |
update |
|
75 |
compare_photo_record |
|
76 |
SET ${sqlSentence} |
|
77 |
</update> |
|
78 |
|
|
79 |
<update id="updateAll" parameterType="com.hx.phiappt.model.ComparePhotoRecord"> |
|
80 |
update compare_photo_record |
|
81 |
SET <include refid="Update_Column_All"/> |
|
82 |
WHERE id = #{id} |
|
83 |
</update> |
|
84 |
|
|
85 |
<delete id="deleteWhere" parameterType="com.hx.mybatisTool.SqlSentence"> |
|
86 |
delete from compare_photo_record WHERE ${sqlSentence} |
|
87 |
</delete> |
|
88 |
|
|
89 |
<delete id="deleteById" parameterType="java.lang.Object"> |
|
90 |
delete from compare_photo_record WHERE id = #{value} |
|
91 |
</delete> |
|
92 |
|
|
93 |
</mapper> |