suochencheng 7 år sedan
förälder
incheckning
a0706f63fe

+ 24 - 1
src/main/java/com/izouma/awesomeadmin/dao/FeedbackMapper.xml

@@ -13,6 +13,7 @@
                                 <result column="telephone" property="telephone" jdbcType="VARCHAR" />
                                 <result column="remark" property="remark" jdbcType="VARCHAR" />
                                 <result column="image" property="image" jdbcType="VARCHAR" />
+                                <result column="email" property="email" jdbcType="VARCHAR" />
             </resultMap>
     <sql id="Base_Column_List" >
         <trim  suffixOverrides="," >
@@ -38,6 +39,8 @@
 
             image,
 
+            email,
+
             </trim>
     </sql>
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
@@ -85,6 +88,9 @@
             </if>
                 <if test="image!= null" >
                 image,
+            </if>
+                <if test="email!= null" >
+                email,
             </if>
             </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -120,6 +126,9 @@
             </if>
                     <if test="image != null" >
                 #{image,jdbcType=VARCHAR},
+            </if>
+                    <if test="email != null" >
+                #{email,jdbcType=VARCHAR},
             </if>
                 </trim>
     </insert>
@@ -158,6 +167,9 @@
             </if>
                      <if test="image != null" >
                image= #{image,jdbcType=VARCHAR},
+            </if>
+                     <if test="email != null" >
+               email= #{email,jdbcType=VARCHAR},
             </if>
                  </set>
         where
@@ -209,6 +221,9 @@
             </if>
                      <if test="record.image != null and !&quot;&quot;.equals(record.image)">
                 and  image = #{record.image}
+            </if>
+                     <if test="record.email != null and !&quot;&quot;.equals(record.email)">
+                and  email = #{record.email}
             </if>
                   <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
              <trim prefix="and (" suffix=")" prefixOverrides="OR" >
@@ -216,6 +231,7 @@
                                                                                                     OR  telephone LIKE concat('%',#{record.searchKey},'%')
                                                                                                     OR  remark LIKE concat('%',#{record.searchKey},'%')
                                                                                                     OR  image LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  email LIKE concat('%',#{record.searchKey},'%')
                                                              </trim>
          </if>
 
@@ -310,6 +326,9 @@
             </if>
                     <if test="image != null and !&quot;&quot;.equals(image)">
                 and  image = #{image}
+            </if>
+                    <if test="email != null and !&quot;&quot;.equals(email)">
+                and  email = #{email}
             </if>
                     <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR" >
@@ -317,6 +336,7 @@
                                                                                                                                                         OR  telephone LIKE concat('%',#{searchKey},'%')
                                                                                                                                                         OR  remark LIKE concat('%',#{searchKey},'%')
                                                                                                                                                         OR  image LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  email LIKE concat('%',#{searchKey},'%')
                                                                                         </trim>
             </if>
 <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
@@ -407,6 +427,9 @@
             </if>
                      <if test="image != null and !&quot;&quot;.equals(image)">
                 and image = #{image}
+            </if>
+                     <if test="email != null and !&quot;&quot;.equals(email)">
+                and email = #{email}
             </if>
          
         </where>
@@ -427,7 +450,7 @@
         select <include refid="Base_Column_List"/> from feedback
         <where>
             and del_flag = 'N'
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </where>
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </where>
         order by id desc
     </select>
 </mapper>

+ 8 - 0
src/main/java/com/izouma/awesomeadmin/model/Feedback.java

@@ -19,6 +19,7 @@ public class Feedback{
     private String telephone;
     private String remark;
     private String image;
+    private String email;
 
 private String idStr;
 
@@ -111,6 +112,13 @@ private String orderByStr;
     public void setImage(String image){
         this.image = image;
     }
+    public String getEmail(){
+        return this.email;
+    }
+
+    public void setEmail(String email){
+        this.email = email;
+    }
 
 public String getSearchKey() {
     return searchKey;

+ 5 - 4
src/main/java/com/izouma/awesomeadmin/web/FeedbackController.java

@@ -132,10 +132,10 @@ public class FeedbackController {
         String sheetName = "feedback";
         String titleName = "反馈数据表";
         String fileName = "反馈表";
-        int columnNumber = 11;
-        int[] columnWidth = { 20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20 };
-        String[] columnName = {  "" ,   "删除标识" ,   "更新时间" ,   "更新人" ,   "创建时间" ,   "创建人" ,   "用户" ,   "姓名" ,   "电话" ,   "描述" ,   "图片"  };
-        String[][] dataList = new String[feedbacks.size()][11];
+        int columnNumber = 12;
+        int[] columnWidth = { 20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20 };
+        String[] columnName = {  "" ,   "删除标识" ,   "更新时间" ,   "更新人" ,   "创建时间" ,   "创建人" ,   "用户" ,   "姓名" ,   "电话" ,   "描述" ,   "图片" ,   "邮箱"  };
+        String[][] dataList = new String[feedbacks.size()][12];
 
         for (int i = 0; i < feedbacks.size(); i++) {
 
@@ -150,6 +150,7 @@ public class FeedbackController {
                         dataList[i][8] = String.valueOf(feedbacks.get(i).getTelephone());
                         dataList[i][9] = String.valueOf(feedbacks.get(i).getRemark());
                         dataList[i][10] = String.valueOf(feedbacks.get(i).getImage());
+                        dataList[i][11] = String.valueOf(feedbacks.get(i).getEmail());
                     }
 
 

+ 8 - 5
src/main/vue/src/pages/Feedback.vue

@@ -14,7 +14,10 @@
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          <el-form-item prop="image" label="图片">
                  <single-upload v-model="formData.image" :disabled="'image'==subColumn"></single-upload>
              </el-form-item>
-                                                                                                                                            <el-form-item>
+                                                                                                                                                                                <el-form-item prop="email" label="邮箱">
+                <el-input v-model="formData.email" :disabled="'email'==subColumn"></el-input>
+            </el-form-item>
+                                                                                                                                                                                                                                                                                        <el-form-item>
                 <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
                 <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
                 <el-button @click="$router.go(-1)">取消</el-button>
@@ -41,7 +44,7 @@
                 }).then(res => {
                     if (res.success) {
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                         this.formData = res.data;
 
                     if (this.$route.query.column) {
@@ -55,14 +58,14 @@
                 }
             }
 
-                                                                                                                                                                                                                                                                                                                                        },
+                                                                                                                                                                                                                                                                                                                                                                    },
         data() {
             return {
                 saving: false,
                 formData: {},
                 rules: {
-                                                                                                                                                                                                                                                                                                                                        },
-                                                                                                    subColumn: '',
+                                                                                                                                                                                                                                                                                                                                                                    },
+                                                                                                            subColumn: '',
             subValue: '',
         }
         },

+ 17 - 1
src/main/vue/src/pages/Feedbacks.vue

@@ -90,7 +90,14 @@
                             </template>
 
                         </el-table-column>
-                                                                <el-table-column
+                                                                    
+                                            <el-table-column
+                                v-if="isColumnShow('email')"
+                                prop="email"
+                                label="邮箱"
+                                min-width="100">
+                        </el-table-column>
+                                                            <el-table-column
                     label="操作"
                     align="center"
                     fixed="right"
@@ -261,6 +268,11 @@
                                 label: '图片',
                                 value: 'image',
                                 show: true
+                            },
+                                                                                                {
+                                label: '邮箱',
+                                value: 'email',
+                                show: true
                             },
                                                             ],
                 multipleMode: false,
@@ -293,6 +305,10 @@
                                                                                                 {
                                 label: '图片',
                                 value: 'image'
+                            },
+                                                                                                {
+                                label: '邮箱',
+                                value: 'email'
                             },
                                                             ],
                 advancedQuerySearchKey: '',