From a67705695103eeb0ccd615e7e4faf9b2834a0f11 Mon Sep 17 00:00:00 2001 From: PQZ Date: Fri, 20 Sep 2024 01:20:53 +0800 Subject: [PATCH] 1 --- .../controller/PartnerOwnController.java | 11 +++++----- .../mapper/AppInspectionPartnerMapper.java | 3 +++ .../service/AppInspectionPartnerService.java | 5 +++++ .../impl/AppInspectionPartnerServiceImpl.java | 21 ++++++++++++------- .../inspection/AppInspectionPartnerMapper.xml | 19 +++++++++++++++++ .../system/dal/mysql/dept/PostMapper.java | 6 ++++++ .../oauth2/OAuth2AccessTokenRedisDAO.java | 2 +- .../system/service/dept/PostService.java | 2 ++ .../system/service/dept/PostServiceImpl.java | 5 +++++ 9 files changed, 61 insertions(+), 13 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java index 58beb9e9..7f852a34 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java @@ -6,6 +6,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.inspection.vo.SysDictData; +import cn.iocoder.yudao.module.label.vo.LabelRespVO; import cn.iocoder.yudao.module.partner.entity.PartnerBalanceDetail; import cn.iocoder.yudao.module.partner.entity.PartnerWorker; import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService; @@ -18,6 +19,7 @@ import cn.iocoder.yudao.module.system.service.dict.DictDataService; import cn.iocoder.yudao.module.system.service.dict.DictTypeService; import cn.iocoder.yudao.util.StringUtils; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.pagehelper.PageHelper; import cn.iocoder.yudao.module.core.controller.BaseController; @@ -322,17 +324,16 @@ public class PartnerOwnController extends BaseController { * 获取员工信息 */ @GetMapping("/getWorkList") - public TableDataInfo getWorkList(Long partnerId,String workName,String phoneNum,Long postId,Integer pageNum,Integer pageSize) + public CommonResult> getWorkList(Long partnerId, String workName, String phoneNum, Long postId, Integer pageNum, Integer pageSize) { LoginUser user = SecurityFrameworkUtils.getLoginUser(); ShopMallPartners partnersTmp = partnerList.getById(partnerId); if (!partnersTmp.getUserId().equals(user.getId())){ return null; } -// Page page = new Page<>(pageNum, pageSize); - PageHelper.startPage(pageNum,pageSize); - List workList = partnerList.getWorkList(partnerId,postId, workName, phoneNum); - return getDataTable(workList); + Page page = new Page<>(pageNum, pageSize); + IPage workList = partnerList.pageWorkList(partnerId,postId, workName, phoneNum,page); + return CommonResult.success(workList); } @PostMapping("/delWorker") diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java index 2351d225..b0e09768 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.inspection.mapper; +import cn.iocoder.yudao.module.label.vo.LabelRespVO; import cn.iocoder.yudao.module.partner.entity.PartnerWorker; import cn.iocoder.yudao.module.payment.entity.OrderInfo; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -9,6 +10,7 @@ import cn.iocoder.yudao.module.inspection.entity.ShopInspectionCategory; import cn.iocoder.yudao.module.inspection.query.PartnerListQuery; import cn.iocoder.yudao.module.inspection.vo.*; import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -33,6 +35,7 @@ public interface AppInspectionPartnerMapper extends BaseMapper List manageGoodsList(@Param("partnerId") Long partnerId, @Param("isListing")String isListing,@Param("goodsTitle") String goodsTitle); List orderList(@Param("partnerId") Long partnerId, @Param("phoneNum") String phoneNum,@Param("title") String title); List getWorkList(@Param("partnerId")Long partnerId, @Param("postId") Long postId, @Param("workName") String workName, @Param("phoneNum")String phoneNum); + IPage pageWorkList(@Param("partnerId")Long partnerId, @Param("postId") Long postId, @Param("workName") String workName, @Param("phoneNum")String phoneNum,Page page); List inspectionList(Page page,@Param("partnerId")Long partnerId, @Param("status") String status, @Param("carNum")String carNum); List workerInspectionList(@Param("workerId")Long workerId,@Param("status") String status, @Param("searchValue")String searchValue); List validationList(@Param("partnerId") Long partnerId, @Param("searchValue") String searchValue); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java index 24822a53..1a607599 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java @@ -1,11 +1,14 @@ package cn.iocoder.yudao.module.inspection.service; +import cn.iocoder.yudao.module.label.vo.LabelPageReqVO; +import cn.iocoder.yudao.module.label.vo.LabelRespVO; import cn.iocoder.yudao.module.partner.entity.PartnerBalance; import cn.iocoder.yudao.module.partner.entity.PartnerBalanceDetail; import cn.iocoder.yudao.module.partner.entity.PartnerWorker; import cn.iocoder.yudao.module.payment.entity.OrderInfo; import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import cn.iocoder.yudao.module.inspection.entity.*; @@ -62,6 +65,8 @@ public interface AppInspectionPartnerService extends IService void addWorker(Long partnerId,String realName,String phoneNum,Long postId) throws Exception; List getWorkList(Long partnerId, Long postId, String workName, String phoneNum); + IPage pageWorkList(Long partnerId, Long postId, String workName, String phoneNum, Page page); + void delWorker(Long partnerId,Long workId); List inspectionList(Page page,Long partnerId, String status, String carNum); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java index 4a22cb5e..f6721005 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java @@ -9,6 +9,7 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import cn.iocoder.yudao.module.config.service.IInspSysConfigService; +import cn.iocoder.yudao.module.label.vo.LabelRespVO; import cn.iocoder.yudao.module.partner.entity.PartnerBalance; import cn.iocoder.yudao.module.partner.entity.PartnerBalanceDetail; import cn.iocoder.yudao.module.partner.entity.PartnerCustomerInfo; @@ -39,6 +40,7 @@ import cn.iocoder.yudao.util.VehicleLicenseOCR; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.github.pagehelper.PageHelper; @@ -1082,6 +1084,11 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl pageWorkList(Long partnerId, Long postId, String workName, String phoneNum, Page page) { + return baseMapper.pageWorkList(partnerId,postId,workName,phoneNum,page); + } + @Override public void delWorker(Long partnerId, Long workId) { LoginUser user = SecurityFrameworkUtils.getLoginUser(); @@ -1413,14 +1420,14 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl postPage = postService.getPostPage(post); + List postPage = postService.listPostPage(post); - List sysPosts = postPage.getList(); - PostDO sysPost = new PostDO(); - sysPost.setId(null); - sysPost.setName("全部"); - sysPosts.add(0,sysPost); - return sysPosts; +// List sysPosts = postPage.getList(); +// PostDO sysPost = new PostDO(); +// sysPost.setId(null); +// sysPost.setName("全部"); +// sysPosts.add(sysPost); + return postPage; } @Override diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/AppInspectionPartnerMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/AppInspectionPartnerMapper.xml index 9882fee4..b7039a01 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/AppInspectionPartnerMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/AppInspectionPartnerMapper.xml @@ -424,4 +424,23 @@ FROM where ipc.deleted = 0 and ia.deleted= 0 and ipc.partner_id = #{partnerId} and ia.appointment_day = #{formDate} order by ipc.create_time desc + diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/PostMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/PostMapper.java index e05c38c7..75feeee8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/PostMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dept/PostMapper.java @@ -19,6 +19,12 @@ public interface PostMapper extends BaseMapperX { .inIfPresent(PostDO::getStatus, statuses)); } + default List listPostPage(PostPageReqVO reqVO) { + return selectList(new LambdaQueryWrapperX().likeIfPresent(PostDO::getCode, reqVO.getCode()) + .likeIfPresent(PostDO::getName, reqVO.getName()) + .eqIfPresent(PostDO::getStatus, reqVO.getStatus())); + } + default PageResult selectPage(PostPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(PostDO::getCode, reqVO.getCode()) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/oauth2/OAuth2AccessTokenRedisDAO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/oauth2/OAuth2AccessTokenRedisDAO.java index 7827dfa1..8b0fcb56 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/oauth2/OAuth2AccessTokenRedisDAO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/redis/oauth2/OAuth2AccessTokenRedisDAO.java @@ -38,7 +38,7 @@ public class OAuth2AccessTokenRedisDAO { accessTokenDO.setUpdater(null).setUpdateTime(null).setCreateTime(null).setCreator(null).setDeleted(null); long time = LocalDateTimeUtil.between(LocalDateTime.now(), accessTokenDO.getExpiresTime(), ChronoUnit.SECONDS); if (time > 0) { - stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(accessTokenDO), time, TimeUnit.SECONDS); + stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(accessTokenDO)); } } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostService.java index 25604ceb..9991b7d2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostService.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostService.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostSaveReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO; +import com.baomidou.mybatisplus.core.metadata.IPage; import org.springframework.lang.Nullable; import java.util.Collection; @@ -63,6 +64,7 @@ public interface PostService { * @return 部门分页列表 */ PageResult getPostPage(PostPageReqVO reqVO); + List listPostPage(PostPageReqVO reqVO); /** * 获得岗位信息 diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostServiceImpl.java index 168386e5..58cd9fcb 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/dept/PostServiceImpl.java @@ -126,6 +126,11 @@ public class PostServiceImpl implements PostService { return postMapper.selectPage(reqVO); } + @Override + public List listPostPage(PostPageReqVO reqVO) { + return postMapper.listPostPage(reqVO); + } + @Override public PostDO getPost(Long id) { return postMapper.selectById(id);