Bladeren bron

通知公告 下载地址修改

huZhiHao 5 jaren geleden
bovenliggende
commit
8aa8fbf632

+ 44 - 7
src/main/java/platform/modules/home/web/HomeRefactorController.java

@@ -527,6 +527,41 @@ public class HomeRefactorController extends BaseController {
         return ResponseMessage.success("您的申请正在属地审核中,审核通过后,您将收到消息提醒。");
     }
 
+    /**
+     * 企业重置密码
+     *
+     * @param information
+     * @return
+     * @throws Exception
+     */
+    @PutMapping("/reset")
+    @ResponseBody
+    public ResponseMessage reset(@RequestBody Company information) {
+        try {
+            if (!verificationCodeUtil.validateVerificationCode(information.getPhone(), information.getValidateNum())) {
+                return ResponseMessage.error("验证码错误!");
+            }
+            User user = userService.getUserByNickname(information.getNick_name());
+            user.setPassword(SecureUtil.md5().digestHex(information.getPassword()));
+            userService.updateSelective(user);
+
+            // 同步密码到天启
+            SyncUserDto dto = new SyncUserDto();
+            dto.setAction(Constant.METHOD_STATUS.UPDATE);
+            dto.setOldUserName(user.getNick_name());
+            dto.setUserName(user.getUser_name());
+            dto.setUserLoginName(user.getNick_name());
+            dto.setPassword(information.getPassword());
+            dto.setToken(skyImageApiService.accessToken());
+            skyImageApiService.syncUserInfo(dto);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            return ResponseMessage.error("修改失败" + e.getMessage());
+        }
+        return ResponseMessage.success("密码修改成功!系统将跳转到登陆页进行登录");
+    }
+
     /**
      * 用户登陆
      * 先根据用户名查询出一条用户记录再对比密码是否正确可以防止sql注入
@@ -683,7 +718,9 @@ public class HomeRefactorController extends BaseController {
 
         ModelMap modelMap = new ModelMap();
         List<Map> list = contentService.randomPic(num);
-        modelMap.put("fileUrl", setFileUrl());
+        String fileUrl = setFileUrl();
+        fileUrl.replace("/uploads","");
+        modelMap.put("fileUrl", fileUrl);
         modelMap.put("contentList", list);
         return ResponseMessage.success("success", modelMap);
     }
@@ -735,14 +772,14 @@ public class HomeRefactorController extends BaseController {
                     for (Menu permission : menus) {
 
                         if (Objects.equals(permission.getPermission(), "C_STOCKLAND_MANAGE")) {
-                            map.put("moudle","C_SERVICE_MANAGE");
-                            map.put("menu",permission.getPermission());
+                            map.put("moudle", "C_SERVICE_MANAGE");
+                            map.put("menu", permission.getPermission());
                         } else if (Objects.equals(permission.getPermission(), "S_AREA_APPROVE")) {
-                            map.put("moudle","S_SERVICE_MANAGE");
-                            map.put("menu",permission.getPermission());
+                            map.put("moudle", "S_SERVICE_MANAGE");
+                            map.put("menu", permission.getPermission());
                         } else if (Objects.equals(permission.getPermission(), "G_APPROVAL_PENDING")) {
-                            map.put("moudle","G_SERVICE_MANAGE");
-                            map.put("menu",permission.getPermission());
+                            map.put("moudle", "G_SERVICE_MANAGE");
+                            map.put("menu", permission.getPermission());
                         }
 
                     }

+ 7 - 1
src/main/java/platform/modules/sys/service/ActivityFavouriteService.java

@@ -35,7 +35,13 @@ public class ActivityFavouriteService extends BaseService<ActivityFavourite> {
      */
     public Integer saveActivityFavourite(ActivityFavourite activityFavourite) throws Exception {
 
-        User currUser = userService.findById(activityFavourite.getUser_id());
+        User currUser = null;
+        if(ShiroUtils.isLogin()){
+            currUser = ShiroUtils.getUserEntity();
+            activityFavourite.setUser_id(currUser.getId());
+        }else{
+             currUser = userService.findById(activityFavourite.getUser_id());
+        }
 //        User currUser = ShiroUtils.getUserEntity();
 //        activityFavourite.setUser_id(currUser.getId());
         activityFavourite.setUser_type(currUser.getUser_type().toString());

+ 1 - 1
src/main/resources/templates/admin/company/stock_land/approve_check.html

@@ -187,7 +187,7 @@
                                 <th>所属园区</th>
                                 <th>楼栋</th>
                                 <th>楼层</th>
-                                <td>面积</td>
+                                <td>面积(㎡)</td>
                             </tr>
                             </thead>
                             <tbody>

+ 1 - 1
src/main/resources/templates/admin/company/stock_land/approve_page.html

@@ -312,7 +312,7 @@
                                     <th>所属园区</th>
                                     <th>楼栋</th>
                                     <th>楼层</th>
-                                    <td>面积</td>
+                                    <td>面积(㎡)</td>
                                 </tr>
                                 </thead>
                                 <tbody>

+ 1 - 1
src/main/resources/templates/admin/company/stock_land/approve_pass_check.html

@@ -229,7 +229,7 @@
                                 <th>所属园区</th>
                                 <th>楼栋</th>
                                 <th>楼层</th>
-                                <td>面积</td>
+                                <td>面积(㎡)</td>
                             </tr>
                             </thead>
                             <tbody>

+ 1 - 1
src/main/resources/templates/admin/government/areaManager/details.html

@@ -201,7 +201,7 @@
                                 <th>所属园区</th>
                                 <th>楼栋</th>
                                 <th>楼层</th>
-                                <td>面积</td>
+                                <td>面积(㎡)</td>
                             </tr>
                             </thead>
                             <tbody>

+ 19 - 5
src/main/resources/templates/admin/government/industrial_land_supply/feedback.html

@@ -113,7 +113,8 @@
                 <div class="row cl">
                     <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>是否同意:</label>
                     <div class="formControls col-xs-8 col-sm-9">
-                        <input type="radio" th:name="'consultationList['+${itemStat.index}+'].isAgree'" value="true">同意</input>
+                        <input type="radio" th:name="'consultationList['+${itemStat.index}+'].isAgree'"
+                               value="true">同意</input>
                         <input type="radio" th:name="'consultationList['+${itemStat.index}+'].isAgree'" value="false">不同意</input>
                     </div>
                 </div>
@@ -188,10 +189,23 @@
 
     function save() {
 
-        var isAgree = $("input[name='consultationList[0].isAgree']:checked").val();
-        if (isAgree == undefined || isAgree == null || isAgree == "") {
-            errorMessage("请选择是否同意!");
-            return;
+        var index = 0, valiAgree = false;
+        //判断是否有默认的咨询 以及是否校验选择同一
+        var consultationList = [[${data.consultationList}]];
+        for (var i = 0; i < consultationList.length; i++) {
+            if (consultationList[i].isDefault) {
+                valiAgree = true;
+                index = i;
+                break;
+            }
+        }
+        //是否校验选择同一
+        if (valiAgree) {
+            var isAgree = $("input[name='consultationList[" + index + "].isAgree']:checked").val();
+            if (isAgree == undefined || isAgree == null || isAgree == "") {
+                errorMessage("请选择是否同意!");
+                return;
+            }
         }
 
         $("#form-add").ajaxSubmit({