Browse Source

git-svn-id: https://192.168.57.71/svn/jsgkj@571 931142cf-59ea-a443-aa0e-51397b428577

xt_yuanxd 9 năm trước cách đây
mục cha
commit
9756420bd1

+ 1 - 1
gkaqv2/trunk/modules/common/pom.xml

@@ -5,7 +5,7 @@
 	<artifactId>gkaq-common</artifactId>
 	<version>0.0.1-SNAPSHOT</version>
 	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<project.build.sourceEncoding>GBK</project.build.sourceEncoding>
 		<!-- java 版本 -->
 		<jdk.version>1.7</jdk.version>
 	</properties>

+ 7 - 7
gkaqv2/trunk/modules/common/src/main/java/com/xt/js/gkaq/common/BaseMapper.java

@@ -3,16 +3,16 @@ package com.xt.js.gkaq.common;
 import java.util.List;
 
 /**
- * Mapper鍩虹被
+ * Mapper基类
  * 
- * @author 琚佹檽鍐�
+ * @author 袁晓冬
  *
  * @param <T>
  */
 public interface BaseMapper<T> {
 
     /**
-     * 鏍规嵁涓婚敭鐗╃悊鍒犻櫎璁板綍
+     * 根据主键物理删除记录
      * 
      * @param id
      *            String
@@ -21,7 +21,7 @@ public interface BaseMapper<T> {
     int deleteByPrimaryKey(String id);
 
     /**
-     * 鏂板�璁板綍
+     * 新增记录
      * 
      * @param record
      *            T
@@ -30,7 +30,7 @@ public interface BaseMapper<T> {
     int insert(T record);
 
     /**
-     * 鏍规嵁涓婚敭鏌ユ壘璁板綍
+     * 根据主键查找记录
      * 
      * @param id
      *            String
@@ -39,14 +39,14 @@ public interface BaseMapper<T> {
     T selectByPrimaryKey(String id);
 
     /**
-     * 妫€绱㈡墍鏈夎�褰曪紝鍖呮嫭璁板綍鐘舵€佷负鍒犻櫎鐨勮�褰�
+     * 检索所有记录,包括记录状态为删除的记录
      * 
      * @return List<T>
      */
     List<T> selectAll();
 
     /**
-     * 鏍规嵁涓婚敭鏇存柊璁板綍
+     * 根据主键更新记录
      * 
      * @param record
      *            T

+ 7 - 7
gkaqv2/trunk/modules/common/src/main/java/com/xt/js/gkaq/common/BaseService.java

@@ -3,16 +3,16 @@ package com.xt.js.gkaq.common;
 import java.util.List;
 
 /**
- * Mapper鍩虹被
+ * Mapper基类
  * 
- * @author 琚佹檽鍐�
+ * @author 袁晓冬
  *
  * @param <T>
  */
 public interface BaseService<T> {
 
 	/**
-	 * 鏍规嵁涓婚敭鐗╃悊鍒犻櫎璁板綍
+	 * 根据主键物理删除记录
 	 * 
 	 * @param id
 	 *            String
@@ -21,7 +21,7 @@ public interface BaseService<T> {
 	int deleteByID(String id);
 
 	/**
-	 * 鏂板�璁板綍
+	 * 新增记录
 	 * 
 	 * @param record
 	 *            T
@@ -30,7 +30,7 @@ public interface BaseService<T> {
 	int add(T record);
 
 	/**
-	 * 鏍规嵁涓婚敭鏌ユ壘璁板綍
+	 * 根据主键查找记录
 	 * 
 	 * @param id
 	 *            String
@@ -39,14 +39,14 @@ public interface BaseService<T> {
 	T findById(String id);
 
 	/**
-	 * 妫€绱㈡墍鏈夎�褰曪紝鍖呮嫭璁板綍鐘舵€佷负鍒犻櫎鐨勮�褰�
+	 * 检索所有记录,包括记录状态为删除的记录
 	 * 
 	 * @return List<T>
 	 */
 	List<T> findAll();
 
 	/**
-	 * 鏍规嵁涓婚敭鏇存柊璁板綍
+	 * 根据主键更新记录
 	 * 
 	 * @param record
 	 *            T

+ 5 - 5
gkaqv2/trunk/modules/common/src/main/java/com/xt/js/gkaq/common/BaseServiceImpl.java

@@ -5,29 +5,29 @@ import java.util.List;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
- * �务层共通基类
+ * ·þÎñ²ã¹²Í¨»ùÀà
  * 
- * @author �晓冬
+ * @author Ô¬Ïþ¶¬
  *
  * @param <T>
  */
 public abstract class BaseServiceImpl<T> implements BaseService<T> {
 	/**
-	 * 获�数�库�作接�
+	 * »ñÈ¡Êý¾Ý¿â²Ù×÷½Ó¿Ú
 	 * 
 	 * @return
 	 */
 	protected abstract BaseMapper<T> getMapper();
 
 	/**
-	 * 获�检查过的Mapper对象
+	 * »ñÈ¡¼ì²é¹ýµÄMapper¶ÔÏó
 	 * 
 	 * @return
 	 */
 	private BaseMapper<T> getCheckedMapper() {
 		BaseMapper<T> mapper = getMapper();
 		if (null == mapper) {
-			throw new RuntimeException("mapper �能为空�");
+			throw new RuntimeException("mapper ²»ÄÜΪ¿Õ£¡");
 		}
 		return mapper;
 	}