Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/com/jpsoft/smart/modules/base/controller/DeviceInfoController.java
#	src/main/java/com/jpsoft/smart/modules/base/controller/PersonDeviceRelationController.java
yanliming 5 éve
szülő
commit
95dfe05041

+ 1 - 1
src/main/java/com/jpsoft/smart/modules/base/controller/CompanyInfoController.java

@@ -209,7 +209,7 @@ public class CompanyInfoController {
         Map<String,Object> searchParams = new HashMap<>();
 
         List<Sort> sortList = new ArrayList<>();
-        sortList.add(new Sort("id_","asc"));
+        sortList.add(new Sort("sort_no","asc"));
 
         if (StringUtils.isNotEmpty(id)) {
             searchParams.put("id","%" + id + "%");

+ 1 - 1
src/main/java/com/jpsoft/smart/modules/base/controller/CompanyPositionController.java

@@ -19,7 +19,7 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 
 @RestController
-@RequestMapping("/companyPosition")
+@RequestMapping("/base/companyPosition")
 @Api(description = "companyPosition")
 public class CompanyPositionController {
     private Logger logger = LoggerFactory.getLogger(getClass());

+ 1 - 1
src/main/java/com/jpsoft/smart/modules/base/controller/PersonInfoController.java

@@ -19,7 +19,7 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 
 @RestController
-@RequestMapping("/personInfo")
+@RequestMapping("/base/personInfo")
 @Api(description = "personInfo")
 public class PersonInfoController {
     private Logger logger = LoggerFactory.getLogger(getClass());

+ 6 - 1
src/main/java/com/jpsoft/smart/modules/base/entity/PersonInfo.java

@@ -34,8 +34,13 @@ public class PersonInfo {
 	/**
 	 *手机号
 	 */
-        @ApiModelProperty(value = "手机号")
+	@ApiModelProperty(value = "手机号")
 	private String phone;
+	/**
+	 *身份证号
+	 */
+	@ApiModelProperty(value = "身份证号")
+	private String idCard;
 	/**
 	 *微信openId
 	 */

+ 3 - 2
src/main/resources/mapper/base/CompanyInfo.xml

@@ -76,10 +76,10 @@
         where id_=#{id}
     </update>
     <select id="get" parameterType="string" resultMap="CompanyInfoMap">
-        select * from base_company_info where id_=#{0}
+        select * from base_company_info where id_=#{0} and del_flag = 0
     </select>
     <select id="exist" parameterType="string" resultType="int">
-        select count(*) from base_company_info where id_=#{0}
+        select count(*) from base_company_info where id_=#{0} and del_flag = 0
     </select>
     <select id="list" resultMap="CompanyInfoMap">
         select * from base_company_info where del_flag=0 order by sort_no asc
@@ -89,6 +89,7 @@
 			select * from base_company_info
 		]]>
         <where>
+            del_flag = 0
             <if test="searchParams.id != null">
                 and ID_ like #{searchParams.id}
             </if>

+ 11 - 5
src/main/resources/mapper/base/PersonInfo.xml

@@ -8,6 +8,7 @@
         <result property="companyId" column="company_id"/>
         <result property="name" column="name_"/>
         <result property="phone" column="phone_"/>
+        <result property="idCard" column="id_card"/>
         <result property="openId" column="open_id"/>
         <result property="faceEnabled" column="face_enabled"/>
         <result property="cardEnabled" column="card_enabled"/>
@@ -33,7 +34,7 @@
         -->
         <![CDATA[
 		insert into base_person_info
-	    (company_id,name_,phone_,open_id,face_enabled,card_enabled,
+	    (company_id,name_,phone_,id_card,open_id,face_enabled,card_enabled,
 	    app_enabled,password_enabled,guest_enabled,position1_,position2_,
 	    position3_,position4_,position5_,del_flag,create_by,create_time,update_by,update_time)
 		values
@@ -41,6 +42,7 @@
             #{companyId,jdbcType=VARCHAR}
             ,#{name,jdbcType=VARCHAR}
             ,#{phone,jdbcType=VARCHAR}
+            ,#{idCard,jdbcType=VARCHAR}
             ,#{openId,jdbcType= NUMERIC }
             ,#{faceEnabled,jdbcType= NUMERIC }
             ,#{cardEnabled,jdbcType= NUMERIC }
@@ -75,6 +77,9 @@
             <if test="phone!=null">
                 phone_=#{phone,jdbcType=VARCHAR},
             </if>
+            <if test="idCard!=null">
+                id_card=#{idCard,jdbcType=VARCHAR},
+            </if>
             <if test="openId!=null">
                 open_id=#{openId,jdbcType= NUMERIC },
             </if>
@@ -128,20 +133,21 @@
     </update>
     <select id="get" parameterType="string" resultMap="PersonInfoMap">
         select
-        id_,company_id,name_,phone_,open_id,face_enabled,card_enabled,app_enabled,password_enabled,guest_enabled,position1_,position2_,position3_,position4_,position5_,del_flag,create_by,create_time,update_by,update_time
-        from base_person_info where id_=#{0}
+        *
+        from base_person_info where id_=#{0} and del_flag = 0
     </select>
     <select id="exist" parameterType="string" resultType="int">
-        select count(*) from base_person_info where id_=#{0}
+        select count(*) from base_person_info where id_=#{0}  and del_flag = 0
     </select>
     <select id="list" resultMap="PersonInfoMap">
-        select * from base_person_info
+        select * from base_person_info where del_flag = 0
     </select>
     <select id="search" parameterType="hashmap" resultMap="PersonInfoMap">
         <![CDATA[
 			select * from base_person_info
 		]]>
         <where>
+            del_flag = 0
             <if test="searchParams.id != null">
                 and ID_ like #{searchParams.id}
             </if>