Browse Source

轮播图

傅行帆 6 years ago
parent
commit
53f5036ca8

+ 17
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpCarouselSettingMapper.java View File

@@ -0,0 +1,17 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpCarouselSetting;
4
+
5
+public interface TpCarouselSettingMapper {
6
+    int deleteByPrimaryKey(Integer id);
7
+
8
+    int insert(TpCarouselSetting record);
9
+
10
+    int insertSelective(TpCarouselSetting record);
11
+
12
+    TpCarouselSetting selectByPrimaryKey(Integer id);
13
+
14
+    int updateByPrimaryKeySelective(TpCarouselSetting record);
15
+
16
+    int updateByPrimaryKey(TpCarouselSetting record);
17
+}

+ 43
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpCarouselSetting.java View File

@@ -0,0 +1,43 @@
1
+package com.community.huiju.model;
2
+
3
+public class TpCarouselSetting {
4
+    private Integer id;
5
+
6
+    private Integer communityId;
7
+
8
+    private String carouselType;
9
+
10
+    private Integer carouselNum;
11
+
12
+    public Integer getId() {
13
+        return id;
14
+    }
15
+
16
+    public void setId(Integer id) {
17
+        this.id = id;
18
+    }
19
+
20
+    public Integer getCommunityId() {
21
+        return communityId;
22
+    }
23
+
24
+    public void setCommunityId(Integer communityId) {
25
+        this.communityId = communityId;
26
+    }
27
+
28
+    public String getCarouselType() {
29
+        return carouselType;
30
+    }
31
+
32
+    public void setCarouselType(String carouselType) {
33
+        this.carouselType = carouselType == null ? null : carouselType.trim();
34
+    }
35
+
36
+    public Integer getCarouselNum() {
37
+        return carouselNum;
38
+    }
39
+
40
+    public void setCarouselNum(Integer carouselNum) {
41
+        this.carouselNum = carouselNum;
42
+    }
43
+}

+ 82
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpCarouselSettingMapper.xml View File

@@ -0,0 +1,82 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.TpCarouselSettingMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpCarouselSetting" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="carousel_type" property="carouselType" jdbcType="VARCHAR" />
8
+    <result column="carousel_num" property="carouselNum" jdbcType="INTEGER" />
9
+  </resultMap>
10
+  <sql id="Base_Column_List" >
11
+    id, community_id, carousel_type, carousel_num
12
+  </sql>
13
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
14
+    select 
15
+    <include refid="Base_Column_List" />
16
+    from tp_carousel_setting
17
+    where id = #{id,jdbcType=INTEGER}
18
+  </select>
19
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
20
+    delete from tp_carousel_setting
21
+    where id = #{id,jdbcType=INTEGER}
22
+  </delete>
23
+  <insert id="insert" parameterType="com.community.huiju.model.TpCarouselSetting" >
24
+    insert into tp_carousel_setting (id, community_id, carousel_type, 
25
+      carousel_num)
26
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{carouselType,jdbcType=VARCHAR}, 
27
+      #{carouselNum,jdbcType=INTEGER})
28
+  </insert>
29
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpCarouselSetting" >
30
+    insert into tp_carousel_setting
31
+    <trim prefix="(" suffix=")" suffixOverrides="," >
32
+      <if test="id != null" >
33
+        id,
34
+      </if>
35
+      <if test="communityId != null" >
36
+        community_id,
37
+      </if>
38
+      <if test="carouselType != null" >
39
+        carousel_type,
40
+      </if>
41
+      <if test="carouselNum != null" >
42
+        carousel_num,
43
+      </if>
44
+    </trim>
45
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
46
+      <if test="id != null" >
47
+        #{id,jdbcType=INTEGER},
48
+      </if>
49
+      <if test="communityId != null" >
50
+        #{communityId,jdbcType=INTEGER},
51
+      </if>
52
+      <if test="carouselType != null" >
53
+        #{carouselType,jdbcType=VARCHAR},
54
+      </if>
55
+      <if test="carouselNum != null" >
56
+        #{carouselNum,jdbcType=INTEGER},
57
+      </if>
58
+    </trim>
59
+  </insert>
60
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpCarouselSetting" >
61
+    update tp_carousel_setting
62
+    <set >
63
+      <if test="communityId != null" >
64
+        community_id = #{communityId,jdbcType=INTEGER},
65
+      </if>
66
+      <if test="carouselType != null" >
67
+        carousel_type = #{carouselType,jdbcType=VARCHAR},
68
+      </if>
69
+      <if test="carouselNum != null" >
70
+        carousel_num = #{carouselNum,jdbcType=INTEGER},
71
+      </if>
72
+    </set>
73
+    where id = #{id,jdbcType=INTEGER}
74
+  </update>
75
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpCarouselSetting" >
76
+    update tp_carousel_setting
77
+    set community_id = #{communityId,jdbcType=INTEGER},
78
+      carousel_type = #{carouselType,jdbcType=VARCHAR},
79
+      carousel_num = #{carouselNum,jdbcType=INTEGER}
80
+    where id = #{id,jdbcType=INTEGER}
81
+  </update>
82
+</mapper>