瀏覽代碼

Merge branch 'pre'

dzx 1 年之前
父節點
當前提交
0e7e2996ff

+ 2 - 1
src/main/java/com/xjrsoft/module/concat/controller/ConcatController.java

@@ -63,9 +63,10 @@ public class ConcatController {
         }
         MPJLambdaWrapper<XjrUser> wrapper = new MPJLambdaWrapper<>();
         wrapper.leftJoin("xjr_user_dept_relation t2 on t.id = t2.user_id")
-                .eq("t2.dept_id", parentId)
+                .like("t4.hierarchy", parentId + "-")
                 .leftJoin("xjr_user_role_relation t3 ON t.id = t3.user_id")
                 .leftJoin("xjr_role t4 ON t4.id = t3.role_id")
+                .leftJoin("xjr_department t5 ON t2.dept_id = t4.id")
                 .eq("t4.id", 2)
                 .eq(StrUtil.isNotEmpty(dto.getName()), XjrUser::getName, dto.getName())
                 .eq(StrUtil.isNotEmpty(dto.getMobile()), XjrUser::getMobile, dto.getMobile())

+ 3 - 0
src/main/java/com/xjrsoft/module/oa/vo/NewsPageVo.java

@@ -184,4 +184,7 @@ public class NewsPageVo {
 
     @ApiModelProperty("封面")
     private Long cover;
+
+    @ApiModelProperty("是否已读(1:是 0:否)")
+    private Integer readMark;
 }

+ 17 - 0
src/main/java/com/xjrsoft/module/organization/controller/UserController.java

@@ -46,6 +46,7 @@ import com.xjrsoft.module.organization.dto.ResetPasswordDto;
 import com.xjrsoft.module.organization.dto.UpdateInfoDto;
 import com.xjrsoft.module.organization.dto.UpdatePasswordDto;
 import com.xjrsoft.module.organization.dto.UpdateUserDto;
+import com.xjrsoft.module.organization.dto.UploadMobileDto;
 import com.xjrsoft.module.organization.dto.UploadSignDto;
 import com.xjrsoft.module.organization.dto.UserChangeStatusDto;
 import com.xjrsoft.module.organization.dto.UserPageDto;
@@ -851,4 +852,20 @@ public class UserController {
         }
         return RT.ok(true);
     }
+
+    @PostMapping("/upload-mobile")
+    @ApiOperation(value = "修改手机号")
+    public R uploadMobile(@Valid @RequestBody UploadMobileDto dto) {
+        // 验证验证码
+        if (!smsCtcc.captchaVerify(dto.getOldMobile(), dto.getSmsCode())) {
+            return R.error("验证码不正确!");
+        }
+        if(dto.getUserId() == null){
+            dto.setUserId(StpUtil.getLoginIdAsLong());
+        }
+        User user = userService.getById(dto.getUserId());
+        user.setMobile(dto.getMobile());
+
+        return R.ok(userService.updateById(user));
+    }
 }

+ 20 - 0
src/main/java/com/xjrsoft/module/organization/dto/UploadMobileDto.java

@@ -0,0 +1,20 @@
+package com.xjrsoft.module.organization.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class UploadMobileDto {
+
+    @ApiModelProperty("用户id")
+    private Long userId;
+
+    @ApiModelProperty("手机号")
+    private String mobile;
+
+    @ApiModelProperty("验证码")
+    private String smsCode;
+
+    @ApiModelProperty("旧手机号")
+    private String oldMobile;
+}

+ 3 - 1
src/main/java/com/xjrsoft/module/student/controller/BaseNewStudentController.java

@@ -62,6 +62,7 @@ import javax.validation.Valid;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.LinkedHashMap;
@@ -357,7 +358,7 @@ public class BaseNewStudentController {
     public ResponseEntity<byte[]> exportData(@Valid BaseNewStudentPageDto dto) {
         List<BaseNewStudentPageVo> reportList = baseNewStudentService.getReportList(dto);
         List<BaseNewStudentExportVo> exportVos = new ArrayList<>();
-
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         for (BaseNewStudentPageVo el : reportList) {
             BaseNewStudentExportVo vo = BeanUtil.toBean(el, BaseNewStudentExportVo.class);
             if(el.getIsAdjust() == 1){
@@ -365,6 +366,7 @@ public class BaseNewStudentController {
             }else if(el.getIsAdjust() == 0){
                 vo.setReportStatus("否");
             }
+            vo.setReportTime(el.getReportTime().format(formatter));
             exportVos.add(vo);
         }
         ByteArrayOutputStream bot = new ByteArrayOutputStream();

+ 1 - 1
src/main/java/com/xjrsoft/module/student/vo/BaseNewStudentExportVo.java

@@ -64,6 +64,6 @@ public class BaseNewStudentExportVo {
 
     @ExcelProperty("报到时间")
     @ApiModelProperty("报到时间")
-    private LocalDate reportTime;
+    private String reportTime;
 
 }

+ 6 - 0
src/main/resources/mapper/oa/NewsMapper.xml

@@ -33,8 +33,14 @@
             resultType="com.xjrsoft.module.oa.vo.NewsPageVo">
         select
         t.*,t2.name as create_user_name
+        <if test="dto.type != null and dto.type == 2 and dto.loginId != null">
+            ,t3.read_mark
+        </if>
         from xjr_oa_news t
         left join xjr_user t2 on t.create_user_id = t2.id
+        <if test="dto.type != null and dto.type == 2 and dto.loginId != null">
+            left join xjr_oa_news_relation t3 on t.id = t3.news_id and t3.user_id = #{dto.loginId}
+        </if>
         where t.delete_mark = 0 and
         (t.send_end_date > now() or t.send_end_date is null)
           and t.status = 2