yangdamao 1 жил өмнө
parent
commit
cdfce119a2

+ 0 - 1
run-prod.sh

@@ -1,4 +1,3 @@
-
 #!/usr/bin/env bash
 # 定义应用组名
 group_admin_name='zhongzheng'

+ 7 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/common/CommonController.java

@@ -396,6 +396,13 @@ public class CommonController extends BaseController {
         return AjaxResult.success(base);
     }
 
+    @ApiOperation("学员学时图片修改")
+    @PostMapping("common/student/image/spin")
+    public AjaxResult updateStudentImageSpin(@RequestBody UpdateStudentImageBo bo) {
+        iUserSubscribeService.updateStudentImageSpin(bo);
+        return AjaxResult.success();
+    }
+
     @ApiOperation("获取外部题库商品(山东题库)")
     @PostMapping("common/external/question")
     public AjaxResult getExternalQuestion(@RequestBody ExternalQuestionBo bo) {

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserSubscribeService.java

@@ -129,4 +129,6 @@ public interface IUserSubscribeService extends IService<UserSubscribe> {
 	List<UserApplyRecordVo> listUserApply(UserApplyRecordBo bo);
 
 	List<UserPromiseRecordVo> listPromise(UserPromiseRecordBo bo);
+
+	void updateStudentImageSpin(UpdateStudentImageBo bo);
 }

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserSubscribeServiceImpl.java

@@ -3005,6 +3005,16 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
         return recordVos;
     }
 
+    @Override
+    public void updateStudentImageSpin(UpdateStudentImageBo bo) {
+        try {
+            ossService.processObject(bo.getImageUrl(),bo.getImageUrl(),String.format("image/rotate,%s",180));
+        }catch (Exception e){
+            e.printStackTrace();
+            throw new CustomException("修改图片错误!");
+        }
+    }
+
     private String applyTimeTransition(String time){
         List<String> collect = Arrays.stream(time.split(":")).collect(Collectors.toList());
         StringBuffer result = new StringBuffer();