소스 검색

广誉源商户端-登录-我的技能,城市管理,状态切换,我的资料

jinwenhai 5 일 전
부모
커밋
a6a88b0977

+ 5 - 0
nightFragrance-admin/src/main/java/com/ylx/web/controller/massage/MaTechnicianController.java

@@ -601,4 +601,9 @@ public class MaTechnicianController extends BaseController {
         return Result.ok(message);
     }
 
+    @GetMapping("/getTechnicianList")
+    public Result<?> getTechnicianList(@RequestParam(value = "userId") Long userId) {
+        return Result.ok(maTechnicianService.getTechnicianList(userId));
+    }
+
 }

+ 20 - 0
nightFragrance-massage/src/main/java/com/ylx/massage/domain/vo/MerchantAuditFile.java

@@ -0,0 +1,20 @@
+package com.ylx.massage.domain.vo;
+
+import com.ylx.massage.domain.MaTechnician;
+import com.ylx.massage.domain.MerchantApplyFile;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 商户审核文件信息
+ * @author ylx
+ * Created on 2022/3/23.
+ */
+@Data
+public class MerchantAuditFile {
+
+    private MaTechnician merchant;
+
+    private List<MerchantApplyFile> merchantAuditFile;
+}

+ 6 - 0
nightFragrance-massage/src/main/java/com/ylx/massage/service/IMaTechnicianService.java

@@ -225,4 +225,10 @@ public interface IMaTechnicianService extends IService<MaTechnician> {
      * @return
      */
     int applyForService(MaProjectSaveDto dto);
+    /**
+     * 商户入住信息
+     * @param userId
+     * @return
+     */
+    MerchantAuditFile getTechnicianList(Long userId);
 }

+ 37 - 13
nightFragrance-massage/src/main/java/com/ylx/massage/service/impl/MaTechnicianServiceImpl.java

@@ -128,12 +128,14 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
         maTechnicianMapper.insert(maTechnician);
 
     }
+
     /**
      * 商户入驻申请文件上传
+     *
      * @param req
      */
     @Override
-    public  void applyFile(MerchantApplyFileDto req){
+    public void applyFile(MerchantApplyFileDto req) {
         MerchantApplyFile maTechnician = new MerchantApplyFile();
         BeanUtils.copyProperties(req, maTechnician);
         maTechnician.setCreateBy(req.getMerchantId().toString());
@@ -396,6 +398,7 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
         }
         return uploadResult;
     }
+
     /**
      * 商户入驻审核。
      *
@@ -448,6 +451,7 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
         }
         return rows;
     }
+
     /**
      * 后台查询商户证照
      *
@@ -468,17 +472,17 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
         MaTechnicianCertificateVO certificate = new MaTechnicianCertificateVO();
         certificate.setMerchantId(merchantApplyFiles.get(0).getMerchantId());
         merchantApplyFiles.forEach(merchant -> {
-            certificate.setAvatar( typeFIleUrl(merchant,PORTRAIT.getCode()));
-            certificate.setLifePhotos( typeFIleUrl(merchant,LIFE_PHOTO.getCode()));
-            certificate.setIdCardFrout( typeFIleUrl(merchant,ID_CARD_FRONT.getCode()));
-            certificate.setIdCardBack( typeFIleUrl(merchant,ID_CARD_BACK.getCode()));
-            certificate.setIdCardHandheld( typeFIleUrl(merchant,ID_CARD_HANDHELD.getCode()));
-            certificate.setHealthCertificate( typeFIleUrl(merchant,HEALTH_CERT.getCode()));
-            certificate.setQualificationCertificate( typeFIleUrl(merchant,QUALIFICATION_CERT.getCode()));
-            certificate.setNoCrimeRecord( typeFIleUrl(merchant,NO_CRIME_RECORD.getCode()));
-            certificate.setCommitmentPdf( typeFIleUrl(merchant,COMMITMENT_LETTER.getCode()));
-            certificate.setCommitmentVideo( typeFIleUrl(merchant,COMMITMENT_VIDEO.getCode()));
-            certificate.setCommitmentAudio( typeFIleUrl(merchant,COMMITMENT_AUDIO.getCode()));
+            certificate.setAvatar(typeFIleUrl(merchant, PORTRAIT.getCode()));
+            certificate.setLifePhotos(typeFIleUrl(merchant, LIFE_PHOTO.getCode()));
+            certificate.setIdCardFrout(typeFIleUrl(merchant, ID_CARD_FRONT.getCode()));
+            certificate.setIdCardBack(typeFIleUrl(merchant, ID_CARD_BACK.getCode()));
+            certificate.setIdCardHandheld(typeFIleUrl(merchant, ID_CARD_HANDHELD.getCode()));
+            certificate.setHealthCertificate(typeFIleUrl(merchant, HEALTH_CERT.getCode()));
+            certificate.setQualificationCertificate(typeFIleUrl(merchant, QUALIFICATION_CERT.getCode()));
+            certificate.setNoCrimeRecord(typeFIleUrl(merchant, NO_CRIME_RECORD.getCode()));
+            certificate.setCommitmentPdf(typeFIleUrl(merchant, COMMITMENT_LETTER.getCode()));
+            certificate.setCommitmentVideo(typeFIleUrl(merchant, COMMITMENT_VIDEO.getCode()));
+            certificate.setCommitmentAudio(typeFIleUrl(merchant, COMMITMENT_AUDIO.getCode()));
 
         });
 
@@ -699,7 +703,7 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
         }
 
         Map<Integer, Project> projectMap = projects.stream()
-                                                .collect(Collectors.toMap(project -> project.getId(), Function.identity(), (left, right) -> left));
+                                                   .collect(Collectors.toMap(project -> project.getId(), Function.identity(), (left, right) -> left));
         Set<Integer> projectCategoryIds = new LinkedHashSet<>();
         for (Integer projectId : distinctProjectIds) {
             Project project = projectMap.get(projectId);
@@ -840,6 +844,26 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
         return 1;
     }
 
+    /**
+     * 商户入住信息
+     *
+     * @param userId
+     * @return
+     */
+    @Override
+    public MerchantAuditFile getTechnicianList(Long userId) {
+        LambdaQueryWrapper<MaTechnician> query = new LambdaQueryWrapper<>();
+        query.eq(MaTechnician::getId, userId);
+        MaTechnician merchant = maTechnicianMapper.selectOne(query);
+        LambdaQueryWrapper<MerchantApplyFile> query1 = new LambdaQueryWrapper<>();
+        query1.eq(MerchantApplyFile::getMerchantId, userId);
+        List<MerchantApplyFile> merchantApplyFile = merchantApplyFileMapper.selectList(query1);
+        MerchantAuditFile merchantAuditFile = new MerchantAuditFile();
+        merchantAuditFile.setMerchant(merchant);
+        merchantAuditFile.setMerchantAuditFile(merchantApplyFile);
+        return merchantAuditFile;
+    }
+
     private void extracted(MaProjectSaveDto dto) {
         LambdaQueryWrapper<Project> query = new LambdaQueryWrapper<>();
         query.in(Project::getId, dto.getProjectIdList());