Bladeren bron

20181229识别图管理

suochencheng 7 jaren geleden
bovenliggende
commit
4575b23958
27 gewijzigde bestanden met toevoegingen van 1242 en 707 verwijderingen
  1. 44 0
      log.txt
  2. 216 180
      src/main/java/com/izouma/awesomeadmin/dao/VuforiaImageGroupMapper.xml
  3. 320 287
      src/main/java/com/izouma/awesomeadmin/dao/VuforiaImageInfoMapper.xml
  4. 88 57
      src/main/java/com/izouma/awesomeadmin/model/VuforiaImageGroup.java
  5. 105 75
      src/main/java/com/izouma/awesomeadmin/model/VuforiaImageInfo.java
  6. 91 18
      src/main/java/com/izouma/awesomeadmin/service/impl/VuforiaImageInfoServiceImpl.java
  7. 4 2
      src/main/java/com/izouma/awesomeadmin/vuforia/PostNewTarget.java
  8. 214 0
      src/main/java/com/izouma/awesomeadmin/vuforia/VuforiaUtil.java
  9. 19 3
      src/main/vue/src/components/VuforiaImageInfo.vue
  10. 96 83
      src/main/vue/src/pages/VuforiaImageGroup.vue
  11. 3 0
      src/main/vue/src/pages/VuforiaImageInfo.vue
  12. 1 1
      src/main/webapp/WEB-INF/html/admin.html
  13. 1 1
      src/main/webapp/WEB-INF/html/loginAdmin.html
  14. 0 0
      src/main/webapp/static/js/17.a6b6ae680d7c5d49f457.js
  15. 0 0
      src/main/webapp/static/js/18.b4791dd219c5975b0abc.js
  16. 0 0
      src/main/webapp/static/js/19.3842540af3eec8a94c17.js
  17. 0 0
      src/main/webapp/static/js/31.f963ba3d4205b544ff1c.js
  18. 0 0
      src/main/webapp/static/js/32.46264a24f69079fc2526.js
  19. 0 0
      src/main/webapp/static/js/33.1786477b948415455d6c.js
  20. 0 0
      src/main/webapp/static/js/34.2b953a54aa9fa24921a7.js
  21. 0 0
      src/main/webapp/static/js/35.444d017f53ef1f93f9b0.js
  22. 0 0
      src/main/webapp/static/js/36.3abc3886147e7fd17908.js
  23. 0 0
      src/main/webapp/static/js/37.ae929f8d43fdee3a2080.js
  24. 0 0
      src/main/webapp/static/js/7.b03803b7e01adbb508da.js
  25. 0 0
      src/main/webapp/static/js/admin.f1968463b09e086e4be0.js
  26. 0 0
      src/main/webapp/static/js/manifest.67ae34230152db4e56dd.js
  27. 40 0
      src/test/java/VuforialUtilTest.java

+ 44 - 0
log.txt

@@ -37,3 +37,47 @@
 [2018-09-03 16:14:31] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
 [2018-09-03 16:19:40] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
 [2018-09-03 18:07:29] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-12-29 14:28:56] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-12-29 15:13:31] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-12-29 15:13:34] [ERROR] - updateTarget 更新识别图异常
+java.io.IOException: Attempted read from closed stream.
+	at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:167)
+	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137)
+	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
+	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
+	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
+	at java.io.InputStreamReader.read(InputStreamReader.java:184)
+	at java.io.Reader.read(Reader.java:140)
+	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:247)
+	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:291)
+	at com.izouma.awesomeadmin.vuforia.VuforiaUtil.updateTarget(VuforiaUtil.java:132)
+	at VuforialUtilTest.UpdateTargetTest(VuforialUtilTest.java:34)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:498)
+	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
+	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
+	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
+	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
+	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
+	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
+	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
+	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
+	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
+	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
+	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
+	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
+	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
+	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
+	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
+	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
+	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
+	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
+	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
+	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
+	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
+	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
+	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
+	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
+[2018-12-29 15:15:26] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.

+ 216 - 180
src/main/java/com/izouma/awesomeadmin/dao/VuforiaImageGroupMapper.xml

@@ -1,21 +1,23 @@
 <?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.izouma.awesomeadmin.dao.VuforiaImageGroupMapper" >
-    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.VuforiaImageGroup" >
-                <id column="id" property="id" jdbcType="INTEGER" />
-                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
-                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
-                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
-                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
-                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
-                                <result column="vuforia_data_name" property="vuforiaDataName" jdbcType="VARCHAR" />
-                                <result column="vuforia_name" property="vuforiaName" jdbcType="VARCHAR" />
-                                <result column="remark1" property="remark1" jdbcType="VARCHAR" />
-                                <result column="remark2" property="remark2" jdbcType="VARCHAR" />
-                                <result column="remark3" property="remark3" jdbcType="VARCHAR" />
-            </resultMap>
-    <sql id="Base_Column_List" >
-        <trim  suffixOverrides="," >
+<mapper namespace="com.izouma.awesomeadmin.dao.VuforiaImageGroupMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.VuforiaImageGroup">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="vuforia_data_name" property="vuforiaDataName" jdbcType="VARCHAR"/>
+        <result column="vuforia_name" property="vuforiaName" jdbcType="VARCHAR"/>
+        <result column="remark1" property="remark1" jdbcType="VARCHAR"/>
+        <result column="remark2" property="remark2" jdbcType="VARCHAR"/>
+        <result column="remark3" property="remark3" jdbcType="VARCHAR"/>
+        <result column="access_key" property="accessKey" jdbcType="VARCHAR"/>
+        <result column="secret_key" property="secretKey" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
             id,
 
             del_flag,
@@ -38,128 +40,151 @@
 
             remark3,
 
-            </trim>
+            access_key,
+
+            secret_key,
+
+        </trim>
     </sql>
-    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
         select
-        <include refid="Base_Column_List" />
+        <include refid="Base_Column_List"/>
         from vuforia_image_group
         where id = #{id,jdbcType=INTEGER}
     </select>
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
         delete from vuforia_image_group
         where id = #{id,jdbcType=INTEGER}
     </delete>
-    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.VuforiaImageGroup" useGeneratedKeys="true" keyProperty="id">
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.VuforiaImageGroup" useGeneratedKeys="true"
+            keyProperty="id">
         insert into vuforia_image_group
-        <trim prefix="(" suffix=")" suffixOverrides="," >
-                <if test="id!= null" >
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
                 id,
             </if>
-                <if test="delFlag!= null" >
+            <if test="delFlag!= null">
                 del_flag,
             </if>
-                <if test="updateTime!= null" >
+            <if test="updateTime!= null">
                 update_time,
             </if>
-                <if test="updateUser!= null" >
+            <if test="updateUser!= null">
                 update_user,
             </if>
-                <if test="createTime!= null" >
+            <if test="createTime!= null">
                 create_time,
             </if>
-                <if test="createUser!= null" >
+            <if test="createUser!= null">
                 create_user,
             </if>
-                <if test="vuforiaDataName!= null" >
+            <if test="vuforiaDataName!= null">
                 vuforia_data_name,
             </if>
-                <if test="vuforiaName!= null" >
+            <if test="vuforiaName!= null">
                 vuforia_name,
             </if>
-                <if test="remark1!= null" >
+            <if test="remark1!= null">
                 remark1,
             </if>
-                <if test="remark2!= null" >
+            <if test="remark2!= null">
                 remark2,
             </if>
-                <if test="remark3!= null" >
+            <if test="remark3!= null">
                 remark3,
             </if>
-            </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides="," >
-                    <if test="id != null" >
+            <if test="accessKey!= null">
+                access_key,
+            </if>
+            <if test="secretKey!= null">
+                secret_key,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
                 #{id,jdbcType=INTEGER},
             </if>
-                    <if test="delFlag != null" >
+            <if test="delFlag != null">
                 #{delFlag,jdbcType=CHAR},
             </if>
-                    <if test="updateTime != null" >
+            <if test="updateTime != null">
                 #{updateTime,jdbcType=TIMESTAMP},
             </if>
-                    <if test="updateUser != null" >
+            <if test="updateUser != null">
                 #{updateUser,jdbcType=VARCHAR},
             </if>
-                    <if test="createTime != null" >
+            <if test="createTime != null">
                 #{createTime,jdbcType=TIMESTAMP},
             </if>
-                    <if test="createUser != null" >
+            <if test="createUser != null">
                 #{createUser,jdbcType=VARCHAR},
             </if>
-                    <if test="vuforiaDataName != null" >
+            <if test="vuforiaDataName != null">
                 #{vuforiaDataName,jdbcType=VARCHAR},
             </if>
-                    <if test="vuforiaName != null" >
+            <if test="vuforiaName != null">
                 #{vuforiaName,jdbcType=VARCHAR},
             </if>
-                    <if test="remark1 != null" >
+            <if test="remark1 != null">
                 #{remark1,jdbcType=VARCHAR},
             </if>
-                    <if test="remark2 != null" >
+            <if test="remark2 != null">
                 #{remark2,jdbcType=VARCHAR},
             </if>
-                    <if test="remark3 != null" >
+            <if test="remark3 != null">
                 #{remark3,jdbcType=VARCHAR},
             </if>
-                </trim>
+            <if test="accessKey != null">
+                #{accessKey,jdbcType=VARCHAR},
+            </if>
+            <if test="secretKey != null">
+                #{secretKey,jdbcType=VARCHAR},
+            </if>
+        </trim>
     </insert>
-    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.VuforiaImageGroup" >
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.VuforiaImageGroup">
         update vuforia_image_group
-        <set >
-                    <if test="id != null" >
-               id= #{id,jdbcType=INTEGER},
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
             </if>
-                     <if test="delFlag != null" >
-               del_flag= #{delFlag,jdbcType=CHAR},
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
             </if>
-                     <if test="updateTime != null" >
-               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
             </if>
-                     <if test="updateUser != null" >
-               update_user= #{updateUser,jdbcType=VARCHAR},
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
             </if>
-                     <if test="createTime != null" >
-               create_time= #{createTime,jdbcType=TIMESTAMP},
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
             </if>
-                     <if test="createUser != null" >
-               create_user= #{createUser,jdbcType=VARCHAR},
+            <if test="vuforiaDataName != null">
+                vuforia_data_name= #{vuforiaDataName,jdbcType=VARCHAR},
             </if>
-                     <if test="vuforiaDataName != null" >
-               vuforia_data_name= #{vuforiaDataName,jdbcType=VARCHAR},
+            <if test="vuforiaName != null">
+                vuforia_name= #{vuforiaName,jdbcType=VARCHAR},
             </if>
-                     <if test="vuforiaName != null" >
-               vuforia_name= #{vuforiaName,jdbcType=VARCHAR},
+            <if test="remark1 != null">
+                remark1= #{remark1,jdbcType=VARCHAR},
             </if>
-                     <if test="remark1 != null" >
-               remark1= #{remark1,jdbcType=VARCHAR},
+            <if test="remark2 != null">
+                remark2= #{remark2,jdbcType=VARCHAR},
             </if>
-                     <if test="remark2 != null" >
-               remark2= #{remark2,jdbcType=VARCHAR},
+            <if test="remark3 != null">
+                remark3= #{remark3,jdbcType=VARCHAR},
             </if>
-                     <if test="remark3 != null" >
-               remark3= #{remark3,jdbcType=VARCHAR},
+            <if test="accessKey != null">
+                access_key= #{accessKey,jdbcType=VARCHAR},
             </if>
-                 </set>
+            <if test="secretKey != null">
+                secret_key = #{secretKey,jdbcType=VARCHAR},
+            </if>
+        </set>
         where
         <if test="id != null and !&quot;&quot;.equals(id)">
             id = #{id,jdbcType=INTEGER}
@@ -170,55 +195,58 @@
         </if>
 
     </update>
-    <select id="queryVuforiaImageGroupByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.VuforiaImageGroup">
-        select <include refid="Base_Column_List"/> from vuforia_image_group
+    <select id="queryVuforiaImageGroupByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.VuforiaImageGroup">
+        select
+        <include refid="Base_Column_List"/>
+        from vuforia_image_group
         <where>
             and del_flag = 'N'
             <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
                 and id in (${record.idStr})
             </if>
-                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
-                and  id = #{record.id}
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
             </if>
-                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
-                and  del_flag = #{record.delFlag}
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
             </if>
-                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
-                and  update_time = #{record.updateTime}
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
             </if>
-                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
-                and  update_user = #{record.updateUser}
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
             </if>
-                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
-                and  create_time = #{record.createTime}
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
             </if>
-                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
-                and  create_user = #{record.createUser}
+            <if test="record.vuforiaDataName != null and !&quot;&quot;.equals(record.vuforiaDataName)">
+                and vuforia_data_name = #{record.vuforiaDataName}
             </if>
-                     <if test="record.vuforiaDataName != null and !&quot;&quot;.equals(record.vuforiaDataName)">
-                and  vuforia_data_name = #{record.vuforiaDataName}
+            <if test="record.vuforiaName != null and !&quot;&quot;.equals(record.vuforiaName)">
+                and vuforia_name = #{record.vuforiaName}
             </if>
-                     <if test="record.vuforiaName != null and !&quot;&quot;.equals(record.vuforiaName)">
-                and  vuforia_name = #{record.vuforiaName}
+            <if test="record.remark1 != null and !&quot;&quot;.equals(record.remark1)">
+                and remark1 = #{record.remark1}
             </if>
-                     <if test="record.remark1 != null and !&quot;&quot;.equals(record.remark1)">
-                and  remark1 = #{record.remark1}
+            <if test="record.remark2 != null and !&quot;&quot;.equals(record.remark2)">
+                and remark2 = #{record.remark2}
             </if>
-                     <if test="record.remark2 != null and !&quot;&quot;.equals(record.remark2)">
-                and  remark2 = #{record.remark2}
+            <if test="record.remark3 != null and !&quot;&quot;.equals(record.remark3)">
+                and remark3 = #{record.remark3}
             </if>
-                     <if test="record.remark3 != null and !&quot;&quot;.equals(record.remark3)">
-                and  remark3 = #{record.remark3}
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR vuforia_data_name LIKE concat('%',#{record.searchKey},'%')
+                    OR vuforia_name LIKE concat('%',#{record.searchKey},'%')
+                    OR remark1 LIKE concat('%',#{record.searchKey},'%')
+                    OR remark2 LIKE concat('%',#{record.searchKey},'%')
+                    OR remark3 LIKE concat('%',#{record.searchKey},'%')
+                </trim>
             </if>
-                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
-             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
-                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  vuforia_data_name LIKE concat('%',#{record.searchKey},'%')
-                                                                                                    OR  vuforia_name LIKE concat('%',#{record.searchKey},'%')
-                                                                                                    OR  remark1 LIKE concat('%',#{record.searchKey},'%')
-                                                                                                    OR  remark2 LIKE concat('%',#{record.searchKey},'%')
-                                                                                                    OR  remark3 LIKE concat('%',#{record.searchKey},'%')
-                                                             </trim>
-         </if>
 
             <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
                 <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
@@ -272,89 +300,92 @@
         </if>
         id desc
     </select>
-    <select id="queryAllVuforiaImageGroup" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.VuforiaImageGroup">
-        select <include refid="Base_Column_List"/> from vuforia_image_group
+    <select id="queryAllVuforiaImageGroup" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.VuforiaImageGroup">
+        select
+        <include refid="Base_Column_List"/>
+        from vuforia_image_group
         <where>
             and del_flag = 'N'
             <if test="idStr != null and !&quot;&quot;.equals(idStr)">
                 and id in (${idStr})
             </if>
-                    <if test="id != null and !&quot;&quot;.equals(id)">
-                and  id = #{id}
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
             </if>
-                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
-                and  del_flag = #{delFlag}
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
             </if>
-                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
-                and  update_time = #{updateTime}
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
             </if>
-                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
-                and  update_user = #{updateUser}
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
             </if>
-                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
-                and  create_time = #{createTime}
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
             </if>
-                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
-                and  create_user = #{createUser}
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
             </if>
-                    <if test="vuforiaDataName != null and !&quot;&quot;.equals(vuforiaDataName)">
-                and  vuforia_data_name = #{vuforiaDataName}
+            <if test="vuforiaDataName != null and !&quot;&quot;.equals(vuforiaDataName)">
+                and vuforia_data_name = #{vuforiaDataName}
             </if>
-                    <if test="vuforiaName != null and !&quot;&quot;.equals(vuforiaName)">
-                and  vuforia_name = #{vuforiaName}
+            <if test="vuforiaName != null and !&quot;&quot;.equals(vuforiaName)">
+                and vuforia_name = #{vuforiaName}
             </if>
-                    <if test="remark1 != null and !&quot;&quot;.equals(remark1)">
-                and  remark1 = #{remark1}
+            <if test="remark1 != null and !&quot;&quot;.equals(remark1)">
+                and remark1 = #{remark1}
             </if>
-                    <if test="remark2 != null and !&quot;&quot;.equals(remark2)">
-                and  remark2 = #{remark2}
+            <if test="remark2 != null and !&quot;&quot;.equals(remark2)">
+                and remark2 = #{remark2}
             </if>
-                    <if test="remark3 != null and !&quot;&quot;.equals(remark3)">
-                and  remark3 = #{remark3}
+            <if test="remark3 != null and !&quot;&quot;.equals(remark3)">
+                and remark3 = #{remark3}
             </if>
-                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
-                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  vuforia_data_name LIKE concat('%',#{searchKey},'%')
-                                                                                                                                                        OR  vuforia_name LIKE concat('%',#{searchKey},'%')
-                                                                                                                                                        OR  remark1 LIKE concat('%',#{searchKey},'%')
-                                                                                                                                                        OR  remark2 LIKE concat('%',#{searchKey},'%')
-                                                                                                                                                        OR  remark3 LIKE concat('%',#{searchKey},'%')
-                                                                                        </trim>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR vuforia_data_name LIKE concat('%',#{searchKey},'%')
+                    OR vuforia_name LIKE concat('%',#{searchKey},'%')
+                    OR remark1 LIKE concat('%',#{searchKey},'%')
+                    OR remark2 LIKE concat('%',#{searchKey},'%')
+                    OR remark3 LIKE concat('%',#{searchKey},'%')
+                </trim>
             </if>
-<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
-    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
-        <choose>
-            <when test="item.indexOf('like') != -1">
-                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
-                    <if test="detailIndex == 3">
-                        concat('%',#{itemDetail},'%')
-                    </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
 
-                    <if test="detailIndex &lt; 3">
-                        ${itemDetail}
-                    </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
 
-                </foreach>
-            </when>
-            <otherwise>
-                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
-                    <if test="detailIndex == 3">
-                        #{itemDetail}
-                    </if>
-
-                    <if test="detailIndex &lt; 3">
-                        ${itemDetail}
-                    </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
 
-                </foreach>
-            </otherwise>
-        </choose>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
 
 
-    </foreach>
+                </foreach>
 
 
-</if>
+            </if>
         </where>
         order by
 
@@ -373,44 +404,47 @@
 
         id desc
     </select>
-    <select id="queryVuforiaImageGroup" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.VuforiaImageGroup">
-        select <include refid="Base_Column_List"/> from vuforia_image_group
+    <select id="queryVuforiaImageGroup" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.VuforiaImageGroup">
+        select
+        <include refid="Base_Column_List"/>
+        from vuforia_image_group
         <where>
             and del_flag = 'N'
-                    <if test="id != null and !&quot;&quot;.equals(id)">
+            <if test="id != null and !&quot;&quot;.equals(id)">
                 and id = #{id}
             </if>
-                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
                 and del_flag = #{delFlag}
             </if>
-                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
                 and update_time = #{updateTime}
             </if>
-                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
                 and update_user = #{updateUser}
             </if>
-                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
                 and create_time = #{createTime}
             </if>
-                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
                 and create_user = #{createUser}
             </if>
-                     <if test="vuforiaDataName != null and !&quot;&quot;.equals(vuforiaDataName)">
+            <if test="vuforiaDataName != null and !&quot;&quot;.equals(vuforiaDataName)">
                 and vuforia_data_name = #{vuforiaDataName}
             </if>
-                     <if test="vuforiaName != null and !&quot;&quot;.equals(vuforiaName)">
+            <if test="vuforiaName != null and !&quot;&quot;.equals(vuforiaName)">
                 and vuforia_name = #{vuforiaName}
             </if>
-                     <if test="remark1 != null and !&quot;&quot;.equals(remark1)">
+            <if test="remark1 != null and !&quot;&quot;.equals(remark1)">
                 and remark1 = #{remark1}
             </if>
-                     <if test="remark2 != null and !&quot;&quot;.equals(remark2)">
+            <if test="remark2 != null and !&quot;&quot;.equals(remark2)">
                 and remark2 = #{remark2}
             </if>
-                     <if test="remark3 != null and !&quot;&quot;.equals(remark3)">
+            <if test="remark3 != null and !&quot;&quot;.equals(remark3)">
                 and remark3 = #{remark3}
             </if>
-         
+
         </where>
         LIMIT 1
     </select>
@@ -426,10 +460,12 @@
         </if>
     </update>
     <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.VuforiaImageGroup">
-        select <include refid="Base_Column_List"/> from vuforia_image_group
+        select
+        <include refid="Base_Column_List"/>
+        from vuforia_image_group
         <where>
             and del_flag = 'N'
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        </where>
         order by id desc
     </select>
 </mapper>

File diff suppressed because it is too large
+ 320 - 287
src/main/java/com/izouma/awesomeadmin/dao/VuforiaImageInfoMapper.xml


+ 88 - 57
src/main/java/com/izouma/awesomeadmin/model/VuforiaImageGroup.java

@@ -1,13 +1,14 @@
 package com.izouma.awesomeadmin.model;
 
 import java.util.*;
+
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.JsonInclude;
 
 
 @JsonAutoDetect
 @JsonInclude(JsonInclude.Include.NON_NULL)
-public class VuforiaImageGroup{
+public class VuforiaImageGroup {
     private Integer id;
     private String delFlag;
     private Date updateTime;
@@ -20,129 +21,159 @@ public class VuforiaImageGroup{
     private String remark2;
     private String remark3;
 
-private String idStr;
+    private String accessKey;
+
+    private String secretKey;
+
 
-private String searchKey;
+    private String idStr;
 
-/**
-* and,test_name,like,value;or,remark,=,123
-*/
-private String advancedQuery;
+    private String searchKey;
 
-/**
-* column_name_,desc_;column_name_,asc
-*/
-private String orderByStr;
+    /**
+     * and,test_name,like,value;or,remark,=,123
+     */
+    private String advancedQuery;
 
-    public Integer getId(){
+    /**
+     * column_name_,desc_;column_name_,asc
+     */
+    private String orderByStr;
+
+    public Integer getId() {
         return this.id;
     }
 
-    public void setId(Integer id){
+    public void setId(Integer id) {
         this.id = id;
     }
-    public String getDelFlag(){
+
+    public String getDelFlag() {
         return this.delFlag;
     }
 
-    public void setDelFlag(String delFlag){
+    public void setDelFlag(String delFlag) {
         this.delFlag = delFlag;
     }
-    public Date getUpdateTime(){
+
+    public Date getUpdateTime() {
         return this.updateTime;
     }
 
-    public void setUpdateTime(Date updateTime){
+    public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
-    public String getUpdateUser(){
+
+    public String getUpdateUser() {
         return this.updateUser;
     }
 
-    public void setUpdateUser(String updateUser){
+    public void setUpdateUser(String updateUser) {
         this.updateUser = updateUser;
     }
-    public Date getCreateTime(){
+
+    public Date getCreateTime() {
         return this.createTime;
     }
 
-    public void setCreateTime(Date createTime){
+    public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
-    public String getCreateUser(){
+
+    public String getCreateUser() {
         return this.createUser;
     }
 
-    public void setCreateUser(String createUser){
+    public void setCreateUser(String createUser) {
         this.createUser = createUser;
     }
-    public String getVuforiaDataName(){
+
+    public String getVuforiaDataName() {
         return this.vuforiaDataName;
     }
 
-    public void setVuforiaDataName(String vuforiaDataName){
+    public void setVuforiaDataName(String vuforiaDataName) {
         this.vuforiaDataName = vuforiaDataName;
     }
-    public String getVuforiaName(){
+
+    public String getVuforiaName() {
         return this.vuforiaName;
     }
 
-    public void setVuforiaName(String vuforiaName){
+    public void setVuforiaName(String vuforiaName) {
         this.vuforiaName = vuforiaName;
     }
-    public String getRemark1(){
+
+    public String getRemark1() {
         return this.remark1;
     }
 
-    public void setRemark1(String remark1){
+    public void setRemark1(String remark1) {
         this.remark1 = remark1;
     }
-    public String getRemark2(){
+
+    public String getRemark2() {
         return this.remark2;
     }
 
-    public void setRemark2(String remark2){
+    public void setRemark2(String remark2) {
         this.remark2 = remark2;
     }
-    public String getRemark3(){
+
+    public String getRemark3() {
         return this.remark3;
     }
 
-    public void setRemark3(String remark3){
+    public void setRemark3(String remark3) {
         this.remark3 = remark3;
     }
 
-public String getSearchKey() {
-    return searchKey;
-}
+    public String getSearchKey() {
+        return searchKey;
+    }
 
-public void setSearchKey(String searchKey) {
-    this.searchKey = searchKey;
-}
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
 
-public String getAdvancedQuery() {
-    return advancedQuery;
-}
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
 
-public void setAdvancedQuery(String advancedQuery) {
-    this.advancedQuery = advancedQuery;
-}
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
 
-public String getOrderByStr() {
-    return orderByStr;
-}
+    public String getOrderByStr() {
+        return orderByStr;
+    }
 
-public void setOrderByStr(String orderByStr) {
-    this.orderByStr = orderByStr;
-}
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
 
-public String getIdStr() {
-    return idStr;
-}
+    public String getIdStr() {
+        return idStr;
+    }
 
-public void setIdStr(String idStr) {
-    this.idStr = idStr;
-}
+    public void setIdStr(String idStr) {
+        this.idStr = idStr;
+    }
 
+    public String getAccessKey() {
+        return accessKey;
+    }
+
+    public void setAccessKey(String accessKey) {
+        this.accessKey = accessKey;
+    }
+
+    public String getSecretKey() {
+        return secretKey;
+    }
+
+    public void setSecretKey(String secretKey) {
+        this.secretKey = secretKey;
+    }
 }
 

+ 105 - 75
src/main/java/com/izouma/awesomeadmin/model/VuforiaImageInfo.java

@@ -1,13 +1,14 @@
 package com.izouma.awesomeadmin.model;
 
 import java.util.*;
+
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.JsonInclude;
 
 
 @JsonAutoDetect
 @JsonInclude(JsonInclude.Include.NON_NULL)
-public class VuforiaImageInfo{
+public class VuforiaImageInfo {
     private Integer id;
     private String delFlag;
     private Date updateTime;
@@ -29,192 +30,221 @@ public class VuforiaImageInfo{
     private String remark3;
     private String vuforiaImage;
 
-private String idStr;
+    private String targetId;
+
+
+    private String idStr;
 
-private String searchKey;
+    private String searchKey;
 
-/**
-* and,test_name,like,value;or,remark,=,123
-*/
-private String advancedQuery;
+    /**
+     * and,test_name,like,value;or,remark,=,123
+     */
+    private String advancedQuery;
 
-/**
-* column_name_,desc_;column_name_,asc
-*/
-private String orderByStr;
+    /**
+     * column_name_,desc_;column_name_,asc
+     */
+    private String orderByStr;
 
-    public Integer getId(){
+    public Integer getId() {
         return this.id;
     }
 
-    public void setId(Integer id){
+    public void setId(Integer id) {
         this.id = id;
     }
-    public String getDelFlag(){
+
+    public String getDelFlag() {
         return this.delFlag;
     }
 
-    public void setDelFlag(String delFlag){
+    public void setDelFlag(String delFlag) {
         this.delFlag = delFlag;
     }
-    public Date getUpdateTime(){
+
+    public Date getUpdateTime() {
         return this.updateTime;
     }
 
-    public void setUpdateTime(Date updateTime){
+    public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
-    public String getUpdateUser(){
+
+    public String getUpdateUser() {
         return this.updateUser;
     }
 
-    public void setUpdateUser(String updateUser){
+    public void setUpdateUser(String updateUser) {
         this.updateUser = updateUser;
     }
-    public Date getCreateTime(){
+
+    public Date getCreateTime() {
         return this.createTime;
     }
 
-    public void setCreateTime(Date createTime){
+    public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
-    public String getCreateUser(){
+
+    public String getCreateUser() {
         return this.createUser;
     }
 
-    public void setCreateUser(String createUser){
+    public void setCreateUser(String createUser) {
         this.createUser = createUser;
     }
-    public String getVuforiaImageGroupId(){
+
+    public String getVuforiaImageGroupId() {
         return this.vuforiaImageGroupId;
     }
 
-    public void setVuforiaImageGroupId(String vuforiaImageGroupId){
+    public void setVuforiaImageGroupId(String vuforiaImageGroupId) {
         this.vuforiaImageGroupId = vuforiaImageGroupId;
     }
-    public String getName(){
+
+    public String getName() {
         return this.name;
     }
 
-    public void setName(String name){
+    public void setName(String name) {
         this.name = name;
     }
-    public String getVuforiaImageTypeId(){
+
+    public String getVuforiaImageTypeId() {
         return this.vuforiaImageTypeId;
     }
 
-    public void setVuforiaImageTypeId(String vuforiaImageTypeId){
+    public void setVuforiaImageTypeId(String vuforiaImageTypeId) {
         this.vuforiaImageTypeId = vuforiaImageTypeId;
     }
-    public String getAreaMarking(){
+
+    public String getAreaMarking() {
         return this.areaMarking;
     }
 
-    public void setAreaMarking(String areaMarking){
+    public void setAreaMarking(String areaMarking) {
         this.areaMarking = areaMarking;
     }
-    public String getLandMarkId(){
+
+    public String getLandMarkId() {
         return this.landMarkId;
     }
 
-    public void setLandMarkId(String landMarkId){
+    public void setLandMarkId(String landMarkId) {
         this.landMarkId = landMarkId;
     }
-    public String getArContentGroupId(){
+
+    public String getArContentGroupId() {
         return this.arContentGroupId;
     }
 
-    public void setArContentGroupId(String arContentGroupId){
+    public void setArContentGroupId(String arContentGroupId) {
         this.arContentGroupId = arContentGroupId;
     }
-    public String getPosX(){
+
+    public String getPosX() {
         return this.posX;
     }
 
-    public void setPosX(String posX){
+    public void setPosX(String posX) {
         this.posX = posX;
     }
-    public String getPosY(){
+
+    public String getPosY() {
         return this.posY;
     }
 
-    public void setPosY(String posY){
+    public void setPosY(String posY) {
         this.posY = posY;
     }
-    public String getPosZ(){
+
+    public String getPosZ() {
         return this.posZ;
     }
 
-    public void setPosZ(String posZ){
+    public void setPosZ(String posZ) {
         this.posZ = posZ;
     }
-    public String getAngle(){
+
+    public String getAngle() {
         return this.angle;
     }
 
-    public void setAngle(String angle){
+    public void setAngle(String angle) {
         this.angle = angle;
     }
-    public String getRemark1(){
+
+    public String getRemark1() {
         return this.remark1;
     }
 
-    public void setRemark1(String remark1){
+    public void setRemark1(String remark1) {
         this.remark1 = remark1;
     }
-    public String getRemark2(){
+
+    public String getRemark2() {
         return this.remark2;
     }
 
-    public void setRemark2(String remark2){
+    public void setRemark2(String remark2) {
         this.remark2 = remark2;
     }
-    public String getRemark3(){
+
+    public String getRemark3() {
         return this.remark3;
     }
 
-    public void setRemark3(String remark3){
+    public void setRemark3(String remark3) {
         this.remark3 = remark3;
     }
-    public String getVuforiaImage(){
+
+    public String getVuforiaImage() {
         return this.vuforiaImage;
     }
 
-    public void setVuforiaImage(String vuforiaImage){
+    public void setVuforiaImage(String vuforiaImage) {
         this.vuforiaImage = vuforiaImage;
     }
 
-public String getSearchKey() {
-    return searchKey;
-}
+    public String getSearchKey() {
+        return searchKey;
+    }
 
-public void setSearchKey(String searchKey) {
-    this.searchKey = searchKey;
-}
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
 
-public String getAdvancedQuery() {
-    return advancedQuery;
-}
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
 
-public void setAdvancedQuery(String advancedQuery) {
-    this.advancedQuery = advancedQuery;
-}
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
 
-public String getOrderByStr() {
-    return orderByStr;
-}
+    public String getOrderByStr() {
+        return orderByStr;
+    }
 
-public void setOrderByStr(String orderByStr) {
-    this.orderByStr = orderByStr;
-}
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
 
-public String getIdStr() {
-    return idStr;
-}
+    public String getIdStr() {
+        return idStr;
+    }
 
-public void setIdStr(String idStr) {
-    this.idStr = idStr;
-}
+    public void setIdStr(String idStr) {
+        this.idStr = idStr;
+    }
 
+    public String getTargetId() {
+        return targetId;
+    }
+
+    public void setTargetId(String targetId) {
+        this.targetId = targetId;
+    }
 }
 

+ 91 - 18
src/main/java/com/izouma/awesomeadmin/service/impl/VuforiaImageInfoServiceImpl.java

@@ -1,6 +1,11 @@
 package com.izouma.awesomeadmin.service.impl;
 
 import java.util.*;
+
+import com.izouma.awesomeadmin.dao.VuforiaImageGroupMapper;
+import com.izouma.awesomeadmin.model.VuforiaImageGroup;
+import com.izouma.awesomeadmin.vuforia.VuforiaUtil;
+import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -11,15 +16,17 @@ import com.izouma.awesomeadmin.service.VuforiaImageInfoService;
 import com.izouma.awesomeadmin.dao.VuforiaImageInfoMapper;
 
 /**
-*  service接口实现类
-*/
+ * service接口实现类
+ */
 @Service
-public class VuforiaImageInfoServiceImpl implements VuforiaImageInfoService{
+public class VuforiaImageInfoServiceImpl implements VuforiaImageInfoService {
 
     private static Logger logger = Logger.getLogger(VuforiaImageInfoServiceImpl.class);
 
     @Autowired
     private VuforiaImageInfoMapper vuforiaImageInfoMapper;
+    @Autowired
+    private VuforiaImageGroupMapper vuforiaImageGroupMapper;
 
     @Override
     public List<VuforiaImageInfo> getVuforiaImageInfoList(VuforiaImageInfo record) {
@@ -27,26 +34,27 @@ public class VuforiaImageInfoServiceImpl implements VuforiaImageInfoService{
         logger.info("getVuforiaImageInfoList");
         try {
 
-        return vuforiaImageInfoMapper.queryAllVuforiaImageInfo(record);
+            return vuforiaImageInfoMapper.queryAllVuforiaImageInfo(record);
         } catch (Exception e) {
-        logger.error("getVuforiaImageInfoList", e);
+            logger.error("getVuforiaImageInfoList", e);
         }
 
         return null;
     }
+
     @Override
     public List<VuforiaImageInfo> getVuforiaImageInfoByPage(Page page, VuforiaImageInfo record) {
 
         logger.info("getVuforiaImageInfoByPage");
         try {
 
-        Map<String, Object> parameter = new HashMap<String, Object>();
-        parameter.put("record", record);
-        parameter.put(AppConstant.PAGE, page);
+            Map<String, Object> parameter = new HashMap<String, Object>();
+            parameter.put("record", record);
+            parameter.put(AppConstant.PAGE, page);
 
-        return vuforiaImageInfoMapper.queryVuforiaImageInfoByPage(parameter);
+            return vuforiaImageInfoMapper.queryVuforiaImageInfoByPage(parameter);
         } catch (Exception e) {
-        logger.error("getVuforiaImageInfoByPage", e);
+            logger.error("getVuforiaImageInfoByPage", e);
         }
 
         return null;
@@ -60,7 +68,7 @@ public class VuforiaImageInfoServiceImpl implements VuforiaImageInfoService{
 
             return vuforiaImageInfoMapper.selectByPrimaryKey(Integer.valueOf(id));
         } catch (Exception e) {
-        logger.error("getVuforiaImageInfoById", e);
+            logger.error("getVuforiaImageInfoById", e);
         }
 
         return null;
@@ -74,7 +82,7 @@ public class VuforiaImageInfoServiceImpl implements VuforiaImageInfoService{
 
             return vuforiaImageInfoMapper.queryVuforiaImageInfo(record);
         } catch (Exception e) {
-        logger.error("getVuforiaImageInfo", e);
+            logger.error("getVuforiaImageInfo", e);
         }
 
         return null;
@@ -86,10 +94,35 @@ public class VuforiaImageInfoServiceImpl implements VuforiaImageInfoService{
         logger.info("createVuforiaImageInfo");
         try {
 
+            if (StringUtils.isNotEmpty(record.getVuforiaImageGroupId())) {//保存识别图
+
+                VuforiaImageGroup vuforiaImageGroup = vuforiaImageGroupMapper.selectByPrimaryKey(Integer.valueOf(record.getVuforiaImageGroupId()));
+
+                if (vuforiaImageGroup != null) {
+
+                    String accessKey = vuforiaImageGroup.getAccessKey();
+                    String secretKey = vuforiaImageGroup.getSecretKey();
+                    String targetName = record.getName();
+                    double width = 20.0;
+                    String imageUrl = record.getVuforiaImage();
+
+                    if (StringUtils.isNotEmpty(accessKey) && StringUtils.isNotEmpty(secretKey)) {
+
+                        String targetId = VuforiaUtil.PostNewTarget(imageUrl, targetName, width, accessKey, secretKey);
+                        if (StringUtils.isNotEmpty(targetId)) {
+                            record.setTargetId(targetId);
+                        }
+
+                    }
+
+                }
+
+            }
+
             int updates = vuforiaImageInfoMapper.insertSelective(record);
 
             if (updates > 0) {
-                 return true;
+                return true;
             }
         } catch (Exception e) {
             logger.error("createVuforiaImageInfo", e);
@@ -104,13 +137,13 @@ public class VuforiaImageInfoServiceImpl implements VuforiaImageInfoService{
         logger.info("deleteVuforiaImageInfo");
         try {
 
-             int updates = vuforiaImageInfoMapper.delete(record);
+            int updates = vuforiaImageInfoMapper.delete(record);
 
             if (updates > 0) {
-                 return true;
+                return true;
             }
         } catch (Exception e) {
-             logger.error("deleteVuforiaImageInfo", e);
+            logger.error("deleteVuforiaImageInfo", e);
         }
 
         return false;
@@ -121,14 +154,54 @@ public class VuforiaImageInfoServiceImpl implements VuforiaImageInfoService{
 
         logger.info("updateVuforiaImageInfo");
         try {
+            VuforiaImageInfo vuforiaImageInfo = vuforiaImageInfoMapper.selectByPrimaryKey(record.getId());
 
             int updates = vuforiaImageInfoMapper.updateByPrimaryKeySelective(record);
 
             if (updates > 0) {
-                 return true;
+
+                if (StringUtils.isNotEmpty(record.getVuforiaImageGroupId())) {//保存识别图
+
+                    VuforiaImageGroup vuforiaImageGroup = vuforiaImageGroupMapper.selectByPrimaryKey(Integer.valueOf(record.getVuforiaImageGroupId()));
+
+                    if (vuforiaImageGroup != null) {
+
+                        String accessKey = vuforiaImageGroup.getAccessKey();
+                        String secretKey = vuforiaImageGroup.getSecretKey();
+                        String targetId = vuforiaImageInfo.getTargetId();
+
+                        String targetName = null;
+                        if (StringUtils.isNotEmpty(record.getName())) {
+                            if (!vuforiaImageInfo.getName().equals(record.getName())) {
+                                targetName = record.getName();
+                            }
+                        }
+
+                        String imageUrl = null;
+
+                        if (StringUtils.isNotEmpty(record.getVuforiaImage())) {
+                            if (!vuforiaImageInfo.getVuforiaImage().equals(record.getVuforiaImage())) {
+                                imageUrl = record.getVuforiaImage();
+                            }
+                        }
+
+                        if (StringUtils.isNotEmpty(accessKey) && StringUtils.isNotEmpty(secretKey) && StringUtils.isNotEmpty(targetId)) {
+
+                            if (StringUtils.isNotEmpty(targetName) || StringUtils.isNotEmpty(imageUrl)) {
+                                VuforiaUtil.updateTarget(targetId, targetName, 0, imageUrl, accessKey, secretKey);
+                            }
+
+
+                        }
+
+                    }
+
+                }
+
+                return true;
             }
         } catch (Exception e) {
-             logger.error("updateVuforiaImageInfo", e);
+            logger.error("updateVuforiaImageInfo", e);
         }
 
         return false;

+ 4 - 2
src/main/java/com/izouma/awesomeadmin/vuforia/PostNewTarget.java

@@ -33,8 +33,8 @@ public class PostNewTarget implements TargetStatusListener {
 	private String secretKey = "21f5b1d95a537e501ed62baad256f44f2b1ea022";
 	
 	private String url = "https://vws.vuforia.com";
-	private String targetName = "ceshi11";
-	private String imageLocation = "C:\\Users\\12413\\Desktop\\图片\\u=1484732512,826284216&fm=11&gp=0.jpg";
+	private String targetName = "ceshi222";
+	private String imageLocation = "http://oss.izouma.com/yimishijie/images/2018-12-06-09-32-37-gr89k16u.jpg";
 
 	private TargetStatusPoller targetStatusPoller;
 	
@@ -127,5 +127,7 @@ public class PostNewTarget implements TargetStatusListener {
 		PostNewTarget p = new PostNewTarget();
 		p.postTargetThenPollStatus();
 	}
+
+
 	
 }

+ 214 - 0
src/main/java/com/izouma/awesomeadmin/vuforia/VuforiaUtil.java

@@ -0,0 +1,214 @@
+package com.izouma.awesomeadmin.vuforia;
+
+import com.google.gson.Gson;
+import com.izouma.awesomeadmin.dto.wx.TemplateMessage;
+import com.izouma.awesomeadmin.util.MbappUtil;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.http.HttpResponse;
+import org.apache.http.ParseException;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.cookie.DateUtils;
+import org.apache.http.message.BasicHeader;
+import org.apache.http.util.EntityUtils;
+import org.apache.log4j.Logger;
+import org.apache.xmlbeans.impl.xb.xsdschema.Public;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.springframework.stereotype.Service;
+
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
+import java.io.*;
+import java.net.*;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.*;
+
+/**
+ * Vuforia工具类
+ *
+ * @author
+ */
+@Service
+public class VuforiaUtil {
+
+    private final static String VUFORIA_URL = "https://vws.vuforia.com";
+
+    private static Logger logger = Logger.getLogger(VuforiaUtil.class);
+
+
+    /**
+     * 新增识别图
+     *
+     * @param imageUrl   图片地址
+     * @param targetName 识别图名称
+     * @param width      宽度
+     * @param accessKey  key
+     * @param secretKey  密钥
+     * @return
+     */
+    public static String PostNewTarget(String imageUrl, String targetName, double width, String accessKey, String secretKey) {
+
+        try {
+            HttpPost postRequest = new HttpPost();
+            HttpClient client = new DefaultHttpClient();
+            postRequest.setURI(new URI(VUFORIA_URL + "/targets"));
+            JSONObject requestBody = new JSONObject();
+
+            byte[] image = readImg(imageUrl);
+            requestBody.put("name", targetName); // Mandatory
+            requestBody.put("width", width); // Mandatory
+            requestBody.put("image", Base64.encodeBase64String(image)); // Mandatory
+            requestBody.put("active_flag", 1); // Optional
+            requestBody.put("application_metadata", Base64.encodeBase64String("Vuforia test metadata".getBytes())); // Optional
+
+            postRequest.setEntity(new StringEntity(requestBody.toString()));
+            //setHeaders(postRequest); // Must be done after setting the body
+            SignatureBuilder sb = new SignatureBuilder();
+            postRequest.setHeader(new BasicHeader("Date", DateUtils.formatDate(new Date()).replaceFirst("[+]00:00$", "")));
+            postRequest.setHeader(new BasicHeader("Content-Type", "application/json"));
+            postRequest.setHeader("Authorization", "VWS " + accessKey + ":" + sb.tmsSignature(postRequest, secretKey));
+
+            HttpResponse response = client.execute(postRequest);
+            String responseBody = EntityUtils.toString(response.getEntity());
+            System.out.println(responseBody);
+
+            JSONObject jobj = new JSONObject(responseBody);
+
+            String uniqueTargetId = jobj.has("target_id") ? jobj.getString("target_id") : "";
+            System.out.println("\nCreated target with id: " + uniqueTargetId);
+
+            return uniqueTargetId;
+        } catch (Exception e) {
+            logger.error("PostNewTarget 新增识别图 异常", e);
+
+        }
+        return null;
+    }
+
+
+    public static String updateTarget(String targetId, String targetName, double width, String imageUrl, String accessKey, String secretKey) {
+
+        try {
+            HttpPut putRequest = new HttpPut();
+            HttpClient client = new DefaultHttpClient();
+            putRequest.setURI(new URI(VUFORIA_URL + "/targets/" + targetId));
+            JSONObject requestBody = new JSONObject();
+
+            if (StringUtils.isNotEmpty(targetName)) {
+
+                requestBody.put("name", targetName); // Mandatory
+            }
+
+            if (width > 0) {
+                requestBody.put("width", width); // Mandatory
+            }
+
+            if (StringUtils.isNotEmpty(imageUrl)) {
+
+                byte[] image = readImg(imageUrl);
+                requestBody.put("image", Base64.encodeBase64String(image)); // Mandatory
+            }
+
+            putRequest.setEntity(new StringEntity(requestBody.toString()));
+            //setHeaders(putRequest); // Must be done after setting the body
+
+            SignatureBuilder sb = new SignatureBuilder();
+            putRequest.setHeader(new BasicHeader("Date", DateUtils.formatDate(new Date()).replaceFirst("[+]00:00$", "")));
+            putRequest.setHeader(new BasicHeader("Content-Type", "application/json"));
+            putRequest.setHeader("Authorization", "VWS " + accessKey + ":" + sb.tmsSignature(putRequest, secretKey));
+
+
+            HttpResponse response = client.execute(putRequest);
+            String resultStr = EntityUtils.toString(response.getEntity());
+            System.out.println(resultStr);
+
+            JSONObject jobj = new JSONObject(resultStr);
+
+            String result_code = jobj.has("result_code") ? jobj.getString("result_code") : "";
+
+            return result_code;
+        } catch (Exception e) {
+            logger.error("updateTarget 更新识别图异常", e);
+        }
+        return null;
+    }
+
+
+    public static byte[] readImg(String urlOrPath) {
+
+        Logger logger = Logger.getLogger(FileUtils.class);
+        byte[] imgBytes = new byte[1024 * 1024];
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        BufferedInputStream reader = null;
+        InputStream in = null;
+        URLConnection conn = null;
+        File temFile = null;
+
+        try {
+            if (!urlOrPath.startsWith("http:")) {
+                File imgFile = new File(urlOrPath);
+                if (!imgFile.isFile() || !imgFile.exists() || !imgFile.canRead()) {
+                    logger.info("图片不存在或不可读");
+                    return new byte[0];
+                }
+                in = new FileInputStream(imgFile);
+            } else {
+                URL imgUrl = new URL(urlOrPath);
+                conn = imgUrl.openConnection();
+                temFile = new File(new Date().getTime() + MbappUtil.create_nonce_str() + ".jpg");
+                FileOutputStream tem = new FileOutputStream(temFile);
+                BufferedImage image = ImageIO.read(conn.getInputStream());
+                ImageIO.write(image, "jpg", tem);
+                in = new FileInputStream(temFile);
+            }
+            reader = new BufferedInputStream(in);
+            byte[] buffer = new byte[1024];
+            while (reader.read(buffer) != -1) {
+                out.write(buffer);
+            }
+            imgBytes = out.toByteArray();
+
+        } catch (Exception e) {
+            logger.error("读取图片发生异常", e);
+        } finally {
+            if (reader != null) {
+                try {
+                    reader.close();
+                } catch (IOException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+            }
+            if (in != null) {
+                try {
+                    in.close();
+                } catch (IOException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+            }
+            try {
+                out.close();
+            } catch (IOException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+            if (temFile != null) {
+                temFile.delete();
+            }
+        }
+        return imgBytes;
+    }
+
+
+}

+ 19 - 3
src/main/vue/src/components/VuforiaImageInfo.vue

@@ -32,13 +32,13 @@
                         </el-select>
                     </template>
                 </el-form-item> -->
-                 <el-form-item prop="vuforiaImage" label="识别图">
+                <el-form-item prop="vuforiaImage" label="识别图">
                     <single-upload v-model="formData.vuforiaImage" :disabled="'vuforiaImage'==subColumn"></single-upload>
                 </el-form-item>
                 <el-form-item prop="vuforiaImage" label="识别图URL">
                     <el-input v-model="formData.vuforiaImage" :disabled="'vuforiaImage'==subColumn"></el-input>
                 </el-form-item>
-                
+
                 <el-form-item prop="arContentGroupId" label="AR内容组ID">
                     <el-input v-model="formData.arContentGroupId" :disabled="'arContentGroupId'==subColumn"></el-input>
                 </el-form-item>
@@ -63,7 +63,11 @@
                 <el-form-item prop="remark3" label="备注3">
                     <el-input v-model="formData.remark3" :disabled="'remark3'==subColumn"></el-input>
                 </el-form-item>
-               
+
+                <el-form-item prop="targetId" label="targetId">
+                    <el-input v-model="formData.targetId"></el-input>
+                </el-form-item>
+
             </div>
             <el-form-item style="margin-top:10px;">
                 <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
@@ -166,6 +170,18 @@ export default {
         return {
             saving: false,
             rules: {
+                vuforiaImageGroupId:
+                    [
+                        { required: true, message: '选择 所属图集ID', trigger: 'blur' },
+                    ],
+                name:
+                    [
+                        { required: true, message: '请输入 识别图名称', trigger: 'blur' },
+                    ],
+                vuforiaImage:
+                    [
+                        { required: true, message: '请上传 识别图', trigger: 'blur' },
+                    ],
             },
             vuforiaImageGroupIdOptions: [],
             vuforiaImageTypeIdOptions: [],

+ 96 - 83
src/main/vue/src/pages/VuforiaImageGroup.vue

@@ -1,23 +1,28 @@
 <template>
     <div>
-        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small"
-                 style="max-width: 500px;">
-                                                                                                                                                                                                                                    <el-form-item prop="vuforiaDataName" label="识别图数据名称">
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small" style="max-width: 500px;">
+            <el-form-item prop="vuforiaDataName" label="识别图数据名称">
                 <el-input v-model="formData.vuforiaDataName" :disabled="'vuforiaDataName'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="vuforiaName" label="识别图集名称">
+            <el-form-item prop="vuforiaName" label="识别图集名称">
                 <el-input v-model="formData.vuforiaName" :disabled="'vuforiaName'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="remark1" label="备注1">
+            <el-form-item prop="remark1" label="备注1">
                 <el-input v-model="formData.remark1" :disabled="'remark1'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="remark2" label="备注2">
+            <el-form-item prop="remark2" label="备注2">
                 <el-input v-model="formData.remark2" :disabled="'remark2'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                                                            <el-form-item prop="remark3" label="备注3">
+            <el-form-item prop="remark3" label="备注3">
                 <el-input v-model="formData.remark3" :disabled="'remark3'==subColumn"></el-input>
             </el-form-item>
-                                                                                                                                                                                                                                                                                        <el-form-item>
+            <el-form-item prop="accessKey" label="accessKey">
+                <el-input v-model="formData.accessKey" ></el-input>
+            </el-form-item>
+            <el-form-item prop="secretKey" label="secretKey">
+                <el-input v-model="formData.secretKey" ></el-input>
+            </el-form-item>
+            <el-form-item>
                 <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
                 <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
                 <el-button @click="$router.go(-1)">取消</el-button>
@@ -26,100 +31,108 @@
     </div>
 </template>
 <script>
-    import formValidator from '../formValidator'
+import formValidator from '../formValidator'
 
-    export default {
-        created() {
-            if (this.$route.query.column) {
-                this.subColumn = this.$route.query.column.split(',')[1];
-                this.subValue = this.$route.query.column.split(',')[0];
-            }
+export default {
+    created() {
+        if (this.$route.query.column) {
+            this.subColumn = this.$route.query.column.split(',')[1];
+            this.subValue = this.$route.query.column.split(',')[0];
+        }
+
+        if (this.$route.query.id) {
+            this.$http.get({
+                url: '/vuforiaImageGroup/getOne',
+                data: {
+                    id: this.$route.query.id
+                }
+            }).then(res => {
+                if (res.success) {
 
-            if (this.$route.query.id) {
-                this.$http.get({
-                    url: '/vuforiaImageGroup/getOne',
-                    data: {
-                        id: this.$route.query.id
-                    }
-                }).then(res => {
-                    if (res.success) {
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
-                        this.formData = res.data;
+                    this.formData = res.data;
 
                     if (this.$route.query.column) {
                         this.formData[this.subColumn] = this.subValue;
                     }
-                    }
-                })
-            }else {
-                if (this.$route.query.column) {
-                    this.formData[this.subColumn] = this.subValue;
                 }
+            })
+        } else {
+            if (this.$route.query.column) {
+                this.formData[this.subColumn] = this.subValue;
             }
+        }
 
-                                                                                                                                                                                                                                                                                                                                        },
-        data() {
-            return {
-                saving: false,
-                formData: {},
-                rules: {
-                                                                                                                                                                                                                        vuforiaDataName:
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {},
+            rules: {
+                vuforiaDataName:
                     [
-                                                {required: true, message: '请输入 识别图数据名称', trigger: 'blur'},
-                                                                    ],
-                                                                vuforiaName:
+                        { required: true, message: '请输入 识别图数据名称', trigger: 'blur' },
+                    ],
+                vuforiaName:
                     [
-                                                {required: true, message: '请输入 识别图集名称', trigger: 'blur'},
-                                                                    ],
-                                                                                                                        },
-                                                                                                    subColumn: '',
+                        { required: true, message: '请输入 识别图集名称', trigger: 'blur' },
+                    ],
+                accessKey:
+                    [
+                        { required: true, message: '请输入 识别图集accessKey', trigger: 'blur' },
+                    ],
+                secretKey:
+                    [
+                        { required: true, message: '请输入 识别图集secretKey', trigger: 'blur' },
+                    ],
+            },
+            subColumn: '',
             subValue: '',
         }
+    },
+    methods: {
+        onSave() {
+            this.$refs.form.validate((valid) => {
+                if (valid) {
+                    this.submit();
+                } else {
+                    return false;
+                }
+            });
         },
-        methods: {
-            onSave() {
-                this.$refs.form.validate((valid) => {
-                    if (valid) {
-                        this.submit();
-                    } else {
-                        return false;
-                    }
-                });
-            },
-            submit() {
-                var data = JSON.parse(JSON.stringify(this.formData));
-                this.$http.post({
-                    url: this.formData.id ? '/vuforiaImageGroup/update' : '/vuforiaImageGroup/save',
-                    data: data
-                }).then(res => {
-                    if (res.success) {
-                        this.$message.success('成功');
-                        this.$router.go(-1);
-                    } else {
-                        this.$message.warning('失败')
-                    }
-                });
-            },
-            onDelete() {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
-                    return this.$http.post({
+        submit() {
+            var data = JSON.parse(JSON.stringify(this.formData));
+            this.$http.post({
+                url: this.formData.id ? '/vuforiaImageGroup/update' : '/vuforiaImageGroup/save',
+                data: data
+            }).then(res => {
+                if (res.success) {
+                    this.$message.success('成功');
+                    this.$router.go(-1);
+                } else {
+                    this.$message.warning('失败')
+                }
+            });
+        },
+        onDelete() {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                return this.$http.post({
                     url: '/vuforiaImageGroup/del',
                     data: { id: this.formData.id }
-                    })
-                }).then(() => {
-                    this.$message.success('删除成功');
-                    this.$router.go(-1);
-                }).catch(action => {
-                    if (action === 'cancel') {
-                        this.$message.info('删除取消');
-                    } else {
-                        this.$message.error('删除失败');
-                    }
                 })
-            },
-        }
+            }).then(() => {
+                this.$message.success('删除成功');
+                this.$router.go(-1);
+            }).catch(action => {
+                if (action === 'cancel') {
+                    this.$message.info('删除取消');
+                } else {
+                    this.$message.error('删除失败');
+                }
+            })
+        },
     }
+}
 </script>
 <style lang="less" scoped>
 </style>

+ 3 - 0
src/main/vue/src/pages/VuforiaImageInfo.vue

@@ -63,6 +63,9 @@
             <el-form-item prop="remark3" label="备注3">
                 <el-input v-model="formData.remark3" :disabled="'remark3'==subColumn"></el-input>
             </el-form-item>
+            <el-form-item prop="targetId" label="targetId">
+                <el-input v-model="formData.targetId"></el-input>
+            </el-form-item>
 
             <el-form-item>
                 <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>

+ 1 - 1
src/main/webapp/WEB-INF/html/admin.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=origin><title>管理后台</title><link rel=icon href=/static/favicon.ico><script src=/static/polyfill.min.js></script><script src=/static/fontawesome-v5.2.0.js></script><link href=/static/css/admin.a99382f8104ef0229e42fbe0f11ef186.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.67ae34230152db4e56dd.js></script><script type=text/javascript src=/static/js/vendor.631c08d5fc0f22d7ee46.js></script><script type=text/javascript src=/static/js/admin.f1968463b09e086e4be0.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=origin><title>管理后台</title><link rel=icon href=/static/favicon.ico><script src=/static/polyfill.min.js></script><script src=/static/fontawesome-v5.2.0.js></script><link href=/static/css/admin.a99382f8104ef0229e42fbe0f11ef186.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.14228c000857a7011b18.js></script><script type=text/javascript src=/static/js/vendor.631c08d5fc0f22d7ee46.js></script><script type=text/javascript src=/static/js/admin.400e69a4b3157702c220.js></script></body></html>

+ 1 - 1
src/main/webapp/WEB-INF/html/loginAdmin.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=origin><title>管理后台</title><link rel=icon href=/static/favicon.ico><script src=/static/polyfill.min.js></script><link href=/static/css/loginAdmin.a1de29a9f9c1d5b671b1965892c17dd1.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.67ae34230152db4e56dd.js></script><script type=text/javascript src=/static/js/vendor.631c08d5fc0f22d7ee46.js></script><script type=text/javascript src=/static/js/loginAdmin.c9cb308e894a7cd72b31.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=origin><title>管理后台</title><link rel=icon href=/static/favicon.ico><script src=/static/polyfill.min.js></script><link href=/static/css/loginAdmin.a1de29a9f9c1d5b671b1965892c17dd1.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.14228c000857a7011b18.js></script><script type=text/javascript src=/static/js/vendor.631c08d5fc0f22d7ee46.js></script><script type=text/javascript src=/static/js/loginAdmin.c9cb308e894a7cd72b31.js></script></body></html>

File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/17.a6b6ae680d7c5d49f457.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/18.b4791dd219c5975b0abc.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/19.3842540af3eec8a94c17.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/31.f963ba3d4205b544ff1c.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/32.46264a24f69079fc2526.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/33.1786477b948415455d6c.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/34.2b953a54aa9fa24921a7.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/35.444d017f53ef1f93f9b0.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/36.3abc3886147e7fd17908.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/37.ae929f8d43fdee3a2080.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/7.b03803b7e01adbb508da.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/admin.f1968463b09e086e4be0.js


File diff suppressed because it is too large
+ 0 - 0
src/main/webapp/static/js/manifest.67ae34230152db4e56dd.js


+ 40 - 0
src/test/java/VuforialUtilTest.java

@@ -0,0 +1,40 @@
+import com.izouma.awesomeadmin.service.UserInfoService;
+import com.izouma.awesomeadmin.vuforia.VuforiaUtil;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.support.GenericXmlContextLoader;
+import org.springframework.transaction.annotation.Transactional;
+
+@RunWith(value = SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = {"classpath:/spring/applicationContext.xml"}, loader = GenericXmlContextLoader.class)
+@Transactional
+public class VuforialUtilTest {
+
+    @Test
+    public void PostNewTargetTest() {
+        String imageUrl = "http://oss.izouma.com/yimishijie/images/2018-12-06-09-32-37-gr89k16u.jpg";
+        String targetName = "ceshiadd1";
+        double width = 30.0;
+        String accessKey = "391531184ed5cf0d998a91f193eddd57cff3b074";
+        String secretKey = "21f5b1d95a537e501ed62baad256f44f2b1ea022";
+        String targetId = VuforiaUtil.PostNewTarget(imageUrl, targetName, width, accessKey, secretKey);
+        System.out.println(targetId);
+    }
+
+    @Test
+    public void UpdateTargetTest() {
+        String targetName = "ceshiadd2";
+        double width = 20.0;
+        String accessKey = "391531184ed5cf0d998a91f193eddd57cff3b074";
+        String secretKey = "21f5b1d95a537e501ed62baad256f44f2b1ea022";
+        String targetId = "8761cf50dc9b4e198b608c3cac8d6f27";
+        String result_code = VuforiaUtil.updateTarget(targetId, targetName, width, null, accessKey, secretKey);
+        System.out.println(result_code);
+    }
+
+
+
+}

Some files were not shown because too many files changed in this diff