anderx 1 год назад
Родитель
Сommit
5264d02367

+ 4 - 0
src/main/java/com/goafanti/admin/controller/AdminSuperviserApiController.java

@@ -89,6 +89,10 @@ public class AdminSuperviserApiController extends CertifyApiController {
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "用户名为空", "用户名"));
 				return res;
 			}
+			if (admin.getExpenseSuperExamine()==null) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "报销是否上级审核", "报销是否上级审核"));
+				return res;
+			}
 			Admin a = newAdminService.selectByMobile(admin.getMobile().trim());
 			if (null != a) {
 				res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "当前用户已注册!"));

+ 6 - 6
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.goafanti.common.mapper.AdminMapper">
+<mapper namespace="com.goafanti.common.dao.AdminMapper">
 
-    <resultMap id="BaseResultMap" type="com.goafanti.common.domain.Admin">
+    <resultMap id="BaseResultMap" type="com.goafanti.common.model.Admin">
             <id property="id" column="id" jdbcType="VARCHAR"/>
             <result property="mobile" column="mobile" jdbcType="VARCHAR"/>
             <result property="name" column="name" jdbcType="VARCHAR"/>
@@ -61,7 +61,7 @@
         delete from admin
         where  id = #{id,jdbcType=VARCHAR} 
     </delete>
-    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.domain.Admin" useGeneratedKeys="true">
+    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Admin" useGeneratedKeys="true">
         insert into admin
         ( id,mobile,name
         ,password,email,create_time
@@ -86,7 +86,7 @@
         ,#{publicPurview,jdbcType=INTEGER},#{expenseOpenId,jdbcType=VARCHAR},#{expenseSuperExamine,jdbcType=INTEGER}
         )
     </insert>
-    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.domain.Admin" useGeneratedKeys="true">
+    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Admin" useGeneratedKeys="true">
         insert into admin
         <trim prefix="(" suffix=")" suffixOverrides=",">
                 <if test="id != null">id,</if>
@@ -153,7 +153,7 @@
                 <if test="expenseSuperExamine != null">#{expenseSuperExamine,jdbcType=INTEGER},</if>
         </trim>
     </insert>
-    <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.domain.Admin">
+    <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Admin">
         update admin
         <set>
                 <if test="mobile != null">
@@ -246,7 +246,7 @@
         </set>
         where   id = #{id,jdbcType=VARCHAR} 
     </update>
-    <update id="updateByPrimaryKey" parameterType="com.goafanti.common.domain.Admin">
+    <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Admin">
         update admin
         set 
             mobile =  #{mobile,jdbcType=VARCHAR},