Przeglądaj źródła

数据库表清理,代码优化整理

anderx 7 lat temu
rodzic
commit
13796ac734

+ 4 - 6
src/main/java/com/goafanti/admin/service/impl/AttachmentServiceImpl.java

@@ -1,24 +1,22 @@
 package com.goafanti.admin.service.impl;
 
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.goafanti.admin.service.AttachmentService;
-import com.goafanti.common.dao.AttachmentMapper;
 import com.goafanti.common.model.Attachment;
 @Service
 public class AttachmentServiceImpl implements AttachmentService {
-	@Autowired
-	private AttachmentMapper aftFileMapper;
+	
 
 	@Override
 	public Attachment insert(Attachment f) {
-		aftFileMapper.insert(f);
+//		aftFileMapper.insert(f);
 		return f;
 	}
 
 	@Override
 	public Attachment selectAftFileBySign(String sign) {
-		return aftFileMapper.selectAftFileBySign(sign);
+//		return aftFileMapper.selectAftFileBySign(sign);
+		return null;
 	}
 }

+ 0 - 19
src/main/java/com/goafanti/common/dao/AttachmentMapper.java

@@ -1,19 +0,0 @@
-package com.goafanti.common.dao;
-
-import com.goafanti.common.model.Attachment;
-
-public interface AttachmentMapper {
-    int deleteByPrimaryKey(String id);
-
-    int insert(Attachment record);
-
-    int insertSelective(Attachment record);
-
-    Attachment selectByPrimaryKey(String id);
-
-    int updateByPrimaryKeySelective(Attachment record);
-
-    int updateByPrimaryKey(Attachment record);
-
-    Attachment selectAftFileBySign(String sign);
-}

+ 0 - 124
src/main/java/com/goafanti/common/mapper/AttachmentMapper.xml

@@ -1,124 +0,0 @@
-<?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="com.goafanti.common.dao.AttachmentMapper" >
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.Attachment" >
-    <id column="id" property="id" jdbcType="VARCHAR" />
-    <result column="uid" property="uid" jdbcType="VARCHAR" />
-    <result column="file_name" property="fileName" jdbcType="VARCHAR" />
-    <result column="file_path" property="filePath" jdbcType="VARCHAR" />
-    <result column="sign" property="sign" jdbcType="VARCHAR" />
-    <result column="comment" property="comment" jdbcType="VARCHAR" />
-    <result column="deleleted_sign" property="deleletedSign" jdbcType="INTEGER" />
-  </resultMap>
-  <sql id="Base_Column_List" >
-    id, uid, file_name, file_path, sign, comment, deleleted_sign
-  </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
-    select 
-    <include refid="Base_Column_List" />
-    from attachment
-    where id = #{id,jdbcType=VARCHAR}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
-    delete from attachment
-    where id = #{id,jdbcType=VARCHAR}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.Attachment" >
-    insert into attachment (id, uid, file_name, 
-      file_path, sign, comment, 
-      deleleted_sign)
-    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR}, 
-      #{filePath,jdbcType=VARCHAR}, #{sign,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, 
-      #{deleletedSign,jdbcType=INTEGER})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.Attachment" >
-    insert into attachment
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
-        id,
-      </if>
-      <if test="uid != null" >
-        uid,
-      </if>
-      <if test="fileName != null" >
-        file_name,
-      </if>
-      <if test="filePath != null" >
-        file_path,
-      </if>
-      <if test="sign != null" >
-        sign,
-      </if>
-      <if test="comment != null" >
-        comment,
-      </if>
-      <if test="deleletedSign != null" >
-        deleleted_sign,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
-        #{id,jdbcType=VARCHAR},
-      </if>
-      <if test="uid != null" >
-        #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="fileName != null" >
-        #{fileName,jdbcType=VARCHAR},
-      </if>
-      <if test="filePath != null" >
-        #{filePath,jdbcType=VARCHAR},
-      </if>
-      <if test="sign != null" >
-        #{sign,jdbcType=VARCHAR},
-      </if>
-      <if test="comment != null" >
-        #{comment,jdbcType=VARCHAR},
-      </if>
-      <if test="deleletedSign != null" >
-        #{deleletedSign,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Attachment" >
-    update attachment
-    <set >
-      <if test="uid != null" >
-        uid = #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="fileName != null" >
-        file_name = #{fileName,jdbcType=VARCHAR},
-      </if>
-      <if test="filePath != null" >
-        file_path = #{filePath,jdbcType=VARCHAR},
-      </if>
-      <if test="sign != null" >
-        sign = #{sign,jdbcType=VARCHAR},
-      </if>
-      <if test="comment != null" >
-        comment = #{comment,jdbcType=VARCHAR},
-      </if>
-      <if test="deleletedSign != null" >
-        deleleted_sign = #{deleletedSign,jdbcType=INTEGER},
-      </if>
-    </set>
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Attachment" >
-    update attachment
-    set uid = #{uid,jdbcType=VARCHAR},
-      file_name = #{fileName,jdbcType=VARCHAR},
-      file_path = #{filePath,jdbcType=VARCHAR},
-      sign = #{sign,jdbcType=VARCHAR},
-      comment = #{comment,jdbcType=VARCHAR},
-      deleleted_sign = #{deleletedSign,jdbcType=INTEGER}
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
-  
-   <select id="selectAftFileBySign" resultMap="BaseResultMap" parameterType="java.lang.String" >
-    select 
-    <include refid="Base_Column_List" />
-    from attachment
-    where sign = #{sign,jdbcType=VARCHAR}
-  </select>
-</mapper>