wangbo 3 years ago
parent
commit
679232b841

+ 3 - 4
operation_manager/src/main/java/com/huaxu/order/controller/WorkOrderManageController.java

@@ -370,12 +370,12 @@ public class WorkOrderManageController {
                 String originalFilename = file.getOriginalFilename();
                 String suffixName = originalFilename.substring(originalFilename.lastIndexOf("."));
                 //存储路径
-                if(!suffixName.toLowerCase().equals("apk")||!suffixName.toLowerCase().equals("ipa")){
-                    new AjaxMessage<>(ResultStatus.ERROR, "上传文件类型不正确");
+                if(!suffixName.toLowerCase().equals(".apk")||!suffixName.toLowerCase().equals(".ipa")){
+                    return new AjaxMessage<>(ResultStatus.ERROR, "上传文件类型不正确");
                 }
                 long size = file.getSize();
                 if (size >  1024 * 1024 * 200) {
-                    throw new RxcException("10004", "文件不能超过200M");
+                    return   new AjaxMessage<>(ResultStatus.ERROR, "文件不能超过200M");
                 }
                 avatar = new StringBuffer(appPackageDir).append(originalFilename).toString();
                 File dest = new File(avatar);
@@ -390,7 +390,6 @@ public class WorkOrderManageController {
         return new AjaxMessage<>(ResultStatus.OK, avatar);
     }
 
-
     @GetMapping("/event/select")
     @ApiOperation(value = "查询事件隐患/所有工单")
     public AjaxMessage<Pagination<WorkOrderManageDto>> selectEvent(

+ 4 - 0
user_center/src/main/java/com/huaxu/entity/VerManageEntity.java

@@ -87,6 +87,10 @@ public class VerManageEntity implements Serializable {
     /** 强制升级版本 */
     @ApiModelProperty(value = "强制升级版本")
     private String forcedUpgradeVer;
+    
+    /** 下载地址 */
+    @ApiModelProperty(value = "下载地址")
+    private String download;
 
     /** 是否最新版本 */
     @ApiModelProperty(value = "是否最新版本")

+ 12 - 1
user_center/src/main/resources/mapper/VerManageMapper.xml

@@ -18,6 +18,7 @@
         <result property="productType"    column="product_type"    />
         <result property="forcedUpgradeVer"    column="forced_upgrade_ver"    />
         <result property="isNewestVer"    column="is_newest_ver"    />
+        <result property="download"    column="download"    />
     </resultMap>
 
     <!--  实体  -->
@@ -35,7 +36,8 @@
          a.cur_app_ver as "curAppVer" ,
          a.product_type as "productType" ,
          a.forced_upgrade_ver as "forcedUpgradeVer" ,
-         a.is_newest_ver as "isNewestVer"
+         a.is_newest_ver as "isNewestVer" ,
+         a.download as "download"
      </sql>
 
     <!--  根据主键获取实体   -->
@@ -61,6 +63,9 @@
             <if test="verUrl != null" >
                 ver_url,
             </if>
+            <if test="download != null" >
+                download,
+            </if>
             <if test="isForcedUpgrade != null" >
                 is_forced_upgrade,
             </if>
@@ -103,6 +108,9 @@
             <if test="verUrl != null" >
                 #{verUrl,jdbcType=VARCHAR},
             </if>
+            <if test="download != null" >
+                #{download,jdbcType=VARCHAR},
+            </if>
             <if test="isForcedUpgrade != null" >
                 #{isForcedUpgrade,jdbcType=INTEGER},
             </if>
@@ -149,6 +157,9 @@
             <if test="verUrl != null" >
                 ver_url = #{verUrl,jdbcType=VARCHAR},
             </if>
+            <if test="download != null" >
+                download = #{download,jdbcType=VARCHAR},
+            </if>
             <if test="isForcedUpgrade != null" >
                 is_forced_upgrade = #{isForcedUpgrade,jdbcType=INTEGER},
             </if>