| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- package com.ylx.massage.mapper;
- import java.util.List;
- import com.baomidou.mybatisplus.core.mapper.BaseMapper;
- import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
- import com.ylx.massage.domain.MaTechnician;
- import com.ylx.massage.domain.dto.MaTechnicianAuditQueryDTO;
- import com.ylx.massage.domain.dto.MaTechnicianMerchantQueryDTO;
- import com.ylx.massage.domain.dto.MassageMerchantRecommendDto;
- import com.ylx.massage.domain.vo.MaTechnicianAuditListVO;
- import com.ylx.massage.domain.vo.MaTechnicianMerchantDetailVO;
- import com.ylx.massage.domain.vo.MaTechnicianMerchantListVO;
- import com.ylx.massage.domain.vo.MassageProjectRecommendVo;
- import com.ylx.massage.domain.vo.MerchantVo;
- import org.apache.ibatis.annotations.Param;
- import org.mapstruct.Mapper;
- import org.apache.ibatis.annotations.Select;
- /**
- * 技师Mapper接口
- *
- * @author ylx
- * @date 2024-03-22
- */
- @Mapper
- public interface MaTechnicianMapper extends BaseMapper<MaTechnician>
- {
- /**
- * 查询技师
- *
- * @param id 技师主键
- * @return 技师
- */
- public MaTechnician selectMaTechnicianById(Long id);
- /**
- * 查询技师列表
- *
- * @param maTechnician 技师
- * @return 技师集合
- */
- List<MaTechnician> selectMaTechnicianList(MaTechnician maTechnician);
- /**
- * 新增技师
- *
- * @param maTechnician 技师
- * @return 结果
- */
- public int insertMaTechnician(MaTechnician maTechnician);
- /**
- * 修改技师
- *
- * @param maTechnician 技师
- * @return 结果
- */
- public int updateMaTechnician(MaTechnician maTechnician);
- /**
- * 删除技师
- *
- * @param id 技师主键
- * @return 结果
- */
- public int deleteMaTechnicianById(Long id);
- /**
- * 批量删除技师
- *
- * @param ids 需要删除的数据主键集合
- * @return 结果
- */
- public int deleteMaTechnicianByIds(Long[] ids);
- /**
- * 后台查询商户列表
- *
- * @param page 分页参数
- * @param dto 查询条件
- * @return 商户分页列表
- */
- Page<MaTechnicianMerchantListVO> selectMerchantList(Page<MaTechnicianMerchantListVO> page,
- @Param("dto") MaTechnicianMerchantQueryDTO dto);
- /**
- * 后台查询商户入驻审核列表
- *
- * @param page 分页参数
- * @param dto 查询条件
- * @return 商户入驻审核分页列表
- */
- Page<MaTechnicianAuditListVO> selectMerchantAuditList(Page<MaTechnicianAuditListVO> page,
- @Param("dto") MaTechnicianAuditQueryDTO dto);
- /**
- * 后台查询商户详情
- *
- * @param id 商户ID
- * @return 商户详情
- */
- MaTechnicianMerchantDetailVO selectMerchantDetailById(@Param("id") Long id);
- /**
- * 根据商户ID查询商户。
- *
- * @param id 商户ID
- * @return 商户信息
- */
- default MaTechnician selectMerchantById(Integer id) {
- return selectById(id);
- }
- /**
- * 根据商户ID更新商户。
- *
- * @param maTechnician 商户信息
- * @return 影响行数
- */
- default int updateMerchantById(MaTechnician maTechnician) {
- return updateById(maTechnician);
- }
- /**
- * 根据商户ID更新合同文件。
- *
- * @param maTechnician 商户合同文件信息
- * @return 影响行数
- */
- default int updateMerchantContractById(MaTechnician maTechnician) {
- return updateById(maTechnician);
- }
- List<MerchantVo> getMerchantRecommend(@Param("dto") MassageMerchantRecommendDto dto);
- /**
- * 查询该城市是否有商户提供服务
- * @param areaCode
- * @return
- */
- @Select("SELECT EXISTS (" +
- " SELECT 1" +
- " FROM ma_technician t" +
- " INNER JOIN ma_project p ON t.id = p.merchant_id" +
- " WHERE t.te_area_code = #{areaCode}" +
- " AND t.is_delete = 0" +
- " AND t.audit_status = 2" +
- " AND t.n_status2 = 0" +
- " AND t.merchant_status = 0" +
- " AND p.is_delete = 0" +
- " AND p.audit_status = 1" +
- " AND p.merchant_type = 0" +
- " AND p.project_is_enable = 1" +
- ") AS has_merchant_with_service")
- Boolean isHasMerchantCity(@Param("areaCode") String areaCode);
- }
|