albertshaw 8 years ago
parent
commit
1317aaa0cf
23 changed files with 1310 additions and 67 deletions
  1. 31 0
      schema/2017-03-14.sql
  2. 10 0
      src/main/java/com/goafanti/admin/controller/CopyrightApiController.java
  3. 59 59
      src/main/java/com/goafanti/common/constant/ErrorConstants.java
  4. 26 0
      src/main/java/com/goafanti/common/controller/CertifyApiController.java
  5. 17 0
      src/main/java/com/goafanti/common/dao/CopyrightInfoMapper.java
  6. 17 0
      src/main/java/com/goafanti/common/dao/CopyrightLogMapper.java
  7. 59 0
      src/main/java/com/goafanti/common/enums/CopyrightFields.java
  8. 53 0
      src/main/java/com/goafanti/common/enums/CopyrightStatus.java
  9. 52 0
      src/main/java/com/goafanti/common/enums/UserLevel.java
  10. 52 0
      src/main/java/com/goafanti/common/enums/UserType.java
  11. 212 0
      src/main/java/com/goafanti/common/mapper/CopyrightInfoMapper.xml
  12. 117 0
      src/main/java/com/goafanti/common/mapper/CopyrightLogMapper.xml
  13. 6 3
      src/main/java/com/goafanti/common/model/BaseModel.java
  14. 162 0
      src/main/java/com/goafanti/common/model/CopyrightInfo.java
  15. 89 0
      src/main/java/com/goafanti/common/model/CopyrightLog.java
  16. 137 0
      src/main/java/com/goafanti/copyright/bo/InputCopyright.java
  17. 65 0
      src/main/java/com/goafanti/copyright/controller/CopyrightApiController.java
  18. 19 0
      src/main/java/com/goafanti/copyright/service/CopyrightInfoService.java
  19. 15 0
      src/main/java/com/goafanti/copyright/service/CopyrightLogService.java
  20. 61 0
      src/main/java/com/goafanti/copyright/service/impl/CopyrightInfoServiceImpl.java
  21. 28 0
      src/main/java/com/goafanti/copyright/service/impl/CopyrightLogServiceImpl.java
  22. 14 0
      src/main/java/com/goafanti/core/shiro/token/TokenManager.java
  23. 9 5
      src/main/resources/props/error.properties

+ 31 - 0
schema/2017-03-14.sql

@@ -0,0 +1,31 @@
+CREATE TABLE `aft_dev`.`copyright_info` (
+  `id` VARCHAR(36) NOT NULL COMMENT '主键',
+  `uid` VARCHAR(36) NOT NULL COMMENT '用户主键',
+  `serial_number` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
+  `create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `accept_time` DATETIME NULL COMMENT '受理时间',
+  `principal` VARCHAR(36) NULL COMMENT '负责人id',
+  `contact` INT(1) NULL COMMENT '联系人序号',
+  `copyright_info` VARCHAR(255) NULL COMMENT '软著简介',
+  `copyright_name` VARCHAR(60) NULL COMMENT '软著名字',
+  `status` INT(1) NULL COMMENT '申请状态',
+  `work_issue` VARCHAR(128) NULL COMMENT '派单信息',
+  `comment` VARCHAR(128) NULL COMMENT '当前备注',
+  `outsource` VARCHAR(60) NULL COMMENT '外包信息',
+  `in_urgent` INT(3) NULL COMMENT '加急天数',
+  `authorized_date` DATETIME NULL COMMENT '下证时间',
+  PRIMARY KEY (`id`),
+  UNIQUE INDEX `serial_number_UNIQUE` (`serial_number` ASC)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `copyright_log` (
+  `id` varchar(36) NOT NULL COMMENT '主键',
+  `cid` varchar(36) NOT NULL COMMENT '软著申请id',
+  `record_time` datetime DEFAULT NULL COMMENT '操作时间',
+  `status` int(1) DEFAULT NULL COMMENT '状态',
+  `principal` varchar(36) DEFAULT NULL COMMENT '负责人',
+  `operator` varchar(36) DEFAULT NULL COMMENT '操作人',
+  `comment` varchar(45) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`),
+  KEY `fk_copyright_log_copyright_info1_idx` (`cid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;

+ 10 - 0
src/main/java/com/goafanti/admin/controller/CopyrightApiController.java

@@ -0,0 +1,10 @@
+package com.goafanti.admin.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import com.goafanti.common.controller.BaseApiController;
+
+@RequestMapping(value = "/api/admin")
+public class CopyrightApiController extends BaseApiController {
+	
+}

+ 59 - 59
src/main/java/com/goafanti/common/constant/ErrorConstants.java

@@ -2,64 +2,64 @@ package com.goafanti.common.constant;
 
 public class ErrorConstants {
 
-	public static final String NON_LOGIN = "NON_LOGIN";
-
-	public static final String VCODE_ERROR = "VCODE_ERROR";
-
-	public static final String EMAIL_SIZE_ERROR = "EMAIL_SIZE_ERROR";
-
-	public static final String EMAIL_PATTERN_ERROR = "EMAIL_PATTERN_ERROR";
-
-	public static final String DUNPLICATE_KAY_ERROR = "DUNPLICATE_KAY_ERROR";
-
-	public static final String PARAM_INTEGER_ERROR = "PARAM_INTEGER_ERROR";
-
-	public static final String PARAM_EMPTY_ERROR = "PARAM_EMPTY_ERROR";
-
-	public static final String PARAM_SIZE_ERROR = "PARAM_SIZE_ERROR";
-
-	public static final String PARAM_PATTERN_ERROR = "PARAM_PATTERN_ERROR";
-
-	public static final String DATA_EMPTY_ERROR = "DATA_EMPTY_ERROR";
-
-	public static final String PWD_NOT_MATCH_ERROR = "PWD_NOT_MATCH_ERROR";
-	
-	public static final String PWD_SAME_ERROR = "PWD_SAME_ERROR";
-	
-	public static final String USER_ALREADY_EXIST = "USER_ALREADY_EXIST";
-	
-	public static final String MOBILE_PATTERN_ERROR = "MOBILE_PATTERN_ERROR";
-	
-	public static final String MOBILE_SIZE_ERROR = "MOBILE_SIZE_ERROR";
-	
-	public static final String MOBILE_SAME_ERROR = "MOBILE_SAME_ERROR";
-	
-	public static final String MOBILE_EMPTY_ERROR = "MOBILE_EMPTY_ERROR";
-	
-	public static final String IDNUMBER_SIZE_ERROR = "IDNUMBER_SIZE_ERROR";
-	
-	public static final String IDNUMBER_PATTERN_ERROR = "IDNUMBER_PATTERN_ERROR";
-	
-	public static final String MCODE_ERROR = "MCODE_ERROR";
-	
-	public static final String MCODE_OVERTIME_ERROR = "MCODE_OVERTIME_ERROR";
-	
-	public static final String NON_REGISTER = "NON_REGISTER";
-	
-	public static final String RESET_CODE_ERROR = "RESET_CODE_ERROR";
-	
-	public static final String RESET_CODE_OVERTIME = "RESET_CODE_OVERTIME";
-	
-	public static final String FILE_NON_EXISTENT = "FILE_NON_EXISTENT";
-	
-	public static final String INSUFFICIENT_AUTHORITY_ERROR = "INSUFFICIENT_AUTHORITY_ERROR";
-	
-	public static final String NON_CERTIFIED = "NON_CERTIFIED";
-	
-	public static final String DUPLICATE_DATA_ERROR = "DUPLICATE_DATA_ERROR";
-	
-	public static final String FILE_PATTERN_ERROR = "FILE_PATTERN_ERROR";
-	
-	
+	public static final String	NON_LOGIN						= "NON_LOGIN";
+
+	public static final String	VCODE_ERROR						= "VCODE_ERROR";
+
+	public static final String	PARAM_ERROR						= "PARAM_ERROR";
+
+	public static final String	PARAM_INTEGER_ERROR				= "PARAM_INTEGER_ERROR";
+
+	public static final String	PARAM_EMPTY_ERROR				= "PARAM_EMPTY_ERROR";
+
+	public static final String	PARAM_SIZE_ERROR				= "PARAM_SIZE_ERROR";
+
+	public static final String	PARAM_PATTERN_ERROR				= "PARAM_PATTERN_ERROR";
+
+	public static final String	EMAIL_SIZE_ERROR				= "EMAIL_SIZE_ERROR";
+
+	public static final String	EMAIL_PATTERN_ERROR				= "EMAIL_PATTERN_ERROR";
+
+	public static final String	DUNPLICATE_KAY_ERROR			= "DUNPLICATE_KAY_ERROR";
+
+	public static final String	DATA_EMPTY_ERROR				= "DATA_EMPTY_ERROR";
+
+	public static final String	PWD_NOT_MATCH_ERROR				= "PWD_NOT_MATCH_ERROR";
+
+	public static final String	PWD_SAME_ERROR					= "PWD_SAME_ERROR";
+
+	public static final String	USER_ALREADY_EXIST				= "USER_ALREADY_EXIST";
+
+	public static final String	MOBILE_PATTERN_ERROR			= "MOBILE_PATTERN_ERROR";
+
+	public static final String	MOBILE_SIZE_ERROR				= "MOBILE_SIZE_ERROR";
+
+	public static final String	MOBILE_SAME_ERROR				= "MOBILE_SAME_ERROR";
+
+	public static final String	MOBILE_EMPTY_ERROR				= "MOBILE_EMPTY_ERROR";
+
+	public static final String	IDNUMBER_SIZE_ERROR				= "IDNUMBER_SIZE_ERROR";
+
+	public static final String	IDNUMBER_PATTERN_ERROR			= "IDNUMBER_PATTERN_ERROR";
+
+	public static final String	MCODE_ERROR						= "MCODE_ERROR";
+
+	public static final String	MCODE_OVERTIME_ERROR			= "MCODE_OVERTIME_ERROR";
+
+	public static final String	NON_REGISTER					= "NON_REGISTER";
+
+	public static final String	RESET_CODE_ERROR				= "RESET_CODE_ERROR";
+
+	public static final String	RESET_CODE_OVERTIME				= "RESET_CODE_OVERTIME";
+
+	public static final String	FILE_NON_EXISTENT				= "FILE_NON_EXISTENT";
+
+	public static final String	INSUFFICIENT_AUTHORITY_ERROR	= "INSUFFICIENT_AUTHORITY_ERROR";
+
+	public static final String	NON_CERTIFIED					= "NON_CERTIFIED";
+
+	public static final String	DUPLICATE_DATA_ERROR			= "DUPLICATE_DATA_ERROR";
+
+	public static final String	FILE_PATTERN_ERROR				= "FILE_PATTERN_ERROR";
 
 }

+ 26 - 0
src/main/java/com/goafanti/common/controller/CertifyApiController.java

@@ -0,0 +1,26 @@
+package com.goafanti.common.controller;
+
+import javax.annotation.Resource;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.enums.UserLevel;
+import com.goafanti.common.model.User;
+import com.goafanti.user.service.OrganizationIdentityService;
+import com.goafanti.user.service.UserIdentityService;
+
+public class CertifyApiController extends BaseApiController {
+	@Resource
+	private OrganizationIdentityService	organizationIdentityService;
+	@Resource
+	private UserIdentityService			userIdentityService;
+
+	public boolean checkCertify(Result res, User user) {
+		if (UserLevel.getStatus(user.getLvl()).equals(UserLevel.GENERAL)) {
+			res.getError().add(buildError(ErrorConstants.NON_CERTIFIED, "未通过实名认证,无法操作!"));
+			return false;
+		}
+		return true;
+	}
+
+}

+ 17 - 0
src/main/java/com/goafanti/common/dao/CopyrightInfoMapper.java

@@ -0,0 +1,17 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.CopyrightInfo;
+
+public interface CopyrightInfoMapper {
+    int deleteByPrimaryKey(String id);
+
+    int insert(CopyrightInfo record);
+
+    int insertSelective(CopyrightInfo record);
+
+    CopyrightInfo selectByPrimaryKey(String id);
+
+    int updateByPrimaryKeySelective(CopyrightInfo record);
+
+    int updateByPrimaryKey(CopyrightInfo record);
+}

+ 17 - 0
src/main/java/com/goafanti/common/dao/CopyrightLogMapper.java

@@ -0,0 +1,17 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.CopyrightLog;
+
+public interface CopyrightLogMapper {
+    int deleteByPrimaryKey(String id);
+
+    int insert(CopyrightLog record);
+
+    int insertSelective(CopyrightLog record);
+
+    CopyrightLog selectByPrimaryKey(String id);
+
+    int updateByPrimaryKeySelective(CopyrightLog record);
+
+    int updateByPrimaryKey(CopyrightLog record);
+}

+ 59 - 0
src/main/java/com/goafanti/common/enums/CopyrightFields.java

@@ -0,0 +1,59 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum CopyrightFields {
+
+	ACCEPTTIME("acceptTime", "受理时间"),
+	PRINCIPAL("principal", "负责人"),
+	CONTACT("contact", "联系人"),
+	COPYRIGHTINFO("copyrightInfo", "软著简介"),
+	COPYRIGHTNAME("copyrightName", "软著名称"),
+	STATUS("status", "申请状态"),
+	WORKISSUE("workIssue", "派单信息"),
+	COMMENT("comment", "备注"),
+	OUTSOURCE("outsource", "外包单位"),
+	INURGENT("inUrgent", "加急天数"),
+	AUTHORIZEDDATE("authorizedDate", "下证日期"),
+	OTHER("", "未知参数");
+
+	private CopyrightFields(String code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<String, CopyrightFields> status = new HashMap<String, CopyrightFields>();
+
+	static {
+		for (CopyrightFields value : CopyrightFields.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static CopyrightFields getField(String code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static String getFieldDesc(String code) {
+		return getField(code).getDesc();
+	}
+
+	public static boolean containsType(String code) {
+		return status.containsKey(code);
+	}
+
+	private String	code;
+	private String	desc;
+
+	public String getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+}

+ 53 - 0
src/main/java/com/goafanti/common/enums/CopyrightStatus.java

@@ -0,0 +1,53 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum CopyrightStatus {
+	CREATE(1, "创建"), DELIVERD(2, "派单"), SUBMIT(3, "材料提交"), ACCEPT(4, "受理"), AMEND(5, "补正"), REJECT(6,
+			"驳回"), AUTHORIZED(7, "已下证"), CALLBACK(8, "撤销"), OTHER(9, "其他");
+
+	private CopyrightStatus(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, CopyrightStatus> status = new HashMap<Integer, CopyrightStatus>();
+
+	static {
+		for (CopyrightStatus value : CopyrightStatus.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static CopyrightStatus getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static CopyrightStatus getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return OTHER;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+}

+ 52 - 0
src/main/java/com/goafanti/common/enums/UserLevel.java

@@ -0,0 +1,52 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum UserLevel {
+	GENERAL(0, "普通会员"), CERTIFIED(1, "认证会员");
+
+	private UserLevel(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, UserLevel> status = new HashMap<Integer, UserLevel>();
+
+	static {
+		for (UserLevel value : UserLevel.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static UserLevel getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return GENERAL;
+	}
+
+	public static UserLevel getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return GENERAL;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+}

+ 52 - 0
src/main/java/com/goafanti/common/enums/UserType.java

@@ -0,0 +1,52 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum UserType {
+	PERSONAL(0, "个人账号"), ORGANIZATION(1, "组织账号");
+
+	private UserType(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, UserType> status = new HashMap<Integer, UserType>();
+
+	static {
+		for (UserType value : UserType.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static UserType getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return PERSONAL;
+	}
+
+	public static UserType getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return PERSONAL;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+}

+ 212 - 0
src/main/java/com/goafanti/common/mapper/CopyrightInfoMapper.xml

@@ -0,0 +1,212 @@
+<?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.CopyrightInfoMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.CopyrightInfo">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="uid" jdbcType="VARCHAR" property="uid" />
+    <result column="serial_number" jdbcType="INTEGER" property="serialNumber" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="accept_time" jdbcType="TIMESTAMP" property="acceptTime" />
+    <result column="principal" jdbcType="VARCHAR" property="principal" />
+    <result column="contact" jdbcType="INTEGER" property="contact" />
+    <result column="copyright_info" jdbcType="VARCHAR" property="copyrightInfo" />
+    <result column="copyright_name" jdbcType="VARCHAR" property="copyrightName" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="work_issue" jdbcType="VARCHAR" property="workIssue" />
+    <result column="comment" jdbcType="VARCHAR" property="comment" />
+    <result column="outsource" jdbcType="VARCHAR" property="outsource" />
+    <result column="in_urgent" jdbcType="INTEGER" property="inUrgent" />
+    <result column="authorized_date" jdbcType="TIMESTAMP" property="authorizedDate" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, uid, serial_number, create_time, accept_time, principal, contact, copyright_info, 
+    copyright_name, status, work_issue, comment, outsource, in_urgent, authorized_date
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from copyright_info
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from copyright_info
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.CopyrightInfo">
+    insert into copyright_info (id, uid, serial_number, 
+      create_time, accept_time, principal, 
+      contact, copyright_info, copyright_name, 
+      status, work_issue, comment, 
+      outsource, in_urgent, authorized_date
+      )
+    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{acceptTime,jdbcType=TIMESTAMP}, #{principal,jdbcType=VARCHAR}, 
+      #{contact,jdbcType=INTEGER}, #{copyrightInfo,jdbcType=VARCHAR}, #{copyrightName,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER}, #{workIssue,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR}, 
+      #{outsource,jdbcType=VARCHAR}, #{inUrgent,jdbcType=INTEGER}, #{authorizedDate,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.CopyrightInfo">
+    insert into copyright_info
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="uid != null">
+        uid,
+      </if>
+      <if test="serialNumber != null">
+        serial_number,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="acceptTime != null">
+        accept_time,
+      </if>
+      <if test="principal != null">
+        principal,
+      </if>
+      <if test="contact != null">
+        contact,
+      </if>
+      <if test="copyrightInfo != null">
+        copyright_info,
+      </if>
+      <if test="copyrightName != null">
+        copyright_name,
+      </if>
+      <if test="status != null">
+        status,
+      </if>
+      <if test="workIssue != null">
+        work_issue,
+      </if>
+      <if test="comment != null">
+        comment,
+      </if>
+      <if test="outsource != null">
+        outsource,
+      </if>
+      <if test="inUrgent != null">
+        in_urgent,
+      </if>
+      <if test="authorizedDate != null">
+        authorized_date,
+      </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="serialNumber != null">
+        #{serialNumber,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="acceptTime != null">
+        #{acceptTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="principal != null">
+        #{principal,jdbcType=VARCHAR},
+      </if>
+      <if test="contact != null">
+        #{contact,jdbcType=INTEGER},
+      </if>
+      <if test="copyrightInfo != null">
+        #{copyrightInfo,jdbcType=VARCHAR},
+      </if>
+      <if test="copyrightName != null">
+        #{copyrightName,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="workIssue != null">
+        #{workIssue,jdbcType=VARCHAR},
+      </if>
+      <if test="comment != null">
+        #{comment,jdbcType=VARCHAR},
+      </if>
+      <if test="outsource != null">
+        #{outsource,jdbcType=VARCHAR},
+      </if>
+      <if test="inUrgent != null">
+        #{inUrgent,jdbcType=INTEGER},
+      </if>
+      <if test="authorizedDate != null">
+        #{authorizedDate,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.CopyrightInfo">
+    update copyright_info
+    <set>
+      <if test="uid != null">
+        uid = #{uid,jdbcType=VARCHAR},
+      </if>
+      <if test="serialNumber != null">
+        serial_number = #{serialNumber,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="acceptTime != null">
+        accept_time = #{acceptTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="principal != null">
+        principal = #{principal,jdbcType=VARCHAR},
+      </if>
+      <if test="contact != null">
+        contact = #{contact,jdbcType=INTEGER},
+      </if>
+      <if test="copyrightInfo != null">
+        copyright_info = #{copyrightInfo,jdbcType=VARCHAR},
+      </if>
+      <if test="copyrightName != null">
+        copyright_name = #{copyrightName,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        status = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="workIssue != null">
+        work_issue = #{workIssue,jdbcType=VARCHAR},
+      </if>
+      <if test="comment != null">
+        comment = #{comment,jdbcType=VARCHAR},
+      </if>
+      <if test="outsource != null">
+        outsource = #{outsource,jdbcType=VARCHAR},
+      </if>
+      <if test="inUrgent != null">
+        in_urgent = #{inUrgent,jdbcType=INTEGER},
+      </if>
+      <if test="authorizedDate != null">
+        authorized_date = #{authorizedDate,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.CopyrightInfo">
+    update copyright_info
+    set uid = #{uid,jdbcType=VARCHAR},
+      serial_number = #{serialNumber,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      accept_time = #{acceptTime,jdbcType=TIMESTAMP},
+      principal = #{principal,jdbcType=VARCHAR},
+      contact = #{contact,jdbcType=INTEGER},
+      copyright_info = #{copyrightInfo,jdbcType=VARCHAR},
+      copyright_name = #{copyrightName,jdbcType=VARCHAR},
+      status = #{status,jdbcType=INTEGER},
+      work_issue = #{workIssue,jdbcType=VARCHAR},
+      comment = #{comment,jdbcType=VARCHAR},
+      outsource = #{outsource,jdbcType=VARCHAR},
+      in_urgent = #{inUrgent,jdbcType=INTEGER},
+      authorized_date = #{authorizedDate,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 117 - 0
src/main/java/com/goafanti/common/mapper/CopyrightLogMapper.xml

@@ -0,0 +1,117 @@
+<?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.CopyrightLogMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.CopyrightLog">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="cid" jdbcType="VARCHAR" property="cid" />
+    <result column="record_time" jdbcType="TIMESTAMP" property="recordTime" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="principal" jdbcType="VARCHAR" property="principal" />
+    <result column="operator" jdbcType="VARCHAR" property="operator" />
+    <result column="comment" jdbcType="VARCHAR" property="comment" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, cid, record_time, status, principal, operator, comment
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from copyright_log
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from copyright_log
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.CopyrightLog">
+    insert into copyright_log (id, cid, record_time, 
+      status, principal, operator, 
+      comment)
+    values (#{id,jdbcType=VARCHAR}, #{cid,jdbcType=VARCHAR}, #{recordTime,jdbcType=TIMESTAMP}, 
+      #{status,jdbcType=INTEGER}, #{principal,jdbcType=VARCHAR}, #{operator,jdbcType=VARCHAR}, 
+      #{comment,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.CopyrightLog">
+    insert into copyright_log
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="cid != null">
+        cid,
+      </if>
+      <if test="recordTime != null">
+        record_time,
+      </if>
+      <if test="status != null">
+        status,
+      </if>
+      <if test="principal != null">
+        principal,
+      </if>
+      <if test="operator != null">
+        operator,
+      </if>
+      <if test="comment != null">
+        comment,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="cid != null">
+        #{cid,jdbcType=VARCHAR},
+      </if>
+      <if test="recordTime != null">
+        #{recordTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="principal != null">
+        #{principal,jdbcType=VARCHAR},
+      </if>
+      <if test="operator != null">
+        #{operator,jdbcType=VARCHAR},
+      </if>
+      <if test="comment != null">
+        #{comment,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.CopyrightLog">
+    update copyright_log
+    <set>
+      <if test="cid != null">
+        cid = #{cid,jdbcType=VARCHAR},
+      </if>
+      <if test="recordTime != null">
+        record_time = #{recordTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="status != null">
+        status = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="principal != null">
+        principal = #{principal,jdbcType=VARCHAR},
+      </if>
+      <if test="operator != null">
+        operator = #{operator,jdbcType=VARCHAR},
+      </if>
+      <if test="comment != null">
+        comment = #{comment,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.CopyrightLog">
+    update copyright_log
+    set cid = #{cid,jdbcType=VARCHAR},
+      record_time = #{recordTime,jdbcType=TIMESTAMP},
+      status = #{status,jdbcType=INTEGER},
+      principal = #{principal,jdbcType=VARCHAR},
+      operator = #{operator,jdbcType=VARCHAR},
+      comment = #{comment,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 6 - 3
src/main/java/com/goafanti/common/model/BaseModel.java

@@ -10,9 +10,9 @@ public class BaseModel implements Serializable {
 	/**
 	 * 
 	 */
-	private static final long serialVersionUID = 1L;
+	private static final long	serialVersionUID	= 1L;
 
-	private String id;
+	private String				id;
 
 	@Override
 	public String toString() {
@@ -20,7 +20,10 @@ public class BaseModel implements Serializable {
 	}
 
 	public String getId() {
-		return id == null ? UUID.randomUUID().toString().replace("-", "") : "";
+		if (id == null) {
+			this.id = UUID.randomUUID().toString().replace("-", "");
+		}
+		return id;
 	}
 
 	public void setId(String id) {

+ 162 - 0
src/main/java/com/goafanti/common/model/CopyrightInfo.java

@@ -0,0 +1,162 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class CopyrightInfo extends BaseModel {
+	/**
+	 * 
+	 */
+	private static final long	serialVersionUID	= 1L;
+
+	/**
+	 * 用户主键
+	 */
+	private String				uid;
+
+	/**
+	 * 编号
+	 */
+	private Integer				serialNumber;
+
+	/**
+	 * 创建时间
+	 */
+	private Date				createTime;
+
+	/**
+	 * 受理时间
+	 */
+	private Date				acceptTime;
+
+	private String				principal;
+
+	private Integer				contact;
+
+	private String				copyrightInfo;
+
+	private String				copyrightName;
+
+	private Integer				status;
+
+	private String				workIssue;
+
+	private String				comment;
+
+	private String				outsource;
+
+	private Integer				inUrgent;
+
+	private Date				authorizedDate;
+
+	public String getUid() {
+		return uid;
+	}
+
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+
+	public Integer getSerialNumber() {
+		return serialNumber;
+	}
+
+	public void setSerialNumber(Integer serialNumber) {
+		this.serialNumber = serialNumber;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public Date getAcceptTime() {
+		return acceptTime;
+	}
+
+	public void setAcceptTime(Date acceptTime) {
+		this.acceptTime = acceptTime;
+	}
+
+	public String getPrincipal() {
+		return principal;
+	}
+
+	public void setPrincipal(String principal) {
+		this.principal = principal;
+	}
+
+	public Integer getContact() {
+		return contact;
+	}
+
+	public void setContact(Integer contact) {
+		this.contact = contact;
+	}
+
+	public String getCopyrightInfo() {
+		return copyrightInfo;
+	}
+
+	public void setCopyrightInfo(String copyrightInfo) {
+		this.copyrightInfo = copyrightInfo;
+	}
+
+	public String getCopyrightName() {
+		return copyrightName;
+	}
+
+	public void setCopyrightName(String copyrightName) {
+		this.copyrightName = copyrightName;
+	}
+
+	public String getWorkIssue() {
+		return workIssue;
+	}
+
+	public void setWorkIssue(String workIssue) {
+		this.workIssue = workIssue;
+	}
+
+	public String getComment() {
+		return comment;
+	}
+
+	public void setComment(String comment) {
+		this.comment = comment;
+	}
+
+	public String getOutsource() {
+		return outsource;
+	}
+
+	public void setOutsource(String outsource) {
+		this.outsource = outsource;
+	}
+
+	public Integer getInUrgent() {
+		return inUrgent == null ? 0 : inUrgent;
+	}
+
+	public void setInUrgent(Integer inUrgent) {
+		this.inUrgent = inUrgent;
+	}
+
+	public Date getAuthorizedDate() {
+		return authorizedDate;
+	}
+
+	public void setAuthorizedDate(Date authorizedDate) {
+		this.authorizedDate = authorizedDate;
+	}
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+}

+ 89 - 0
src/main/java/com/goafanti/common/model/CopyrightLog.java

@@ -0,0 +1,89 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class CopyrightLog extends BaseModel{
+    /**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+    /**
+    * 软著申请id
+    */
+    private String cid;
+
+    /**
+    * 操作时间
+    */
+    private Date recordTime;
+
+    /**
+    * 状态
+    */
+    private Integer status;
+
+    /**
+    * 负责人
+    */
+    private String principal;
+
+    /**
+    * 操作人
+    */
+    private String operator;
+
+    /**
+    * 备注
+    */
+    private String comment;
+
+    public String getCid() {
+        return cid;
+    }
+
+    public void setCid(String cid) {
+        this.cid = cid;
+    }
+
+    public Date getRecordTime() {
+        return recordTime;
+    }
+
+    public void setRecordTime(Date recordTime) {
+        this.recordTime = recordTime;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getPrincipal() {
+        return principal;
+    }
+
+    public void setPrincipal(String principal) {
+        this.principal = principal;
+    }
+
+    public String getOperator() {
+        return operator;
+    }
+
+    public void setOperator(String operator) {
+        this.operator = operator;
+    }
+
+    public String getComment() {
+        return comment;
+    }
+
+    public void setComment(String comment) {
+        this.comment = comment;
+    }
+
+}

+ 137 - 0
src/main/java/com/goafanti/copyright/bo/InputCopyright.java

@@ -0,0 +1,137 @@
+package com.goafanti.copyright.bo;
+
+import java.util.Date;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Past;
+import javax.validation.constraints.Size;
+
+import com.goafanti.common.constant.ErrorConstants;
+
+public class InputCopyright {
+	
+	@Past(message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Date	acceptTime;
+
+	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String	principal;
+	
+	@Max(value = 3, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@NotNull(message = "{" + ErrorConstants.PARAM_EMPTY_ERROR + "}")
+	private Integer	contact;
+
+	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String	copyrightInfo;
+	
+	@Size(min = 0, max = 60, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String	copyrightName;
+	
+	@Max(value = 9, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer	status;
+	
+	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String	workIssue;
+	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String	comment;
+	@Size(min = 0, max = 60, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String	outsource;
+	
+	@Max(value = 30, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Integer	inUrgent;
+	
+	@Past(message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	private Date	authorizedDate;
+
+	public Date getAcceptTime() {
+		return acceptTime;
+	}
+
+	public void setAcceptTime(Date acceptTime) {
+		this.acceptTime = acceptTime;
+	}
+
+	public String getPrincipal() {
+		return principal;
+	}
+
+	public void setPrincipal(String principal) {
+		this.principal = principal;
+	}
+
+	public Integer getContact() {
+		return contact;
+	}
+
+	public void setContact(Integer contact) {
+		this.contact = contact;
+	}
+
+	public String getCopyrightInfo() {
+		return copyrightInfo;
+	}
+
+	public void setCopyrightInfo(String copyrightInfo) {
+		this.copyrightInfo = copyrightInfo;
+	}
+
+	public String getCopyrightName() {
+		return copyrightName;
+	}
+
+	public void setCopyrightName(String copyrightName) {
+		this.copyrightName = copyrightName;
+	}
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+	public String getWorkIssue() {
+		return workIssue;
+	}
+
+	public void setWorkIssue(String workIssue) {
+		this.workIssue = workIssue;
+	}
+
+	public String getComment() {
+		return comment;
+	}
+
+	public void setComment(String comment) {
+		this.comment = comment;
+	}
+
+	public String getOutsource() {
+		return outsource;
+	}
+
+	public void setOutsource(String outsource) {
+		this.outsource = outsource;
+	}
+
+	public Integer getInUrgent() {
+		return inUrgent;
+	}
+
+	public void setInUrgent(Integer inUrgent) {
+		this.inUrgent = inUrgent;
+	}
+
+	public Date getAuthorizedDate() {
+		return authorizedDate;
+	}
+
+	public void setAuthorizedDate(Date authorizedDate) {
+		this.authorizedDate = authorizedDate;
+	}
+}

+ 65 - 0
src/main/java/com/goafanti/copyright/controller/CopyrightApiController.java

@@ -0,0 +1,65 @@
+package com.goafanti.copyright.controller;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.enums.CopyrightFields;
+import com.goafanti.common.enums.CopyrightStatus;
+import com.goafanti.common.model.CopyrightInfo;
+import com.goafanti.common.model.User;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.copyright.bo.InputCopyright;
+import com.goafanti.copyright.service.CopyrightInfoService;
+
+@RestController
+@RequestMapping(value = "/techservice/copyright")
+public class CopyrightApiController extends CertifyApiController {
+	@Resource
+	private CopyrightInfoService	copyrightInfoService;
+
+	@Value(value = "${upload.private.path}")
+	private String					uploadPrivatePath	= null;
+
+	@RequestMapping(value = "/apply", method = RequestMethod.POST)
+	public Result newApply(@Valid InputCopyright inputInfo, BindingResult bindingResult) {
+		Result res = new Result();
+		if (bindingResult.hasErrors()) {
+			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+					CopyrightFields.getFieldDesc(bindingResult.getFieldError().getField())));
+			return res;
+		}
+		User curUser = TokenManager.getUserToken();
+		if (curUser == null) {
+			res.getError().add(buildError(ErrorConstants.NON_LOGIN, "找不到用户登录信息"));
+			return res;
+		}
+		checkCertify(res, curUser);
+		if (!res.getError().isEmpty()) {
+			return res;
+		}
+		CopyrightInfo ci = new CopyrightInfo();
+		BeanUtils.copyProperties(inputInfo, ci);
+		ci.setUid(curUser.getId());
+		if (StringUtils.isBlank(ci.getPrincipal())) {
+			ci.setStatus(CopyrightStatus.CREATE.getCode());
+			ci.setPrincipal(curUser.getAid());
+		} else {
+			ci.setStatus(CopyrightStatus.DELIVERD.getCode());
+		}
+		copyrightInfoService.insert(ci);
+		res.setData(ci);
+		return res;
+	}
+
+}

+ 19 - 0
src/main/java/com/goafanti/copyright/service/CopyrightInfoService.java

@@ -0,0 +1,19 @@
+package com.goafanti.copyright.service;
+
+import java.util.List;
+
+import com.goafanti.common.model.CopyrightInfo;
+
+public interface CopyrightInfoService {
+
+	CopyrightInfo selectPatentInfoByUserId(String userId);
+
+	CopyrightInfo insert(CopyrightInfo patentInfo);
+
+	int updateByPrimaryKeySelective(CopyrightInfo patentInfo);
+
+	CopyrightInfo selectByPrimaryKey(String id);
+
+	int batchDeleteByPrimaryKey(List<String> id);
+
+}

+ 15 - 0
src/main/java/com/goafanti/copyright/service/CopyrightLogService.java

@@ -0,0 +1,15 @@
+package com.goafanti.copyright.service;
+
+import java.util.List;
+
+import com.goafanti.common.model.CopyrightLog;
+
+public interface CopyrightLogService {
+
+	CopyrightLog selectByPrimaryKey(String patentId);
+
+	List<CopyrightLog> selectProcessByCid(String copyrightId);
+
+	CopyrightLog insert(CopyrightLog copyrightLog);
+
+}

+ 61 - 0
src/main/java/com/goafanti/copyright/service/impl/CopyrightInfoServiceImpl.java

@@ -0,0 +1,61 @@
+package com.goafanti.copyright.service.impl;
+
+import java.util.Calendar;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.CopyrightInfoMapper;
+import com.goafanti.common.dao.CopyrightLogMapper;
+import com.goafanti.common.model.CopyrightInfo;
+import com.goafanti.common.model.CopyrightLog;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.copyright.service.CopyrightInfoService;
+
+@Service
+public class CopyrightInfoServiceImpl extends BaseMybatisDao<CopyrightInfoMapper> implements CopyrightInfoService {
+	@Autowired
+	private CopyrightInfoMapper	copyrightInfoMapper;
+	@Autowired
+	private CopyrightLogMapper	copyrightLogMapper;
+
+	@Override
+	public CopyrightInfo selectPatentInfoByUserId(String userId) {
+		return copyrightInfoMapper.selectByPrimaryKey(userId);
+	}
+
+	@Override
+	public CopyrightInfo insert(CopyrightInfo copyrightInfo) {
+		Calendar now = Calendar.getInstance();
+		now.set(Calendar.MILLISECOND, 0);
+		copyrightInfo.setCreateTime(now.getTime());
+		CopyrightLog log = new CopyrightLog();
+		log.setCid(copyrightInfo.getId());
+		log.setRecordTime(copyrightInfo.getCreateTime());
+		log.setComment(copyrightInfo.getComment());
+		log.setOperator(TokenManager.getAdminId());
+		log.setPrincipal(copyrightInfo.getPrincipal());
+		log.setStatus(copyrightInfo.getStatus());
+		copyrightInfoMapper.insertSelective(copyrightInfo);
+		copyrightLogMapper.insert(log);
+		return copyrightInfo;
+	}
+
+	@Override
+	public int updateByPrimaryKeySelective(CopyrightInfo patentInfo) {
+		return 0;
+	}
+
+	@Override
+	public CopyrightInfo selectByPrimaryKey(String id) {
+		return null;
+	}
+
+	@Override
+	public int batchDeleteByPrimaryKey(List<String> id) {
+		return 0;
+	}
+
+}

+ 28 - 0
src/main/java/com/goafanti/copyright/service/impl/CopyrightLogServiceImpl.java

@@ -0,0 +1,28 @@
+package com.goafanti.copyright.service.impl;
+
+import java.util.List;
+
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.model.CopyrightLog;
+import com.goafanti.copyright.service.CopyrightLogService;
+
+@Service
+public class CopyrightLogServiceImpl implements CopyrightLogService {
+
+	@Override
+	public CopyrightLog selectByPrimaryKey(String patentId) {
+		return null;
+	}
+
+	@Override
+	public List<CopyrightLog> selectProcessByCid(String copyrightId) {
+		return null;
+	}
+
+	@Override
+	public CopyrightLog insert(CopyrightLog copyrightLog) {
+		return null;
+	}
+
+}

+ 14 - 0
src/main/java/com/goafanti/core/shiro/token/TokenManager.java

@@ -77,6 +77,20 @@ public class TokenManager {
 	}
 
 	/**
+	 * 获取当前登录的普通用户对象
+	 * 
+	 * @return
+	 */
+	public static User getUserToken() {
+		AftUser u = getToken();
+		if (u instanceof User) {
+			return (User) u;
+		} else {
+			return null;
+		}
+	}
+	
+	/**
 	 * 获取当前登录的管理员对象
 	 * 
 	 * @return

+ 9 - 5
src/main/resources/props/error.properties

@@ -11,11 +11,7 @@ NON_LOGIN=\u7528\u6237\u672A\u767B\u5F55\u3002
 
 VCODE_ERROR=\u9A8C\u8BC1\u7801\u8F93\u5165\u9519\u8BEF\uFF01
 
-EMAIL_SIZE_ERROR=\u90AE\u7BB1\u5730\u5740\u957F\u5EA6\u9519\u8BEF\uFF01
-
-EMAIL_PATTERN_ERROR=\u90AE\u7BB1\u5730\u5740\u683C\u5F0F\u9519\u8BEF\uFF01
-
-DUNPLICATE_KAY_ERROR={0}\u5DF2\u88AB\u4ED6\u4EBA\u6CE8\u518C\uFF01
+PARAM_ERROR={0}\u53C2\u6570\u9519\u8BEF
 
 PARAM_INTEGER_ERROR={0}\u53C2\u6570\u5FC5\u987B\u4E3A\u6570\u5B57\u3002
 
@@ -25,6 +21,14 @@ PARAM_SIZE_ERROR={0}\u53C2\u6570\u957F\u5EA6\u4E0D\u6B63\u786E\uFF0C\u5FC5\u987B
 
 PARAM_PATTERN_ERROR={0}\u53C2\u6570\u683C\u5F0F\u987B\u6B63\u786E\u6307\u5B9A{1}\u3002
 
+EMAIL_SIZE_ERROR=\u90AE\u7BB1\u5730\u5740\u957F\u5EA6\u9519\u8BEF\uFF01
+
+EMAIL_PATTERN_ERROR=\u90AE\u7BB1\u5730\u5740\u683C\u5F0F\u9519\u8BEF\uFF01
+
+DUNPLICATE_KAY_ERROR={0}\u5DF2\u88AB\u4ED6\u4EBA\u6CE8\u518C\uFF01
+
 DATA_EMPTY_ERROR=\u5F53\u524D{0}\u6CA1\u6709\u6570\u636E\u3002
 
 PWD_NOT_MATCH_ERROR=\u539F\u5BC6\u7801\u8F93\u5165\u4E0D\u5339\u914D\u3002
+
+NON_CERTIFIED=\u672A\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u65E0\u6CD5\u64CD\u4F5C\uFF01