jinshihui před 5 dny
rodič
revize
99553ef1ad

+ 52 - 15
nightFragrance-admin/src/main/java/com/ylx/web/controller/massage/MaTechnicianController.java

@@ -427,15 +427,21 @@ public class MaTechnicianController extends BaseController {
      */
     @GetMapping("/profile")
     @ApiOperation("查询商户端我的资料")
-    public R<MerchantProfileVO> getMerchantProfile(@RequestParam("merchantId") Integer merchantId) {
+    public R<MerchantProfileVO> getMerchantProfile(@RequestParam String openid) {
         try {
-            return R.ok(maTechnicianService.getMerchantProfile(merchantId));
+            return R.ok(maTechnicianService.getMerchantProfile(openid));
         } catch (Exception e) {
             log.error("查询商户端我的资料失败", e);
             return R.fail(e.getMessage());
         }
     }
 
+    /**
+     * 修改我的资料
+     *
+     * @param req
+     * @return R<?>
+     */
     @PostMapping("/profile/submit")
     @ApiOperation("提交商户端我的资料修改审核")
     public R<?> submitMerchantProfile(@Valid @RequestBody MerchantProfileSubmitDTO req) {
@@ -710,24 +716,38 @@ public class MaTechnicianController extends BaseController {
     }
 
     /**
-     * 1. 获取服务类目列表
+     * 获取服务类目列表
+     *
+     * @return List<ServiceCategory> 服务类目列表
      */
     @GetMapping("/getServiceCategoryList")
     @ApiOperation("获取服务类目列表")
     public R<List<ServiceCategory>> getServiceCategoryList() {
-        List<ServiceCategory> list = serviceCategoryService.listH5ServiceCategory();
-        return R.ok(list);
+        try {
+            List<ServiceCategory> list = serviceCategoryService.listH5ServiceCategory();
+            return R.ok(list);
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
     }
 
     /**
-     * 1. 获取技能列表
+     * 获取商户的技能列表
      *
+     * @param req
+     * @return R<List<MaProject>>
      */
     @PostMapping("/getSkillList")
-    @ApiOperation("获取技能列表")
+    @ApiOperation("获取商户的技能列表")
     public R<List<MaProject>> getSkillList(@RequestBody MaProjectGetVo req) {
-        List<MaProject> list = maTechnicianService.selectMaTechnicianListBy(req.getUserId(), req.getAuditStatus());
-        return R.ok(list);
+        try {
+            List<MaProject> list = maTechnicianService.selectMaTechnicianListBy(req.getMerchantId(), req.getAuditStatus());
+            return R.ok(list);
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
     }
 
     /**
@@ -739,16 +759,29 @@ public class MaTechnicianController extends BaseController {
     @PostMapping("/getNotApplyList")
     @ApiOperation("查询未开通的服务项目列表")
     public R<?> getNotApplyList(@RequestBody MaProjectGetVo req) {
-        return R.ok(maTechnicianService.getNotApplyList(req.getUserId(), req.getTypeId()));
+        try {
+            return R.ok(maTechnicianService.getNotApplyList(req.getMerchantId(), req.getServiceTag()));
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
     }
 
     /**
      * 申请开通新服务
+     *
+     * @param dto
+     * @return R<Void>
      */
     @PostMapping("/applyForService")
     @ApiOperation("申请开通新服务")
     public R<Void> applyForService(@RequestBody MaProjectSaveDto dto) {
-        return toR(maTechnicianService.applyForService(dto));
+        try {
+            return toR(maTechnicianService.applyForService(dto));
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
     }
 
     /**
@@ -825,13 +858,17 @@ public class MaTechnicianController extends BaseController {
      * 查询商户合同记录信息
      *
      * @param userId
-     * @return
+     * @return R<ContractRecordVO>
      */
-
     @GetMapping("/getContractRecords")
     @ApiOperation("查询商户合同记录信息")
-    public R<?> getContractRecords(@RequestParam(value = "userId") Long userId) {
-        return R.ok(maTechnicianService.getContractRecords(userId));
+    public R<ContractRecordVO> getContractRecords(@RequestParam(value = "userId") Long userId) {
+        try {
+            return R.ok(maTechnicianService.getContractRecords(userId));
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
     }
 
     private R<Void> toR(int rows) {

+ 45 - 33
nightFragrance-massage/src/main/java/com/ylx/massage/domain/MaProject.java

@@ -1,7 +1,10 @@
 package com.ylx.massage.domain;
 
+import java.io.Serializable;
 import java.math.BigDecimal;
 
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -13,28 +16,38 @@ import lombok.Data;
 import java.util.Date;
 
 /**
- * 服务项目对象 ma_project
+ * 商户服务项目表
  *
  * @author ylx
  * @date 2024-03-20
  */
-@ApiModel(value = "MaProject", description = "服务项目")
+@ApiModel(value = "MaProject", description = "商户服务项目")
 @Data
 @TableName("ma_project")
-public class MaProject {
+public class MaProject implements Serializable {
+
     private static final long serialVersionUID = 1L;
 
     /**
-     * id
+     * id(主键ID)
      */
     @ApiModelProperty("id")
+    @TableId(type = IdType.AUTO)
     private Long id;
+
+    /**
+     * 商户ID
+     */
+    @Excel(name = "商户ID")
+    @ApiModelProperty("商户ID")
+    private Integer merchantId;
+
     /**
      * 项目ID
      */
     @Excel(name = "项目ID")
     @ApiModelProperty("项目ID")
-    private Long projectId;
+    private Integer projectId;
     /**
      * 项目名称
      */
@@ -104,12 +117,13 @@ public class MaProject {
     @Excel(name = "项目主图")
     @ApiModelProperty("项目主图")
     private String projectMasterImage;
+
     /**
-     * 商户类型:0-上门按摩,1-同城陪玩
+     * 服务标签:1-上门按摩,2-同城陪玩
      */
-    @Excel(name = "商户类型:1-上门按摩,2-同城陪玩")
-    @ApiModelProperty("商户类型:1-上门按摩,2-同城陪玩")
-    private String serviceTag;
+    @Excel(name = "服务标签:1-上门按摩,2-同城陪玩")
+    @ApiModelProperty("服务标签:1-上门按摩,2-同城陪玩")
+    private Integer serviceTag;
 
     /**
      * 项目详情图
@@ -131,24 +145,14 @@ public class MaProject {
     @Excel(name = "是否启用(0否1是)")
     @ApiModelProperty("是否启用(0否1是)")
     private Integer projectIsEnable;
-    /**
-     * 商户ID
-     */
-    @Excel(name = "商户ID")
-    @ApiModelProperty("商户ID")
-    private Long merchantId;
+
     /**
      * 审核状态:0-待审核,1-审核通过,2-审核驳回
      */
     @Excel(name = "审核状态:0-待审核,1-审核通过,2-审核驳回")
     @ApiModelProperty("审核状态:0-待审核,1-审核通过,2-审核驳回")
     private Integer auditStatus;
-    /**
-     * 创建人
-     */
-    @Excel(name = "创建人")
-    @ApiModelProperty("创建人")
-    private Long createBy;
+
     /** 申请时间 */
     @Excel(name = "申请时间")
     @ApiModelProperty("申请时间")
@@ -158,30 +162,38 @@ public class MaProject {
     @Excel(name = "审批时间")
     @ApiModelProperty("申请时间")
     private Date  approveTime;
-    /**
-     * 修改人
-     */
-    @Excel(name = "修改人")
-    @ApiModelProperty("修改人")
-    private Long updateBy;
 
     /**
-     * 是否删除(0否1是)
+     * 创建人
      */
-    @ApiModelProperty("是否删除(0否1是)")
-    @Excel(name = "是否删除(0否1是)")
-    @TableLogic
-    private Long isDelete;
+    @Excel(name = "创建人")
+    @ApiModelProperty("创建人")
+    private Long createBy;
+
     /**
      * 创建时间
      */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
+
+    /**
+     * 修改人
+     */
+    @Excel(name = "修改人")
+    @ApiModelProperty("修改人")
+    private Long updateBy;
+
     /**
      * 更新时间
      */
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date updateTime;
 
-
+    /**
+     * 是否删除(0否1是)
+     */
+    @ApiModelProperty("是否删除(0否1是)")
+    @Excel(name = "是否删除(0否1是)")
+    @TableLogic
+    private Integer isDelete;
 }

+ 2 - 2
nightFragrance-massage/src/main/java/com/ylx/massage/domain/dto/MaProjectSaveDto.java

@@ -10,7 +10,7 @@ public class MaProjectSaveDto {
     /**
      * 商户id
      */
-    private Long userId;
+    private Integer merchantId;
     /**
      * 商户手机号
      */
@@ -18,7 +18,7 @@ public class MaProjectSaveDto {
     /**
      * 项目id列表
      */
-    private List<String> projectIdList;
+    private List<Integer> projectIdList;
     /**
      * 申请理由
      */

+ 41 - 0
nightFragrance-massage/src/main/java/com/ylx/massage/domain/vo/ContractRecordVO.java

@@ -0,0 +1,41 @@
+package com.ylx.massage.domain.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+@ApiModel(value = "ContractRecordVO", description = "商户合同记录")
+public class ContractRecordVO {
+
+    @ApiModelProperty("合同签订时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date signTime;
+
+    @ApiModelProperty("签订人姓名")
+    private String signerName;
+
+    @ApiModelProperty("商户ID")
+    private Integer merchantId;
+
+    @ApiModelProperty("合同文件列表")
+    private List<ContractFileVO> file;
+
+    @Data
+    @ApiModel(value = "ContractFileVO", description = "商户合同文件")
+    public static class ContractFileVO {
+
+        @ApiModelProperty("合同记录ID")
+        private Long id;
+
+        @ApiModelProperty("合同名称")
+        private String contractName;
+
+        @ApiModelProperty("上传文件URL")
+        private String fileUrl;
+    }
+}

+ 7 - 5
nightFragrance-massage/src/main/java/com/ylx/massage/domain/vo/MaProjectGetVo.java

@@ -7,13 +7,15 @@ public class MaProjectGetVo {
     /**
      *审核状态:0-待审核,1-审核通过,2-审核驳回
      */
-    private String auditStatus;
+    private Integer auditStatus;
+
     /**
-     *户ID
+     *户ID
      */
-    private String userId;
+    private Integer merchantId;
+
     /**
-     *项目ID
+     * 开通的服务标签:1-上门按摩,2-同城陪玩
      */
-    private String typeId;
+    private Integer serviceTag;
 }

+ 53 - 0
nightFragrance-massage/src/main/java/com/ylx/massage/domain/vo/MerchantProfileVO.java

@@ -1,5 +1,7 @@
 package com.ylx.massage.domain.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.ylx.common.annotation.Excel;
 import lombok.Data;
 
 import java.util.List;
@@ -19,8 +21,59 @@ public class MerchantProfileVO {
 
     private String areaCode;
 
+    /**
+     * 形象照
+     */
     private String avatar;
 
+    /**
+     * 省级行政区编码,如:110000。
+     */
+    @TableField(exist = false)
+    private String provinceCode;
+
+    /**
+     * 省级行政区名称,如:北京市。
+     */
+    @TableField(exist = false)
+    private String provinceName;
+
+    /**
+     * 地级市编码,如:110100。
+     */
+    @TableField(exist = false)
+    private String cityCode;
+
+    /**
+     * 地级市名称,如:北京市。
+     */
+    @TableField(exist = false)
+    private String cityName;
+
+    /**
+     * 运营中心ID。
+     */
+    @TableField(exist = false)
+    private Integer operationCenterId;
+
+    /**
+     * 服务标签(1:按摩推拿 2:陪玩)
+     */
+    @TableField("service_tag")
+    private Integer serviceTag;
+
+    /**
+     * 审核状态:-1-申请入驻 0-待入驻,1-待审核,2-审核通过,3-审核驳回
+     */
+    @Excel(name = "审核状态:-1-申请入驻 0-待入驻,1-待审核,2-审核通过,3-审核驳回")
+    private Integer auditStatus;
+
+    /**
+     * 运营中心名称。
+     */
+    @TableField(exist = false)
+    private String operationCenterName;
+
     private MerchantProfileTextItemVO nickName;
 
     private MerchantProfileTextItemVO brief;

+ 10 - 5
nightFragrance-massage/src/main/java/com/ylx/massage/service/IMaTechnicianService.java

@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ylx.common.core.domain.AjaxResult;
 import com.ylx.common.core.domain.model.LoginUser;
-import com.ylx.massage.domain.ContractRecord;
 import com.ylx.massage.domain.MaProject;
 import com.ylx.massage.domain.MaTechnician;
 import com.ylx.massage.domain.dto.*;
@@ -206,7 +205,13 @@ public interface IMaTechnicianService extends IService<MaTechnician> {
      */
     void updateTechnician(MerchantApplyFileRequestDto req);
 
-    MerchantProfileVO getMerchantProfile(Integer merchantId);
+    /**
+     * 获取商户资料。
+     *
+     * @param openid
+     * @return MerchantProfileVO
+     */
+    MerchantProfileVO getMerchantProfile(String openid);
 
     void submitMerchantProfile(MerchantProfileSubmitDTO dto);
 
@@ -264,7 +269,7 @@ public interface IMaTechnicianService extends IService<MaTechnician> {
      * @param auditStatus
      * @return
      */
-    List<MaProject> selectMaTechnicianListBy(String userId, String auditStatus);
+    List<MaProject> selectMaTechnicianListBy(Integer merchantId, Integer auditStatus);
 
     /**
      * 服务项目列表
@@ -281,7 +286,7 @@ public interface IMaTechnicianService extends IService<MaTechnician> {
      * @param typeId
      * @return
      */
-    List<Project> getNotApplyList(String userId, String typeId);
+    List<Project> getNotApplyList(Integer merchantId, Integer serviceTag);
 
     /**
      * 申请开通新服务
@@ -313,7 +318,7 @@ public interface IMaTechnicianService extends IService<MaTechnician> {
      * @param userId
      * @return
      */
-    List<ContractRecord> getContractRecords(Long userId);
+    ContractRecordVO getContractRecords(Long userId);
 
     Page<MerchantListVO> getMerchantPage(MerchantListDTO dto);
 

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

@@ -313,9 +313,10 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
     }
 
     @Override
-    public MerchantProfileVO getMerchantProfile(Integer merchantId) {
-        MaTechnician merchant = getExistingMerchant(merchantId);
-        List<MerchantApplyFile> files = listMerchantApplyFiles(merchantId);
+    public MerchantProfileVO getMerchantProfile(String openid) {
+        MaTechnician merchant = getExistingMerchant(openid);
+        List<MerchantApplyFile> files = listMerchantApplyFiles(merchant.getId());
+
         MerchantProfileVO profile = new MerchantProfileVO();
         profile.setMerchantId(merchant.getId());
         profile.setName(merchant.getTeName());
@@ -323,7 +324,22 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
         profile.setPhone(merchant.getTePhone());
         profile.setAddress(merchant.getTeAddress());
         profile.setAreaCode(merchant.getTeAreaCode());
-        profile.setAvatar(merchant.getTeAvatar());
+        profile.setAvatar(merchant.getAvatar());
+        profile.setServiceTag(merchant.getServiceTag());
+        profile.setAuditStatus(merchant.getAuditStatus());
+
+        LambdaQueryWrapper<CityOperationApplication> query1 = new LambdaQueryWrapper<>();
+        query1.eq(CityOperationApplication::getMerchantId, merchant.getId());
+        //query1.eq(CityOperationApplication::getStatus,1);
+        query1.orderByDesc(CityOperationApplication::getCreateTime).last("limit 1");
+        CityOperationApplication application = cityOperationApplicationMapper.selectOne(query1);
+        profile.setProvinceCode(application.getProvinceCode());
+        profile.setProvinceName(application.getProvinceName());
+        profile.setCityCode(application.getCityCode());
+        profile.setCityName(application.getCityName());
+        profile.setOperationCenterId(application.getOperationCenterId());
+        profile.setOperationCenterName(application.getOperationCenterName());
+
         profile.setNickName(buildTextItem(merchant.getTeNickName(), merchant.getPendingTeNickName(),
                 merchant.getTeNickNameAuditStatus(), merchant.getTeNickNameAuditRemark()));
         profile.setBrief(buildTextItem(merchant.getTeBrief(), merchant.getPendingTeBrief(),
@@ -339,8 +355,9 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
             throw new ServiceException("修改参数不能为空");
         }
         checkProfileSubmitParam(dto);
-        MaTechnician merchant = getExistingMerchant(dto.getMerchantId());
+        MaTechnician merchant = getExistingMerchant1(dto.getMerchantId());
         boolean changed = submitProfileTextFields(merchant, dto);
+
         List<MerchantApplyFileDto> files = resolveApplyFiles(dto.getFiles());
         if (!CollectionUtils.isEmpty(files)) {
             submitProfileFiles(merchant.getId(), files);
@@ -373,7 +390,7 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
             throw new ServiceException("审核参数不能为空");
         }
         // 检查商户是否存在
-        MaTechnician merchant = getExistingMerchant(merchantId);
+        MaTechnician merchant = getExistingMerchant1(merchantId);
         if (merchant == null) {
             throw new ServiceException("商户不存在");
         }
@@ -587,10 +604,21 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
      * @param merchantId
      * @return MaTechnician
      */
-    private MaTechnician getExistingMerchant(Integer merchantId) {
-        if (merchantId == null) {
-            throw new ServiceException("商户ID不能为空");
+    private MaTechnician getExistingMerchant(String openid) {
+        MaTechnician merchant = maTechnicianMapper.selectOne(Wrappers.lambdaQuery(MaTechnician.class)
+                .eq(MaTechnician::getCOpenid, openid));
+        if (merchant == null || (merchant.getIsDelete() != null && !NOT_DELETED.equals(merchant.getIsDelete()))) {
+            throw new ServiceException("商户不存在或已删除");
         }
+        return merchant;
+    }
+
+    /**
+     *
+     * @param merchantId
+     * @return
+     */
+    private MaTechnician getExistingMerchant1(Integer merchantId) {
         MaTechnician merchant = maTechnicianMapper.selectById(merchantId);
         if (merchant == null || (merchant.getIsDelete() != null && !NOT_DELETED.equals(merchant.getIsDelete()))) {
             throw new ServiceException("商户不存在或已删除");
@@ -603,13 +631,14 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
      *
      * @param merchant
      * @param dto
-     * @return
+     * @return boolean
      */
     private boolean submitProfileTextFields(MaTechnician merchant, MerchantProfileSubmitDTO dto) {
         boolean changed = false;
         LambdaUpdateWrapper<MaTechnician> updateWrapper = Wrappers.lambdaUpdate();
         updateWrapper.eq(MaTechnician::getId, merchant.getId());
 
+        // 处理昵称
         if (dto.getNickName() != null) {
             String nickName = checkProfileTextValue(dto.getNickName(), "昵称");
             if (PROFILE_AUDIT_PENDING == valueOrApproved(merchant.getTeNickNameAuditStatus())) {
@@ -623,6 +652,7 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
             }
         }
 
+        // 处理简介
         if (dto.getBrief() != null) {
             String brief = checkProfileTextValue(dto.getBrief(), "简介");
             if (PROFILE_AUDIT_PENDING == valueOrApproved(merchant.getTeBriefAuditStatus())) {
@@ -638,6 +668,8 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
 
         if (changed) {
             updateWrapper.set(MaTechnician::getUpdateTime, DateUtils.getNowDate());
+            //  同时修改audit_status字段的值
+            updateWrapper.set(MaTechnician::getAuditStatus, 1);
             int rows = maTechnicianMapper.update(null, updateWrapper);
             if (rows <= 0) {
                 throw new ServiceException("提交商户资料审核失败");
@@ -646,6 +678,13 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
         return changed;
     }
 
+    /**
+     * 检查文本资料是否为空
+     *
+     * @param value
+     * @param fieldName
+     * @return String
+     */
     private String checkProfileTextValue(String value, String fieldName) {
         if (StringUtils.isBlank(value)) {
             throw new ServiceException(fieldName + "不能为空");
@@ -708,7 +747,7 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
     }
 
     private int auditProfileNickName(Integer merchantId, Integer auditStatus, String auditRemark, LoginUser loginUser) {
-        MaTechnician merchant = getExistingMerchant(merchantId);
+        MaTechnician merchant = getExistingMerchant1(merchantId);
         if (!Integer.valueOf(PROFILE_AUDIT_PENDING).equals(merchant.getTeNickNameAuditStatus())) {
             throw new ServiceException("昵称资料不是审核中状态");
         }
@@ -726,7 +765,7 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
     }
 
     private int auditProfileBrief(Integer merchantId, Integer auditStatus, String auditRemark, LoginUser loginUser) {
-        MaTechnician merchant = getExistingMerchant(merchantId);
+        MaTechnician merchant = getExistingMerchant1(merchantId);
         if (!Integer.valueOf(PROFILE_AUDIT_PENDING).equals(merchant.getTeBriefAuditStatus())) {
             throw new ServiceException("简介资料不是审核中状态");
         }
@@ -991,15 +1030,14 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
     /**
      * 查询商户服务项目列表
      *
-     * @param userId      商户id
+     * @param merchantId      商户id
      * @param auditStatus 审核状态
-     * @return 技师列表
+     * @return List<MaProject>
      */
     @Override
-    public List<MaProject> selectMaTechnicianListBy(String userId, String auditStatus) {
-
+    public List<MaProject> selectMaTechnicianListBy(Integer merchantId, Integer auditStatus) {
         LambdaQueryWrapper<MaProject> queryWrapper = new LambdaQueryWrapper<>();
-        queryWrapper.eq(MaProject::getMerchantId, userId);
+        queryWrapper.eq(MaProject::getMerchantId, merchantId);
         queryWrapper.eq(MaProject::getAuditStatus, auditStatus);
         return maProjectMapper.selectList(queryWrapper);
     }
@@ -1605,20 +1643,20 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
      * @return
      */
     @Override
-    public List<Project> getNotApplyList(String userId, String typeId) {
+    public List<Project> getNotApplyList(Integer merchantId, Integer serviceTag) {
         LambdaQueryWrapper<MaProject> query = new LambdaQueryWrapper<>();
-        query.eq(MaProject::getMerchantId, userId);
-        query.eq(MaProject::getServiceTag, typeId);
+        query.eq(MaProject::getMerchantId, merchantId);
+        query.eq(MaProject::getServiceTag, serviceTag);
         List<MaProject> maProjectList = maProjectMapper.selectList(query);
         // 获取已申请技能ID集合
-        List<Long> projectIdList = maProjectList.stream().map(MaProject::getProjectId).collect(Collectors.toList());
+        List<Integer> projectIdList = maProjectList.stream().map(MaProject::getProjectId).collect(Collectors.toList());
         if (projectIdList.size() == 0) {
             LambdaQueryWrapper<Project> query1 = new LambdaQueryWrapper<>();
-            query1.eq(Project::getType, typeId);
+            query1.eq(Project::getType, serviceTag);
             return projectMapper.selectList(query1);
         }
         LambdaQueryWrapper<Project> query2 = new LambdaQueryWrapper<>();
-        query2.eq(Project::getType, typeId);
+        query2.eq(Project::getType, serviceTag);
         query2.notIn(Project::getId, projectIdList);
         return projectMapper.selectList(query2);
     }
@@ -1685,7 +1723,7 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
         // 根据商户ID查询city_operation_application表
         if (merchant != null && merchant.getId() != null) {
             LambdaQueryWrapper<CityOperationApplication> query1 = new LambdaQueryWrapper<>();
-            query1.eq(CityOperationApplication::getMerchantId, merchant.getId());
+            query1.eq(CityOperationApplication::getMerchantId, merchant.getId()).last("limit 1");
             CityOperationApplication application = cityOperationApplicationMapper.selectOne(query1);
             if (application != null) {
                 merchant.setProvinceCode(application.getProvinceCode());
@@ -1729,22 +1767,44 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
      * @return
      */
     @Override
-    public List<ContractRecord> getContractRecords(Long userId) {
+    public ContractRecordVO getContractRecords(Long userId) {
         LambdaQueryWrapper<ContractRecord> query = new LambdaQueryWrapper<>();
         query.eq(ContractRecord::getMerchantId, userId);
         List<ContractRecord> contractRecordList = contractRecordMapper.selectList(query);
-        if (contractRecordList.size() == 0) {
-            return new ArrayList<>();
-        } else {
-            Set<String> seen = new HashSet<>();
-            contractRecordList = contractRecordList.stream()
-                    .filter(record -> record.getContractName() != null && seen.add(record.getContractName()))
-                    .collect(Collectors.toList());
+        ContractRecordVO result = new ContractRecordVO();
+        if (CollectionUtils.isEmpty(contractRecordList)) {
+            result.setMerchantId(userId == null ? null : userId.intValue());
+            result.setFile(Collections.emptyList());
+            return result;
+        }
 
+        Set<String> seen = new HashSet<>();
+        contractRecordList = contractRecordList.stream()
+                .filter(record -> record.getContractName() != null && seen.add(record.getContractName()))
+                .collect(Collectors.toList());
+
+        if (CollectionUtils.isEmpty(contractRecordList)) {
+            result.setMerchantId(userId == null ? null : userId.intValue());
+            result.setFile(Collections.emptyList());
+            return result;
         }
 
-        return contractRecordList;
+        ContractRecord firstRecord = contractRecordList.get(0);
+        result.setSignTime(firstRecord.getSignTime());
+        result.setSignerName(firstRecord.getSignerName());
+        result.setMerchantId(firstRecord.getMerchantId());
+        result.setFile(contractRecordList.stream()
+                .map(this::buildContractFileVO)
+                .collect(Collectors.toList()));
+        return result;
+    }
 
+    private ContractRecordVO.ContractFileVO buildContractFileVO(ContractRecord record) {
+        ContractRecordVO.ContractFileVO fileVO = new ContractRecordVO.ContractFileVO();
+        fileVO.setId(record.getId());
+        fileVO.setContractName(record.getContractName());
+        fileVO.setFileUrl(record.getFileUrl());
+        return fileVO;
     }
 
     @Override
@@ -1821,24 +1881,30 @@ public class MaTechnicianServiceImpl extends ServiceImpl<MaTechnicianMapper, MaT
     }
 
 
+    /**
+     * 申请开通新服务
+     *
+     * @param dto
+     */
     private void extracted(MaProjectSaveDto dto) {
         LambdaQueryWrapper<Project> query = new LambdaQueryWrapper<>();
         query.in(Project::getId, dto.getProjectIdList());
         List<Project> projectList = projectMapper.selectList(query);
         for (Project project : projectList) {
             MaProject maProject = new MaProject();
-            maProject.setProjectId(project.getId().longValue());
+            maProject.setProjectId(project.getId());
             maProject.setProjectName(project.getTitle());
             maProject.setProjectDescribe(project.getDetail());
             maProject.setProjectDuration(project.getStandardDuration());
             maProject.setProjectOriginalPrice(project.getPrice());
             maProject.setProjectMaxPrice(project.getPriceMax());
             maProject.setProjectLowestPrice(project.getPriceMin());
-            maProject.setCreateBy(dto.getUserId());
-            maProject.setUpdateBy(dto.getUserId());
-            maProject.setMerchantId(dto.getUserId());
+            maProject.setMerchantId(dto.getMerchantId());
             maProject.setApplyTime(DateUtils.getNowDate());
             maProject.setMerchantPhone(dto.getMerchantPhone());
+
+            maProject.setCreateBy(dto.getMerchantId().longValue());
+            maProject.setCreateTime(DateUtils.getNowDate());
             maProjectMapper.insert(maProject);
         }
     }

+ 2 - 2
nightFragrance-massage/src/main/java/com/ylx/servicecategory/service/impl/ServiceCategoryServiceImpl.java

@@ -39,7 +39,7 @@ public class ServiceCategoryServiceImpl extends ServiceImpl<ServiceCategoryMappe
     /**
      * H5查询首页服务类目
      *
-     * @return H5首页服务类目列表
+     * @return List<ServiceCategory> H5首页服务类目列表
      */
     @Override
     public List<ServiceCategory> listH5ServiceCategory() {
@@ -48,7 +48,7 @@ public class ServiceCategoryServiceImpl extends ServiceImpl<ServiceCategoryMappe
                 .eq(ServiceCategory::getIsOnline, 1)
                 .orderByAsc(ServiceCategory::getSort)
                 .orderByAsc(ServiceCategory::getId);
-        return this.baseMapper.selectH5ServiceCategoryList(queryWrapper);
+        return baseMapper.selectH5ServiceCategoryList(queryWrapper);
     }
 
     /**

+ 0 - 400
nightFragrance-massage/src/test/java/com/ylx/massage/service/impl/MaTechnicianServiceImplTest.java

@@ -1,400 +0,0 @@
-package com.ylx.massage.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.metadata.TableInfoHelper;
-import com.ylx.common.core.domain.model.LoginUser;
-import com.ylx.massage.domain.MaTechnician;
-import com.ylx.massage.domain.MerchantApplyFile;
-import com.ylx.massage.domain.dto.MerchantProfileAuditDTO;
-import com.ylx.massage.domain.dto.MerchantApplyFileDto;
-import com.ylx.massage.domain.dto.MerchantApplyFileRequestDto;
-import com.ylx.massage.domain.vo.MaTechnicianCertificateVO;
-import com.ylx.massage.domain.vo.MerchantProfileVO;
-import com.ylx.massage.mapper.MaTechnicianMapper;
-import com.ylx.massage.mapper.MerchantApplyFileMapper;
-import org.apache.ibatis.builder.MapperBuilderAssistant;
-import org.apache.ibatis.session.Configuration;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.springframework.test.util.ReflectionTestUtils;
-
-import java.math.BigDecimal;
-import java.time.LocalDate;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertIterableEquals;
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.isNull;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class MaTechnicianServiceImplTest {
-
-    @Test
-    public void updateTechnicianAcceptsGroupedApplyFiles() {
-        initTableInfo(MaTechnician.class);
-        initTableInfo(MerchantApplyFile.class);
-
-        MaTechnicianMapper technicianMapper = mock(MaTechnicianMapper.class);
-        MerchantApplyFileMapper applyFileMapper = mock(MerchantApplyFileMapper.class);
-        when(technicianMapper.update(isNull(), any(Wrapper.class))).thenReturn(1);
-        when(applyFileMapper.delete(any(Wrapper.class))).thenReturn(1);
-        when(technicianMapper.selectById(11)).thenReturn(buildMerchant(11));
-        when(applyFileMapper.selectCount(any(Wrapper.class))).thenReturn(0L);
-
-        MaTechnicianServiceImpl service = new MaTechnicianServiceImpl();
-        ReflectionTestUtils.setField(service, "maTechnicianMapper", technicianMapper);
-        ReflectionTestUtils.setField(service, "merchantApplyFileMapper", applyFileMapper);
-
-        MerchantApplyFileRequestDto request = new MerchantApplyFileRequestDto();
-        MaTechnician technician = new MaTechnician();
-        technician.setId(11);
-        technician.setTeNickName("Ctrlv");
-        technician.setTeBrief("飞洒范德萨");
-        request.setTechnician(technician);
-
-        MerchantApplyFileDto group = new MerchantApplyFileDto();
-        group.setFileType("1");
-        MerchantApplyFileDto file = new MerchantApplyFileDto();
-        file.setFileName("形象照");
-        file.setFileUrl("http://192.168.1.190:8087/profile/upload/2026/06/22/1782124578606_20260622183619A003.jpeg");
-        file.setContentType("jpeg");
-        file.setFileSize(new BigDecimal("54.45"));
-        group.setFiles(Collections.singletonList(file));
-        request.setReq(Collections.singletonList(group));
-
-        service.updateTechnician(request);
-
-        ArgumentCaptor<MerchantApplyFile> fileCaptor = ArgumentCaptor.forClass(MerchantApplyFile.class);
-        verify(applyFileMapper).insert(fileCaptor.capture());
-        MerchantApplyFile savedFile = fileCaptor.getValue();
-        assertEquals(11, savedFile.getMerchantId());
-        assertEquals("1", savedFile.getFileType());
-        assertEquals("形象照", savedFile.getFileName());
-        assertEquals(file.getFileUrl(), savedFile.getFileUrl());
-        assertEquals(0, savedFile.getAuditStatus());
-        assertNull(savedFile.getId());
-        verify(applyFileMapper, never()).delete(any(Wrapper.class));
-    }
-
-    @Test
-    public void updateTechnicianReplacesMultipleFilesOfSameType() {
-        initTableInfo(MaTechnician.class);
-        initTableInfo(MerchantApplyFile.class);
-
-        MaTechnicianMapper technicianMapper = mock(MaTechnicianMapper.class);
-        MerchantApplyFileMapper applyFileMapper = mock(MerchantApplyFileMapper.class);
-        when(technicianMapper.update(isNull(), any(Wrapper.class))).thenReturn(1);
-        when(applyFileMapper.delete(any(Wrapper.class))).thenReturn(2);
-        when(technicianMapper.selectById(11)).thenReturn(buildMerchant(11));
-        when(applyFileMapper.selectCount(any(Wrapper.class))).thenReturn(0L);
-
-        MaTechnicianServiceImpl service = new MaTechnicianServiceImpl();
-        ReflectionTestUtils.setField(service, "maTechnicianMapper", technicianMapper);
-        ReflectionTestUtils.setField(service, "merchantApplyFileMapper", applyFileMapper);
-
-        MerchantApplyFileRequestDto request = new MerchantApplyFileRequestDto();
-        MaTechnician technician = new MaTechnician();
-        technician.setId(11);
-        technician.setTeNickName("Ctrlv");
-        technician.setTeBrief("飞洒范德萨");
-        request.setTechnician(technician);
-
-        MerchantApplyFileDto group = new MerchantApplyFileDto();
-        group.setFileType("2");
-        group.setFiles(Arrays.asList(
-                buildApplyFile("生活照1", "http://192.168.1.190:8087/profile/upload/2026/06/03/life1.png"),
-                buildApplyFile("生活照2", "http://192.168.1.190:8087/profile/upload/2026/06/03/life2.png")
-        ));
-        request.setReq(Collections.singletonList(group));
-
-        service.updateTechnician(request);
-
-        verify(applyFileMapper, never()).delete(any(Wrapper.class));
-        verify(applyFileMapper, never()).updateById(any(MerchantApplyFile.class));
-        ArgumentCaptor<MerchantApplyFile> fileCaptor = ArgumentCaptor.forClass(MerchantApplyFile.class);
-        verify(applyFileMapper, times(2)).insert(fileCaptor.capture());
-        List<MerchantApplyFile> savedFiles = fileCaptor.getAllValues();
-        assertEquals("生活照1", savedFiles.get(0).getFileName());
-        assertEquals("生活照2", savedFiles.get(1).getFileName());
-        assertEquals("2", savedFiles.get(0).getFileType());
-        assertEquals("2", savedFiles.get(1).getFileType());
-        assertEquals(11, savedFiles.get(0).getMerchantId());
-        assertEquals(11, savedFiles.get(1).getMerchantId());
-        assertEquals(0, savedFiles.get(0).getAuditStatus());
-        assertEquals(0, savedFiles.get(1).getAuditStatus());
-        assertNull(savedFiles.get(0).getId());
-        assertNull(savedFiles.get(1).getId());
-    }
-
-    @Test
-    public void updateTechnicianRejectsWhenSameFileTypeIsPending() {
-        initTableInfo(MaTechnician.class);
-        initTableInfo(MerchantApplyFile.class);
-
-        MaTechnicianMapper technicianMapper = mock(MaTechnicianMapper.class);
-        MerchantApplyFileMapper applyFileMapper = mock(MerchantApplyFileMapper.class);
-        when(technicianMapper.selectById(11)).thenReturn(buildMerchant(11));
-        when(applyFileMapper.selectCount(any(Wrapper.class))).thenReturn(1L);
-
-        MaTechnicianServiceImpl service = new MaTechnicianServiceImpl();
-        ReflectionTestUtils.setField(service, "maTechnicianMapper", technicianMapper);
-        ReflectionTestUtils.setField(service, "merchantApplyFileMapper", applyFileMapper);
-
-        MerchantApplyFileRequestDto request = buildBaseRequest();
-        MerchantApplyFileDto group = new MerchantApplyFileDto();
-        group.setFileType("1");
-        group.setFiles(Collections.singletonList(buildApplyFile("avatar", "http://host/new.png")));
-        request.setReq(Collections.singletonList(group));
-
-        assertThrows(RuntimeException.class, () -> service.updateTechnician(request));
-
-        verify(applyFileMapper, never()).insert(any(MerchantApplyFile.class));
-    }
-
-    @Test
-    public void getMerchantProfileHidesApprovedStatusAndShowsPendingStatus() {
-        initTableInfo(MaTechnician.class);
-        initTableInfo(MerchantApplyFile.class);
-
-        MaTechnician merchant = buildMerchant(11);
-        merchant.setTeNickName("oldNick");
-        merchant.setPendingTeNickName("newNick");
-        merchant.setTeNickNameAuditStatus(0);
-
-        MaTechnicianMapper technicianMapper = mock(MaTechnicianMapper.class);
-        MerchantApplyFileMapper applyFileMapper = mock(MerchantApplyFileMapper.class);
-        when(technicianMapper.selectById(11)).thenReturn(merchant);
-        when(applyFileMapper.selectList(any(Wrapper.class))).thenReturn(Arrays.asList(
-                buildMerchantApplyFile("1", "approved-avatar", 1),
-                buildMerchantApplyFile("1", "pending-avatar", 0)
-        ));
-
-        MaTechnicianServiceImpl service = new MaTechnicianServiceImpl();
-        ReflectionTestUtils.setField(service, "maTechnicianMapper", technicianMapper);
-        ReflectionTestUtils.setField(service, "merchantApplyFileMapper", applyFileMapper);
-
-        MerchantProfileVO profile = service.getMerchantProfile(11);
-
-        assertEquals("oldNick", profile.getNickName().getValue());
-        assertEquals("newNick", profile.getNickName().getPendingValue());
-        assertEquals(0, profile.getNickName().getAuditStatus());
-        assertNull(profile.getBrief().getAuditStatus());
-        assertEquals(1, profile.getFileGroups().get(0).getOfficialFiles().size());
-        assertEquals(1, profile.getFileGroups().get(0).getPendingFiles().size());
-        assertEquals(0, profile.getFileGroups().get(0).getAuditStatus());
-    }
-
-    @Test
-    public void auditMerchantProfileApprovesAllPendingProfileData() {
-        initTableInfo(MaTechnician.class);
-        initTableInfo(MerchantApplyFile.class);
-
-        MaTechnician merchant = buildMerchant(11);
-        merchant.setPendingTeNickName("newNick");
-        merchant.setTeNickNameAuditStatus(0);
-        merchant.setPendingTeBrief("newBrief");
-        merchant.setTeBriefAuditStatus(0);
-
-        MaTechnicianMapper technicianMapper = mock(MaTechnicianMapper.class);
-        MerchantApplyFileMapper applyFileMapper = mock(MerchantApplyFileMapper.class);
-        when(technicianMapper.selectById(11)).thenReturn(merchant);
-        when(technicianMapper.update(isNull(), any(Wrapper.class))).thenReturn(1);
-        when(applyFileMapper.selectList(any(Wrapper.class))).thenReturn(Arrays.asList(
-                buildMerchantApplyFile("1", "pending-avatar", 0),
-                buildMerchantApplyFile("2", "pending-life", 0)
-        ));
-        when(applyFileMapper.update(isNull(), any(Wrapper.class))).thenReturn(1);
-
-        MaTechnicianServiceImpl service = new MaTechnicianServiceImpl();
-        ReflectionTestUtils.setField(service, "maTechnicianMapper", technicianMapper);
-        ReflectionTestUtils.setField(service, "merchantApplyFileMapper", applyFileMapper);
-
-        MerchantProfileAuditDTO auditDTO = new MerchantProfileAuditDTO();
-        auditDTO.setAuditStatus(2);
-        auditDTO.setIdCardExpirationDate(LocalDate.of(2027, 1, 1));
-        auditDTO.setHealthCertificateExpirationDate(LocalDate.of(2027, 1, 1));
-        auditDTO.setQualificationCertificateExpirationDate(LocalDate.of(2027, 1, 1));
-
-        int rows = service.auditMerchantProfile(11, auditDTO, (LoginUser) null);
-
-        assertEquals(3, rows);
-        verify(technicianMapper, times(1)).update(isNull(), any(Wrapper.class));
-        verify(applyFileMapper, times(2)).update(isNull(), any(Wrapper.class));
-    }
-
-    @Test
-    public void auditMerchantProfileRejectsAllPendingProfileData() {
-        initTableInfo(MaTechnician.class);
-        initTableInfo(MerchantApplyFile.class);
-
-        MaTechnician merchant = buildMerchant(11);
-        merchant.setPendingTeNickName("newNick");
-        merchant.setTeNickNameAuditStatus(0);
-
-        MaTechnicianMapper technicianMapper = mock(MaTechnicianMapper.class);
-        MerchantApplyFileMapper applyFileMapper = mock(MerchantApplyFileMapper.class);
-        when(technicianMapper.selectById(11)).thenReturn(merchant);
-        when(technicianMapper.update(isNull(), any(Wrapper.class))).thenReturn(1);
-        when(applyFileMapper.selectList(any(Wrapper.class))).thenReturn(Collections.singletonList(
-                buildMerchantApplyFile("1", "pending-avatar", 0)
-        ));
-        when(applyFileMapper.update(isNull(), any(Wrapper.class))).thenReturn(1);
-
-        MaTechnicianServiceImpl service = new MaTechnicianServiceImpl();
-        ReflectionTestUtils.setField(service, "maTechnicianMapper", technicianMapper);
-        ReflectionTestUtils.setField(service, "merchantApplyFileMapper", applyFileMapper);
-
-        MerchantProfileAuditDTO auditDTO = new MerchantProfileAuditDTO();
-        auditDTO.setAuditStatus(3);
-        auditDTO.setAuditRemark("bad");
-
-        int rows = service.auditMerchantProfile(11, auditDTO, (LoginUser) null);
-
-        assertEquals(2, rows);
-        verify(technicianMapper, times(1)).update(isNull(), any(Wrapper.class));
-        verify(applyFileMapper, times(1)).update(isNull(), any(Wrapper.class));
-    }
-
-    @Test
-    public void updateTechnicianRejectsBlankNickName() {
-        MaTechnicianServiceImpl service = new MaTechnicianServiceImpl();
-        MerchantApplyFileRequestDto request = buildBaseRequest();
-        request.getTechnician().setTeNickName(" ");
-
-        RuntimeException exception = assertThrows(RuntimeException.class, () -> service.updateTechnician(request));
-
-        assertEquals("昵称不能为空", exception.getMessage());
-    }
-
-    @Test
-    public void updateTechnicianRejectsBlankBrief() {
-        MaTechnicianServiceImpl service = new MaTechnicianServiceImpl();
-        MerchantApplyFileRequestDto request = buildBaseRequest();
-        request.getTechnician().setTeBrief(" ");
-
-        RuntimeException exception = assertThrows(RuntimeException.class, () -> service.updateTechnician(request));
-
-        assertEquals("简介不能为空", exception.getMessage());
-    }
-
-    @Test
-    public void updateTechnicianRejectsEmptyFileGroup() {
-        initTableInfo(MaTechnician.class);
-
-        MaTechnicianMapper technicianMapper = mock(MaTechnicianMapper.class);
-        when(technicianMapper.update(isNull(), any(Wrapper.class))).thenReturn(1);
-        MaTechnicianServiceImpl service = new MaTechnicianServiceImpl();
-        ReflectionTestUtils.setField(service, "maTechnicianMapper", technicianMapper);
-
-        MerchantApplyFileRequestDto request = buildBaseRequest();
-        MerchantApplyFileDto group = new MerchantApplyFileDto();
-        group.setFileType("2");
-        group.setFiles(Collections.emptyList());
-        request.setReq(Collections.singletonList(group));
-
-        RuntimeException exception = assertThrows(RuntimeException.class, () -> service.updateTechnician(request));
-
-        assertEquals("文件列表不能为空", exception.getMessage());
-    }
-
-    @Test
-    public void selectMerchantCertificateReturnsEveryFileFieldAsList() {
-        initTableInfo(MerchantApplyFile.class);
-
-        MerchantApplyFileMapper applyFileMapper = mock(MerchantApplyFileMapper.class);
-        when(applyFileMapper.selectList(any(Wrapper.class))).thenReturn(Arrays.asList(
-                buildMerchantApplyFile("1", "avatar-1"),
-                buildMerchantApplyFile("1", "avatar-2"),
-                buildMerchantApplyFile("2", "life-1"),
-                buildMerchantApplyFile("2", "life-2"),
-                buildMerchantApplyFile("3", "promotion-1"),
-                buildMerchantApplyFile("4", "front-1"),
-                buildMerchantApplyFile("5", "back-1"),
-                buildMerchantApplyFile("6", "handheld-1"),
-                buildMerchantApplyFile("7", "health-1"),
-                buildMerchantApplyFile("8", "qualification-1"),
-                buildMerchantApplyFile("9", "crime-1"),
-                buildMerchantApplyFile("10", "commitment-pdf-1"),
-                buildMerchantApplyFile("11", "commitment-audio-1"),
-                buildMerchantApplyFile("12", "commitment-video-1"),
-                buildMerchantApplyFile("12", "commitment-video-2")
-        ));
-        MaTechnicianServiceImpl service = new MaTechnicianServiceImpl();
-        ReflectionTestUtils.setField(service, "merchantApplyFileMapper", applyFileMapper);
-
-        MaTechnicianCertificateVO certificate = service.selectMerchantCertificate(11);
-
-        assertEquals(11, certificate.getMerchantId());
-        assertIterableEquals(Arrays.asList("avatar-1", "avatar-2"), certificate.getAvatar());
-        assertIterableEquals(Arrays.asList("life-1", "life-2"), certificate.getLifePhotos());
-        assertIterableEquals(Collections.singletonList("promotion-1"), certificate.getPromotionVideo());
-        assertIterableEquals(Collections.singletonList("front-1"), certificate.getIdCardFrout());
-        assertIterableEquals(Collections.singletonList("back-1"), certificate.getIdCardBack());
-        assertIterableEquals(Collections.singletonList("handheld-1"), certificate.getIdCardHandheld());
-        assertIterableEquals(Collections.singletonList("health-1"), certificate.getHealthCertificate());
-        assertIterableEquals(Collections.singletonList("qualification-1"), certificate.getQualificationCertificate());
-        assertIterableEquals(Collections.singletonList("crime-1"), certificate.getNoCrimeRecord());
-        assertIterableEquals(Collections.singletonList("commitment-pdf-1"), certificate.getCommitmentPdf());
-        assertIterableEquals(Collections.singletonList("commitment-audio-1"), certificate.getCommitmentAudio());
-        assertIterableEquals(Arrays.asList("commitment-video-1", "commitment-video-2"), certificate.getCommitmentVideo());
-        verify(applyFileMapper, times(1)).selectList(any(Wrapper.class));
-    }
-
-    private MerchantApplyFileRequestDto buildBaseRequest() {
-        MerchantApplyFileRequestDto request = new MerchantApplyFileRequestDto();
-        MaTechnician technician = new MaTechnician();
-        technician.setId(11);
-        technician.setTeNickName("Ctrlv");
-        technician.setTeBrief("飞洒范德萨");
-        request.setTechnician(technician);
-        return request;
-    }
-
-    private MerchantApplyFileDto buildApplyFile(String fileName, String fileUrl) {
-        MerchantApplyFileDto file = new MerchantApplyFileDto();
-        file.setFileName(fileName);
-        file.setFileUrl(fileUrl);
-        file.setContentType("image/png");
-        file.setFileSize(new BigDecimal("0.73"));
-        return file;
-    }
-
-    private MerchantApplyFile buildMerchantApplyFile(String fileType, String fileUrl) {
-        MerchantApplyFile file = new MerchantApplyFile();
-        file.setMerchantId(11);
-        file.setFileType(fileType);
-        file.setFileUrl(fileUrl);
-        return file;
-    }
-
-    private MerchantApplyFile buildMerchantApplyFile(String fileType, String fileUrl, Integer auditStatus) {
-        MerchantApplyFile file = buildMerchantApplyFile(fileType, fileUrl);
-        file.setAuditStatus(auditStatus);
-        return file;
-    }
-
-    private MaTechnician buildMerchant(Integer merchantId) {
-        MaTechnician merchant = new MaTechnician();
-        merchant.setId(merchantId);
-        merchant.setIsDelete(0);
-        merchant.setTeNickName("Ctrlv");
-        merchant.setTeBrief("brief");
-        return merchant;
-    }
-
-    private void initTableInfo(Class<?> entityClass) {
-        if (TableInfoHelper.getTableInfo(entityClass) == null) {
-            MapperBuilderAssistant assistant = new MapperBuilderAssistant(new Configuration(), "");
-            TableInfoHelper.initTableInfo(assistant, entityClass);
-        }
-    }
-}