diff --git a/dl-module-base/pom.xml b/dl-module-base/pom.xml index 7146ee3c..49b21e0f 100644 --- a/dl-module-base/pom.xml +++ b/dl-module-base/pom.xml @@ -113,4 +113,4 @@ 3.1.837 - \ No newline at end of file + diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java index 35141fa7..1344e3c5 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java @@ -1,16 +1,27 @@ package cn.iocoder.yudao.module.appBase.controller; +import cn.hutool.core.util.ObjectUtil; 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.appBase.entity.AppSwiper; import cn.iocoder.yudao.module.appBase.service.IAppSwiperService; import cn.iocoder.yudao.module.core.controller.BaseController; import cn.iocoder.yudao.module.core.page.TableDataInfo; +import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; +import cn.iocoder.yudao.module.shop.service.IShopMallPartnersService; +import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; +import cn.iocoder.yudao.module.system.service.user.AdminUserService; import cn.iocoder.yudao.util.ExcelUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.thoughtworks.xstream.core.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * 【请填写功能名称】Controller @@ -19,17 +30,21 @@ import java.util.List; * @date 2023-08-01 */ @RestController -@RequestMapping("/system/appSwiper") +@RequestMapping("/admin-api") public class AppSwiperController extends BaseController { @Autowired private IAppSwiperService appSwiperService; + @Autowired + private IShopMallPartnersService partnersService; + @Autowired + private AdminUserService userService; /** * 查询【请填写功能名称】列表 */ @PreAuthorize("@ss.hasPermi('system:swiper:list')") - @GetMapping("/list") + @GetMapping("/system/appSwiper/list") public TableDataInfo list(AppSwiper appSwiper) { startPage(); @@ -41,7 +56,7 @@ public class AppSwiperController extends BaseController * 导出【请填写功能名称】列表 */ @PreAuthorize("@ss.hasPermi('system:swiper:export')") - @PostMapping("/export") + @PostMapping("/system/appSwiper/export") public void export(HttpServletResponse response, AppSwiper appSwiper) { List list = appSwiperService.selectAppSwiperList(appSwiper); @@ -53,7 +68,7 @@ public class AppSwiperController extends BaseController * 获取【请填写功能名称】详细信息 */ @PreAuthorize("@ss.hasPermi('system:swiper:query')") - @GetMapping(value = "/{swiperId}") + @GetMapping(value = "/system/appSwiper/{swiperId}") public CommonResult getInfo(@PathVariable("swiperId") Long swiperId) { return success(appSwiperService.selectAppSwiperBySwiperId(swiperId)); @@ -63,7 +78,7 @@ public class AppSwiperController extends BaseController * 新增【请填写功能名称】 */ @PreAuthorize("@ss.hasPermi('system:swiper:add')") - @PostMapping("/add") + @PostMapping("/system/appSwiper/add") public CommonResult add(@RequestBody AppSwiper appSwiper) { return toAjax(appSwiperService.insertAppSwiper(appSwiper)); @@ -72,7 +87,7 @@ public class AppSwiperController extends BaseController /** * 修改【请填写功能名称】 */ - @PostMapping("/edit") + @PostMapping("/system/appSwiper/edit") public CommonResult edit(@RequestBody AppSwiper appSwiper) { return toAjax(appSwiperService.updateAppSwiper(appSwiper)); @@ -81,9 +96,26 @@ public class AppSwiperController extends BaseController /** * 删除【请填写功能名称】 */ - @PostMapping("/del") + @PostMapping("/system/appSwiper/del") public CommonResult remove(@RequestParam("idList") Long[] idList) { return toAjax(appSwiperService.deleteAppSwiperBySwiperIds(idList)); } + + + @GetMapping("/getJcPartnerInfo") + public CommonResult getJcPartnerInfo() + { + LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); + LoginUser user = SecurityFrameworkUtils.getLoginUser(); + queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); + ShopMallPartners partner = partnersService.getOne(queryWrapper); + if (ObjectUtil.isEmpty(partner)){ + return error("信息有误"); + } + AdminUserDO sysUser = userService.getUser(user.getId()); + Map map = new HashMap<>(); + map.put("user", sysUser); + return CommonResult.success(map); + } } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppGoodsController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppGoodsController.java index 4958c458..c72aa702 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppGoodsController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppGoodsController.java @@ -16,7 +16,7 @@ import cn.iocoder.yudao.module.core.controller.BaseController; import java.util.List; @RestController -@RequestMapping("/appInspection/goods") +@RequestMapping("/admin-api/appInspection/goods") public class AppGoodsController extends BaseController { @Autowired private AppInspectionGoodsService appInspectionGoodsService; diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppHomeController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppHomeController.java index d72d465e..ba25b269 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppHomeController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppHomeController.java @@ -22,7 +22,7 @@ import java.util.List; * @since 2023-08-01 16:04:12 */ @RestController("AppShopInspectionGoods") -@RequestMapping("/appInspection/appHome") +@RequestMapping("/admin-api/appInspection/appHome") public class AppHomeController extends BaseController { /** * 服务对象 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppNewsController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppNewsController.java index bbbc12ff..09a5009e 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppNewsController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppNewsController.java @@ -16,6 +16,7 @@ import cn.iocoder.yudao.module.system.service.dict.DictDataService; import cn.iocoder.yudao.module.system.service.permission.RoleService; import cn.iocoder.yudao.util.StringUtils; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.pagehelper.PageHelper; import cn.iocoder.yudao.module.core.controller.BaseController; import cn.iocoder.yudao.module.core.page.TableDataInfo; @@ -34,7 +35,7 @@ import java.util.List; import java.util.stream.Collectors; @RestController -@RequestMapping("/appInspection/news") +@RequestMapping("/admin-api/appInspection/news") public class AppNewsController extends BaseController { @Autowired private IInspectionNewsService inspectionNewsService; @@ -104,21 +105,21 @@ public class AppNewsController extends BaseController { return success(list); } @GetMapping("/list") - public TableDataInfo list(InspectionNews inspectionNews) + public TableDataInfo list(InspectionNews inspectionNews,@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize) { - startPage(); - List list = inspectionNewsService.selectInspectionNewsList(inspectionNews); + Page page = new Page<>(pageNum, pageSize); + List list = inspectionNewsService.selectInspectionNewsList(page,inspectionNews); return getDataTable(list); } @GetMapping("/ownList") - public TableDataInfo ownList(InspectionNews inspectionNews) + public TableDataInfo ownList(InspectionNews inspectionNews,@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize) { //当前登录用户 LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); inspectionNews.setCreator(loginUser.getId().toString()); - startPage(); - List list = inspectionNewsService.selectInspectionNewsList(inspectionNews); + Page page = new Page<>(pageNum, pageSize); + List list = inspectionNewsService.selectInspectionNewsList(page,inspectionNews); return getDataTable(list); } @PostMapping("/add") diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppOrderController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppOrderController.java index 612fbc10..422e80f2 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppOrderController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppOrderController.java @@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController -@RequestMapping("/appInspection/order") +@RequestMapping("/admin-api/appInspection/order") public class AppOrderController extends BaseController { @Autowired private AppInspectionOrderService appInspectionOrderService; diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppPartnerController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppPartnerController.java index f0ab5d03..dc93a082 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppPartnerController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppPartnerController.java @@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; @RestController -@RequestMapping("/appInspection/partner") +@RequestMapping("/admin-api/appInspection/partner") public class AppPartnerController extends BaseController { @Autowired private AppInspectionPartnerService partnerList; diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppUserOwnController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppUserOwnController.java index 5a99009b..769b511b 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppUserOwnController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/AppUserOwnController.java @@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; @RestController -@RequestMapping("/appInspection/userOwn") +@RequestMapping("/admin-api/appInspection/userOwn") public class AppUserOwnController extends BaseController { @Autowired private AppUserOwnService ownService; diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DelInspectionInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DelInspectionInfoController.java index ff986dfe..c7262f8c 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DelInspectionInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DelInspectionInfoController.java @@ -27,7 +27,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2024-05-08 */ @RestController -@RequestMapping("/system/delInfo") +@RequestMapping("/admin-api/system/delInfo") public class DelInspectionInfoController extends BaseController { @Autowired diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionAppointmentController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionAppointmentController.java index af2ca109..9ed115ed 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionAppointmentController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionAppointmentController.java @@ -20,7 +20,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2023-08-24 */ @RestController -@RequestMapping("/inspection/appointment") +@RequestMapping("/admin-api/inspection/appointment") public class InspectionAppointmentController extends BaseController { @Autowired diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionCategoryTemplateController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionCategoryTemplateController.java index cd61186d..d251bac4 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionCategoryTemplateController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionCategoryTemplateController.java @@ -28,7 +28,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2023-09-07 */ @RestController -@RequestMapping("/inspection/template") +@RequestMapping("/admin-api/inspection/template") public class InspectionCategoryTemplateController extends BaseController { @Autowired diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java index fb2c6435..f3f877b3 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java @@ -27,7 +27,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2023-10-13 */ @RestController -@RequestMapping("/system/equInfo") +@RequestMapping("/admin-api/system/equInfo") public class InspectionEquInfoController extends BaseController { @Autowired diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionFileController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionFileController.java index ce39d58f..4cc714ba 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionFileController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionFileController.java @@ -26,7 +26,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2023-10-13 */ @RestController -@RequestMapping("/inspectionFile/inspectionFile") +@RequestMapping("/admin-api/inspectionFile/inspectionFile") public class InspectionFileController extends BaseController { @Autowired diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionGoodsSkuController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionGoodsSkuController.java index 8735135c..3780ca18 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionGoodsSkuController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionGoodsSkuController.java @@ -17,7 +17,7 @@ import java.util.List; * @since 2023-08-08 16:59:29 */ @RestController -@RequestMapping("/system/inspectionGoodsSku") +@RequestMapping("/admin-api/system/inspectionGoodsSku") public class InspectionGoodsSkuController extends BaseController { /** * 服务对象 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionHomePartnerController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionHomePartnerController.java index 69cd5189..ee689a57 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionHomePartnerController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionHomePartnerController.java @@ -14,7 +14,7 @@ import cn.iocoder.yudao.module.core.controller.BaseController; * @date 2023-08-02 */ @RestController -@RequestMapping("/system/homePartner") +@RequestMapping("/admin-api/system/homePartner") public class InspectionHomePartnerController extends BaseController { @Autowired diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java index 119dc5f9..f9fe9000 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionInfoController.java @@ -20,7 +20,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2023-08-13 */ @RestController -@RequestMapping("/system/info") +@RequestMapping("/admin-api/system/info") public class InspectionInfoController extends BaseController { @Autowired diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java index 48291e9c..e76c76ee 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionMallPartnersController.java @@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.system.service.permission.PermissionService; import cn.iocoder.yudao.module.system.service.permission.RoleService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.pagehelper.PageHelper; import cn.iocoder.yudao.module.core.controller.BaseController; import cn.iocoder.yudao.module.core.page.TableDataInfo; @@ -38,7 +39,7 @@ import java.util.stream.Collectors; @RestController -@RequestMapping("/system/inspectionMallPartners") +@RequestMapping("/admin-api/system/inspectionMallPartners") public class InspectionMallPartnersController extends BaseController { @Autowired private IShopMallPartnersService shopMallPartnersService; @@ -57,11 +58,11 @@ public class InspectionMallPartnersController extends BaseController { * 查询合作商管理列表 */ @GetMapping("/list") - public TableDataInfo list(ShopMallPartners shopMallPartners) + public TableDataInfo list(ShopMallPartners shopMallPartners,@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize) { shopMallPartners.setType("jc"); - startPage(); - List list = shopMallPartnersService.selectShopMallPartnersList(shopMallPartners); + Page page = new Page<>(pageNum, pageSize); + List list = shopMallPartnersService.selectShopMallPartnersList(page,shopMallPartners); return getDataTable(list); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsAssociationController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsAssociationController.java index 23418cc5..e7f80bc2 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsAssociationController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsAssociationController.java @@ -27,7 +27,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2023-08-07 */ @RestController -@RequestMapping("/system/association") +@RequestMapping("/admin-api/system/association") public class InspectionNewsAssociationController extends BaseController { @Autowired diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsCommentController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsCommentController.java index 65c20742..ce920d09 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsCommentController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsCommentController.java @@ -27,7 +27,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2023-08-07 */ @RestController -@RequestMapping("/system/comment") +@RequestMapping("/admin-api/system/comment") public class InspectionNewsCommentController extends BaseController { @Autowired diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsController.java index 6dba452f..d383bd02 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionNewsController.java @@ -5,6 +5,8 @@ import java.util.List; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.inspection.entity.InspectionNews; import cn.iocoder.yudao.module.inspection.service.IInspectionNewsService; +import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -18,7 +20,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2023-08-03 */ @RestController -@RequestMapping("/system/inspectionNews") +@RequestMapping("/admin-api/system/inspectionNews") public class InspectionNewsController extends BaseController { @Autowired @@ -27,12 +29,12 @@ public class InspectionNewsController extends BaseController /** * 查询【请填写功能名称】列表 */ - @PreAuthorize("@ss.hasPermi('system:news:list')") +// @PreAuthorize("@ss.hasPermi('system:news:list')") @GetMapping("/list") - public TableDataInfo list(InspectionNews inspectionNews) + public TableDataInfo list(InspectionNews inspectionNews,@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize) { - startPage(); - List list = inspectionNewsService.selectInspectionNewsList(inspectionNews); + Page page = new Page<>(pageNum, pageSize); + List list = inspectionNewsService.selectInspectionNewsList(page,inspectionNews); return getDataTable(list); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionPickCarController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionPickCarController.java index ef07d468..d8641587 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionPickCarController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionPickCarController.java @@ -27,7 +27,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2023-09-02 */ @RestController -@RequestMapping("/inspection/pickCar") +@RequestMapping("/admin-api/inspection/pickCar") public class InspectionPickCarController extends BaseController { @Autowired 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 a2e792ac..578a6311 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 @@ -36,7 +36,7 @@ import java.util.List; import java.util.stream.Collectors; @RestController -@RequestMapping("/partnerOwn/partner") +@RequestMapping("/admin-api/partnerOwn/partner") public class PartnerOwnController extends BaseController { @Autowired private AppInspectionPartnerService partnerList; diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionCategoryController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionCategoryController.java index 52030068..ca1fbd34 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionCategoryController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionCategoryController.java @@ -1,6 +1,8 @@ package cn.iocoder.yudao.module.inspection.controller; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.core.controller.BaseController; import cn.iocoder.yudao.module.core.page.TableDataInfo; import cn.iocoder.yudao.module.inspection.entity.ShopInspectionCategory; @@ -17,7 +19,7 @@ import java.util.List; * @since 2023-08-01 19:59:23 */ @RestController -@RequestMapping("/system/shopInspectionCategory") +@RequestMapping("/admin-api/system/shopInspectionCategory") public class ShopInspectionCategoryController extends BaseController { /** * 服务对象 @@ -31,11 +33,13 @@ public class ShopInspectionCategoryController extends BaseController { * @return 所有数据 */ @GetMapping("/list") - public TableDataInfo list(ShopInspectionCategory shopInspectionCategory) + public CommonResult list(ShopInspectionCategory shopInspectionCategory,@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) { - startPage(); - List list = this.shopInspectionCategoryService.listVo(shopInspectionCategory); - return getDataTable(list); + PageParam pageParam = new PageParam(); + pageParam.setPageNo(pageNum); + pageParam.setPageSize(pageSize); + PageResult res = this.shopInspectionCategoryService.listVo(shopInspectionCategory,pageParam); + return CommonResult.success(res); } /** diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java index 789a2ed2..53cb401a 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionGoodsController.java @@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService; import cn.iocoder.yudao.module.partner.entity.PartnerWorker; import cn.iocoder.yudao.module.payment.entity.OrderInfo; import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.commons.lang3.ObjectUtils; import org.springframework.context.annotation.Lazy; import org.springframework.security.access.prepost.PreAuthorize; @@ -36,7 +37,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2023-07-08 */ @RestController -@RequestMapping("/system/inspectionGoods") +@RequestMapping("/admin-api/system/inspectionGoods") public class ShopInspectionGoodsController extends BaseController { @Autowired @@ -56,12 +57,12 @@ public class ShopInspectionGoodsController extends BaseController /** * 查询检测商品列表 */ - @PreAuthorize("@ss.hasPermi('system:inspectionGoods:list')") +// @PreAuthorize("@ss.hasPermi('system:inspectionGoods:list')") @GetMapping("/listSystem") - public TableDataInfo listSystem(ShopInspectionGoods shopInspectionGoods) + public TableDataInfo listSystem(ShopInspectionGoods shopInspectionGoods,@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize) { - startPage(); - List list = shopInspectionGoodsService.listSystem(shopInspectionGoods); + Page page = new Page<>(pageNum, pageSize); + List list = shopInspectionGoodsService.listSystem(page,shopInspectionGoods); return getDataTable(list); } @@ -219,7 +220,7 @@ public class ShopInspectionGoodsController extends BaseController /** * 新增检测商品 */ - @PreAuthorize("@ss.hasPermi('system:inspectionGoods:add')") +// @PreAuthorize("@ss.hasPermi('system:inspectionGoods:add')") @PostMapping("/add") public CommonResult add(@RequestBody ShopInspectionGoods shopInspectionGoods) { @@ -230,7 +231,7 @@ public class ShopInspectionGoodsController extends BaseController /** * 修改检测商品 */ - @PreAuthorize("@ss.hasPermi('system:inspectionGoods:edit')") +// @PreAuthorize("@ss.hasPermi('system:inspectionGoods:edit')") @PostMapping("/edit") public CommonResult edit(@RequestBody ShopInspectionGoods shopInspectionGoods) { @@ -240,7 +241,7 @@ public class ShopInspectionGoodsController extends BaseController /** * 审核检测商品 */ - @PreAuthorize("@ss.hasPermi('system:inspectionGoods:edit')") +// @PreAuthorize("@ss.hasPermi('system:inspectionGoods:edit')") @PostMapping("/examine") public CommonResult examine(@RequestBody ShopInspectionGoods shopInspectionGoods) { @@ -250,7 +251,7 @@ public class ShopInspectionGoodsController extends BaseController /** * 删除检测商品 */ - @PreAuthorize("@ss.hasPermi('system:inspectionGoods:remove')") +// @PreAuthorize("@ss.hasPermi('system:inspectionGoods:remove')") @PostMapping("/del") public CommonResult remove(@RequestParam("idList") Long[] ids) { diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionOrderController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionOrderController.java index 16eed52a..1a022887 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionOrderController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/ShopInspectionOrderController.java @@ -14,7 +14,7 @@ import cn.iocoder.yudao.module.core.controller.BaseController; * @date 2023-07-08 */ @RestController -@RequestMapping("/system/inspectionOrder") +@RequestMapping("/admin-api/system/inspectionOrder") public class ShopInspectionOrderController extends BaseController { @Autowired diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/SiteInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/SiteInfoController.java index 35c3dafd..e016441c 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/SiteInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/SiteInfoController.java @@ -5,16 +5,10 @@ import javax.servlet.http.HttpServletResponse; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.util.ExcelUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import cn.iocoder.yudao.module.core.controller.BaseController; import cn.iocoder.yudao.module.inspection.entity.SiteInfo; import cn.iocoder.yudao.module.inspection.service.ISiteInfoService; @@ -27,7 +21,7 @@ import cn.iocoder.yudao.module.core.page.TableDataInfo; * @date 2023-09-01 */ @RestController -@RequestMapping("/inspection/info") +@RequestMapping("/admin-api/inspection/info") public class SiteInfoController extends BaseController { @Autowired @@ -37,10 +31,10 @@ public class SiteInfoController extends BaseController * 查询inspection列表 */ @GetMapping("/list") - public TableDataInfo list(SiteInfo siteInfo) + public TableDataInfo list(SiteInfo siteInfo, @RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize) { - startPage(); - List list = siteInfoService.selectSiteInfoList(siteInfo); + Page page = new Page<>(pageNum, pageSize); + List list = siteInfoService.selectSiteInfoList(page,siteInfo); return getDataTable(list); } @@ -51,7 +45,8 @@ public class SiteInfoController extends BaseController @PostMapping("/export") public void export(HttpServletResponse response, SiteInfo siteInfo) { - List list = siteInfoService.selectSiteInfoList(siteInfo); + Page page = new Page<>(); + List list = siteInfoService.selectSiteInfoList(page,siteInfo); ExcelUtil util = new ExcelUtil(SiteInfo.class); util.exportExcel(response, list, "inspection数据"); } @@ -59,7 +54,7 @@ public class SiteInfoController extends BaseController /** * 获取inspection详细信息 */ - @PreAuthorize("@ss.hasPermi('inspection:info:query')") +// @PreAuthorize("@ss.hasPermi('inspection:info:query')") @GetMapping(value = "/{id}") public CommonResult getInfo(@PathVariable("id") Long id) { @@ -69,7 +64,7 @@ public class SiteInfoController extends BaseController /** * 新增inspection */ - @PreAuthorize("@ss.hasPermi('inspection:info:add')") +// @PreAuthorize("@ss.hasPermi('inspection:info:add')") @PostMapping public CommonResult add(@RequestBody SiteInfo siteInfo) { @@ -79,7 +74,7 @@ public class SiteInfoController extends BaseController /** * 修改inspection */ - @PreAuthorize("@ss.hasPermi('inspection:info:edit')") +// @PreAuthorize("@ss.hasPermi('inspection:info:edit')") @PutMapping public CommonResult edit(@RequestBody SiteInfo siteInfo) { @@ -89,7 +84,7 @@ public class SiteInfoController extends BaseController /** * 删除inspection */ - @PreAuthorize("@ss.hasPermi('inspection:info:remove')") +// @PreAuthorize("@ss.hasPermi('inspection:info:remove')") @DeleteMapping("/{ids}") public CommonResult remove(@PathVariable Long[] ids) { diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/WarnMessageController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/WarnMessageController.java index f0606214..00c2020c 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/WarnMessageController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/WarnMessageController.java @@ -24,7 +24,7 @@ import cn.iocoder.yudao.module.inspection.service.IWarnMessageService; * @date 2023-10-13 */ @RestController -@RequestMapping("/warnMsg/warnMsg") +@RequestMapping("/admin-api/warnMsg/warnMsg") public class WarnMessageController extends BaseController { @Autowired diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionCategoryTemplateMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionCategoryTemplateMapper.java index 2b554c21..9dbac8a8 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionCategoryTemplateMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionCategoryTemplateMapper.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.inspection.mapper; import java.util.List; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.iocoder.yudao.module.inspection.entity.InspectionCategoryTemplate; import org.apache.ibatis.annotations.Mapper; @@ -13,7 +14,7 @@ import org.apache.ibatis.annotations.Mapper; * @date 2023-09-07 */ @Mapper -public interface InspectionCategoryTemplateMapper extends BaseMapper +public interface InspectionCategoryTemplateMapper extends BaseMapperX { /** * 查询分类模版 @@ -62,4 +63,6 @@ public interface InspectionCategoryTemplateMapper extends BaseMapper * @param inspectionNews 【请填写功能名称】 * @return 【请填写功能名称】集合 */ - public List selectInspectionNewsList(InspectionNews inspectionNews); + public List selectInspectionNewsList(Page page, @Param("vo") InspectionNews inspectionNews); /** * 新增【请填写功能名称】 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ShopInspectionCategoryMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ShopInspectionCategoryMapper.java index cf70583d..c4b43fbd 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ShopInspectionCategoryMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ShopInspectionCategoryMapper.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.inspection.mapper; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.iocoder.yudao.module.inspection.entity.ShopInspectionCategory; import org.apache.ibatis.annotations.Mapper; @@ -11,7 +12,7 @@ import org.apache.ibatis.annotations.Mapper; * @since 2023-08-01 19:59:23 */ @Mapper -public interface ShopInspectionCategoryMapper extends BaseMapper { +public interface ShopInspectionCategoryMapper extends BaseMapperX { } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ShopInspectionGoodsMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ShopInspectionGoodsMapper.java index 3bfea70b..d6af7b5a 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ShopInspectionGoodsMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/ShopInspectionGoodsMapper.java @@ -4,7 +4,9 @@ import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.iocoder.yudao.module.inspection.entity.ShopInspectionGoods; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 检测商品Mapper接口 @@ -31,8 +33,9 @@ public interface ShopInspectionGoodsMapper extends BaseMapper selectShopInspectionGoodsListWx(ShopInspectionGoods shopInspectionGoods); - List listSystem(ShopInspectionGoods shopInspectionGoods); + List listSystem(Page page,@Param("vo") ShopInspectionGoods shopInspectionGoods); List listPartnerGoods(ShopInspectionGoods shopInspectionGoods); + int deleteByList(List list); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/SiteInfoMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/SiteInfoMapper.java index 3349a0a2..27387db5 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/SiteInfoMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/SiteInfoMapper.java @@ -2,7 +2,9 @@ package cn.iocoder.yudao.module.inspection.mapper; import java.util.List; import cn.iocoder.yudao.module.inspection.entity.SiteInfo; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * inspectionMapper接口 @@ -27,7 +29,7 @@ public interface SiteInfoMapper * @param siteInfo inspection * @return inspection集合 */ - public List selectSiteInfoList(SiteInfo siteInfo); + public List selectSiteInfoList(Page page,@Param("vo") SiteInfo siteInfo); /** * 新增inspection diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionCategoryTemplateService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionCategoryTemplateService.java index 73a081bf..c0936c06 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionCategoryTemplateService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionCategoryTemplateService.java @@ -60,4 +60,6 @@ public interface IInspectionCategoryTemplateService extends IService * @param inspectionNews 【请填写功能名称】 * @return 【请填写功能名称】集合 */ - public List selectInspectionNewsList(InspectionNews inspectionNews); + public List selectInspectionNewsList(Page page,InspectionNews inspectionNews); List appHomeNewsList(); List listGfClass(String type); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IShopInspectionGoodsService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IShopInspectionGoodsService.java index fe29f879..4561d6c2 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IShopInspectionGoodsService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IShopInspectionGoodsService.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.inspection.service; import java.util.List; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import cn.iocoder.yudao.module.inspection.entity.ShopInspectionCategory; import cn.iocoder.yudao.module.inspection.entity.ShopInspectionGoods; @@ -78,7 +79,7 @@ public interface IShopInspectionGoodsService extends IService listSystem(ShopInspectionGoods shopInspectionGoods); + public List listSystem(Page page,ShopInspectionGoods shopInspectionGoods); public List listPartnerGoods(ShopInspectionGoods shopInspectionGoods) throws Exception; List categoryList() throws Exception; diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ISiteInfoService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ISiteInfoService.java index d337a2d2..8f41636f 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ISiteInfoService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ISiteInfoService.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.inspection.service; import java.util.List; import cn.iocoder.yudao.module.inspection.entity.SiteInfo; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; /** * inspectionService接口 @@ -25,7 +26,7 @@ public interface ISiteInfoService * @param siteInfo inspection * @return inspection集合 */ - public List selectSiteInfoList(SiteInfo siteInfo); + public List selectSiteInfoList(Page page,SiteInfo siteInfo); /** * 新增inspection diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ShopInspectionCategoryService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ShopInspectionCategoryService.java index 870fb7ab..a84f54bd 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ShopInspectionCategoryService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/ShopInspectionCategoryService.java @@ -1,5 +1,7 @@ package cn.iocoder.yudao.module.inspection.service; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import com.baomidou.mybatisplus.extension.service.IService; import cn.iocoder.yudao.module.inspection.entity.ShopInspectionCategory; @@ -15,7 +17,7 @@ public interface ShopInspectionCategoryService extends IService idList) throws Exception; - List listVo(ShopInspectionCategory shopInspectionCategory); + PageResult listVo(ShopInspectionCategory shopInspectionCategory, PageParam pageParam); ShopInspectionCategory getByIdVo(Long id); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionCategoryTemplateServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionCategoryTemplateServiceImpl.java index aa50b538..dfb6a5f9 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionCategoryTemplateServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionCategoryTemplateServiceImpl.java @@ -91,4 +91,9 @@ public class InspectionCategoryTemplateServiceImpl extends ServiceImpl selectInspectionNewsList(InspectionNews inspectionNews) + public List selectInspectionNewsList(Page page, InspectionNews inspectionNews) { - if (inspectionNews.getPublishUnit().equals("检测站公告")){ + if (null!=inspectionNews.getPublishUnit() && inspectionNews.getPublishUnit().equals("检测站公告")){ inspectionNews.setCategory("jczgg"); inspectionNews.setPublishUnit(null); } - List list = baseMapper.selectInspectionNewsList(inspectionNews); + List list = baseMapper.selectInspectionNewsList(page,inspectionNews); list.forEach(it->{ it.setNewsContent(HtmlFilter.dealFunction(it.getNewsContent())); }); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionCategoryServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionCategoryServiceImpl.java index a25a27a2..7db30031 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionCategoryServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionCategoryServiceImpl.java @@ -1,6 +1,9 @@ package cn.iocoder.yudao.module.inspection.service.impl; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.iocoder.yudao.module.core.page.TableDataInfo; @@ -48,9 +51,7 @@ public class ShopInspectionCategoryServiceImpl extends ServiceImpl wrapper =new LambdaUpdateWrapper<>(); - wrapper.eq(InspectionCategoryTemplate::getCategoryId,category.getId()); - templateService.remove(wrapper); + templateService.deleteByCategoryId(category.getId()); List templates = category.getTemplates(); for (InspectionCategoryTemplate template : templates) { template.setCategoryId(category.getId()); @@ -78,11 +79,14 @@ public class ShopInspectionCategoryServiceImpl extends ServiceImpl listVo(ShopInspectionCategory shopInspectionCategory) { - LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); - queryWrapper.like(StringUtils.isNotEmpty(shopInspectionCategory.getCategoryName()),ShopInspectionCategory::getCategoryName,shopInspectionCategory.getCategoryName()).orderByAsc(ShopInspectionCategory::getOrderNum); - List list = this.list(queryWrapper); - return list; + public PageResult listVo(ShopInspectionCategory shopInspectionCategory, PageParam pageParam) { + + QueryWrapper queryWrapper = new QueryWrapper<>(); + if(null!=shopInspectionCategory.getCategoryName()){ + queryWrapper.like("category_name",shopInspectionCategory.getCategoryName()); + } + queryWrapper.orderByAsc("order_num"); + return baseMapper.selectPage(pageParam,queryWrapper); } @Override diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionGoodsServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionGoodsServiceImpl.java index 127874e5..883ea61d 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionGoodsServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/ShopInspectionGoodsServiceImpl.java @@ -14,6 +14,7 @@ import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.service.user.AdminUserService; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.iocoder.yudao.util.StringUtils; import cn.iocoder.yudao.module.inspection.entity.InspectionCategoryTemplate; @@ -213,7 +214,7 @@ public class ShopInspectionGoodsServiceImpl extends ServiceImpl listSystem(ShopInspectionGoods shopInspectionGoods) { - return baseMapper.listSystem(shopInspectionGoods); + public List listSystem(Page page,ShopInspectionGoods shopInspectionGoods) { + return baseMapper.listSystem(page,shopInspectionGoods); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/SiteInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/SiteInfoServiceImpl.java index 56f035d7..f431f082 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/SiteInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/SiteInfoServiceImpl.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.inspection.service.impl; import java.util.List; import cn.iocoder.yudao.util.DateUtils; import cn.iocoder.yudao.util.StringUtils; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import cn.iocoder.yudao.module.inspection.mapper.SiteInfoMapper; @@ -40,9 +41,9 @@ public class SiteInfoServiceImpl implements ISiteInfoService * @return inspection */ @Override - public List selectSiteInfoList(SiteInfo siteInfo) + public List selectSiteInfoList(Page page,SiteInfo siteInfo) { - List siteInfos = siteInfoMapper.selectSiteInfoList(siteInfo); + List siteInfos = siteInfoMapper.selectSiteInfoList(page,siteInfo); for (SiteInfo info : siteInfos) { if (null!=info.getSiteLongitude()&&null!=info.getSiteLatitude()){ info.setLongitude(info.getSiteLongitude().toString()); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/controller/FzRecordController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/controller/FzRecordController.java new file mode 100644 index 00000000..beb4abea --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/controller/FzRecordController.java @@ -0,0 +1,84 @@ +package cn.iocoder.yudao.module.payment.controller; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.core.controller.BaseController; +import cn.iocoder.yudao.module.core.page.TableDataInfo; +import cn.iocoder.yudao.module.payment.entity.FzRecord; +import cn.iocoder.yudao.module.payment.service.IFzRecordService; +import cn.iocoder.yudao.util.ExcelUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 分账记录Controller + * + * @author zcy + * @date 2023-10-18 + */ +@RestController +@RequestMapping("/admin-api/fzRecord/fzRecord") +public class FzRecordController extends BaseController +{ + @Autowired + private IFzRecordService fzRecordService; + + /** + * 查询分账记录列表 + */ +// @PreAuthorize("@ss.hasPermi('fzRecord:fzRecord:list')") + @GetMapping("/list") + public TableDataInfo list(FzRecord fzRecord,@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize) + { + Page page = new Page<>(pageNum, pageSize); + List list = fzRecordService.selectFzRecordList(page,fzRecord); + return getDataTable(list); + } + + /** + * 导出分账记录列表 + */ +// @PreAuthorize("@ss.hasPermi('fzRecord:fzRecord:export')") + @PostMapping("/export") + public void export(HttpServletResponse response, FzRecord fzRecord) + { + Page page = new Page<>(); + List list = fzRecordService.selectFzRecordList(page,fzRecord); + ExcelUtil util = new ExcelUtil(FzRecord.class); + util.exportExcel(response, list, "分账记录数据"); + } + + /** + * 获取分账记录详细信息 + */ +// @PreAuthorize("@ss.hasPermi('fzRecord:fzRecord:query')") + @GetMapping(value = "/{id}") + public CommonResult getInfo(@PathVariable("id") Long id) + { + return success(fzRecordService.selectFzRecordById(id)); + } + + /** + * 新增分账记录 + */ +// @PreAuthorize("@ss.hasPermi('fzRecord:fzRecord:add')") + @PostMapping + public CommonResult add(@RequestBody FzRecord fzRecord) + { + return toAjax(fzRecordService.insertFzRecord(fzRecord)); + } + + /** + * 修改分账记录 + */ +// @PreAuthorize("@ss.hasPermi('fzRecord:fzRecord:edit')") + @PutMapping + public CommonResult edit(@RequestBody FzRecord fzRecord) + { + return toAjax(fzRecordService.updateFzRecord(fzRecord)); + } + +} diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/entity/FzRecord.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/entity/FzRecord.java new file mode 100644 index 00000000..ba798726 --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/entity/FzRecord.java @@ -0,0 +1,54 @@ +package cn.iocoder.yudao.module.payment.entity; + +import cn.iocoder.yudao.annotation.Excel; +import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +/** + * 分账记录对象 fz_record + * + * @author zcy + * @date 2023-10-18 + */ +@Data +public class FzRecord extends TenantBaseDO +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + @TableId(type = IdType.AUTO) + private Long id; + + /** 商户主键 */ + private Long partnerId; + + /** 商户名称 */ + @Excel(name = "商户名称") + private String partnerName; + + /** 订单主键 */ + private Long orderId; + + /** 单号 */ + @Excel(name = "单号") + private String orderNo; + + /** 入账金额单位分 */ + @Excel(name = "入账金额单位分") + private Long amount; + + /** 总金额 */ + @Excel(name = "总金额") + private Long totalAmount; + + /** 是否成功1成功0失败 */ + @Excel(name = "是否成功1成功0失败") + private String isSuccess; + + /** 失败原因 */ + @Excel(name = "失败原因") + private String reason; + +} diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/mapper/FzRecordMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/mapper/FzRecordMapper.java new file mode 100644 index 00000000..0fe04bf7 --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/mapper/FzRecordMapper.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.payment.mapper; + +import cn.iocoder.yudao.module.payment.entity.FzRecord; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 分账记录Mapper接口 + * + * @author zcy + * @date 2023-10-18 + */ +@Mapper +public interface FzRecordMapper extends BaseMapper +{ + /** + * 查询分账记录 + * + * @param id 分账记录主键 + * @return 分账记录 + */ + public FzRecord selectFzRecordById(Long id); + + /** + * 查询分账记录列表 + * + * @param fzRecord 分账记录 + * @return 分账记录集合 + */ + public List selectFzRecordList(Page page,@Param("vo") FzRecord fzRecord); + +} diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/service/IFzRecordService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/service/IFzRecordService.java new file mode 100644 index 00000000..522523cb --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/service/IFzRecordService.java @@ -0,0 +1,48 @@ +package cn.iocoder.yudao.module.payment.service; + +import cn.iocoder.yudao.module.payment.entity.FzRecord; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * 分账记录Service接口 + * + * @author zcy + * @date 2023-10-18 + */ +public interface IFzRecordService extends IService +{ + /** + * 查询分账记录 + * + * @param id 分账记录主键 + * @return 分账记录 + */ + public FzRecord selectFzRecordById(Long id); + + /** + * 查询分账记录列表 + * + * @param fzRecord 分账记录 + * @return 分账记录集合 + */ + public List selectFzRecordList(Page page,FzRecord fzRecord); + + /** + * 新增分账记录 + * + * @param fzRecord 分账记录 + * @return 结果 + */ + public int insertFzRecord(FzRecord fzRecord); + + /** + * 修改分账记录 + * + * @param fzRecord 分账记录 + * @return 结果 + */ + public int updateFzRecord(FzRecord fzRecord); + +} diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/service/impl/FzRecordServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/service/impl/FzRecordServiceImpl.java new file mode 100644 index 00000000..0d6db046 --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/service/impl/FzRecordServiceImpl.java @@ -0,0 +1,73 @@ +package cn.iocoder.yudao.module.payment.service.impl; + +import cn.iocoder.yudao.module.payment.entity.FzRecord; +import cn.iocoder.yudao.module.payment.mapper.FzRecordMapper; +import cn.iocoder.yudao.module.payment.service.IFzRecordService; +import cn.iocoder.yudao.util.DateUtils; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 分账记录Service业务层处理 + * + * @author zcy + * @date 2023-10-18 + */ +@Service +public class FzRecordServiceImpl extends ServiceImpl implements IFzRecordService +{ + + + /** + * 查询分账记录 + * + * @param id 分账记录主键 + * @return 分账记录 + */ + @Override + public FzRecord selectFzRecordById(Long id) + { + return baseMapper.selectFzRecordById(id); + } + + /** + * 查询分账记录列表 + * + * @param fzRecord 分账记录 + * @return 分账记录 + */ + @Override + public List selectFzRecordList(Page page,FzRecord fzRecord) + { + return baseMapper.selectFzRecordList(page,fzRecord); + } + + /** + * 新增分账记录 + * + * @param fzRecord 分账记录 + * @return 结果 + */ + @Override + public int insertFzRecord(FzRecord fzRecord) + { + return baseMapper.insert(fzRecord); + } + + /** + * 修改分账记录 + * + * @param fzRecord 分账记录 + * @return 结果 + */ + @Override + public int updateFzRecord(FzRecord fzRecord) + { + fzRecord.setUpdateTime(DateUtils.getNowDate()); + return baseMapper.updateById(fzRecord); + } + +} diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/controller/PartnerDetailController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/controller/PartnerDetailController.java new file mode 100644 index 00000000..729bed22 --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/controller/PartnerDetailController.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.shop.controller; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.core.controller.BaseController; +import cn.iocoder.yudao.module.core.page.TableDataInfo; +import cn.iocoder.yudao.module.shop.entity.PartnerDetail; +import cn.iocoder.yudao.module.shop.service.IPartnerDetailService; +import cn.iocoder.yudao.util.ExcelUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2023-08-13 + */ +@RestController +@RequestMapping("/admin-api/partner/detail") +public class PartnerDetailController extends BaseController +{ + @Autowired + private IPartnerDetailService partnerDetailService; + + /** + * 查询【请填写功能名称】列表 + */ +// @PreAuthorize("@ss.hasPermi('system:detail:list')") + @GetMapping("/list") + public TableDataInfo list(PartnerDetail partnerDetail,@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize) + { + Page page = new Page<>(pageNum, pageSize); + List list = partnerDetailService.selectPartnerDetailList(page,partnerDetail); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:detail:export')") + @PostMapping("/export") + public void export(HttpServletResponse response, PartnerDetail partnerDetail) + { + Page page = new Page<>(); + List list = partnerDetailService.selectPartnerDetailList(page,partnerDetail); + ExcelUtil util = new ExcelUtil(PartnerDetail.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ +// @PreAuthorize("@ss.hasPermi('system:detail:query')") + @GetMapping(value = "/{id}") + public CommonResult getInfo(@PathVariable("id") Long id) + { + return success(partnerDetailService.selectPartnerDetailById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @PostMapping("/add") + public CommonResult add(@RequestBody PartnerDetail partnerDetail) + { + return toAjax(partnerDetailService.insertPartnerDetail(partnerDetail)); + } + + /** + * 修改【请填写功能名称】 + */ +// @PreAuthorize("@ss.hasPermi('system:detail:edit')") + @PutMapping + public CommonResult edit(@RequestBody PartnerDetail partnerDetail) + { + return toAjax(partnerDetailService.updatePartnerDetail(partnerDetail)); + } + + /** + * 修改【审核接口】 + */ +// @PreAuthorize("@ss.hasPermi('system:detail:edit')") + @PostMapping("/examine") + public CommonResult examine(@RequestBody PartnerDetail partnerDetail) throws Exception { + partnerDetailService.examine(partnerDetail); + return success(); + } + + /** + * 删除【请填写功能名称】 + */ +// @PreAuthorize("@ss.hasPermi('system:detail:remove')") + @DeleteMapping("/{ids}") + public CommonResult remove(@PathVariable Long[] ids) + { + return toAjax(partnerDetailService.deletePartnerDetailByIds(ids)); + } +} diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/controller/ShopCouponTemplateController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/controller/ShopCouponTemplateController.java new file mode 100644 index 00000000..6af2a29d --- /dev/null +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/controller/ShopCouponTemplateController.java @@ -0,0 +1,93 @@ +package cn.iocoder.yudao.module.shop.controller; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.core.controller.BaseController; +import cn.iocoder.yudao.module.core.page.TableDataInfo; +import cn.iocoder.yudao.module.shop.entity.ShopCouponTemplate; +import cn.iocoder.yudao.module.shop.service.IShopCouponTemplateService; +import cn.iocoder.yudao.util.ExcelUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 优惠券模板Controller + * + * @author ruoyi + * @date 2023-08-29 + */ +@RestController +@RequestMapping("/admin-api/shop/couponTemplate") +public class ShopCouponTemplateController extends BaseController +{ + @Autowired + private IShopCouponTemplateService shopCouponTemplateService; + + /** + * 查询优惠券模板列表 + */ +// @PreAuthorize("@ss.hasPermi('shop:couponTemplate:list')") + @GetMapping("/list") + public TableDataInfo list(ShopCouponTemplate shopCouponTemplate,@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize) + { + Page page = new Page<>(pageNum, pageSize); + List list = shopCouponTemplateService.selectShopCouponTemplateList(page,shopCouponTemplate); + return getDataTable(list); + } + + /** + * 导出优惠券模板列表 + */ +// @PreAuthorize("@ss.hasPermi('shop:couponTemplate:export')") + @PostMapping("/export") + public void export(HttpServletResponse response, ShopCouponTemplate shopCouponTemplate) + { + Page page = new Page<>(); + List list = shopCouponTemplateService.selectShopCouponTemplateList(page,shopCouponTemplate); + ExcelUtil util = new ExcelUtil(ShopCouponTemplate.class); + util.exportExcel(response, list, "优惠券模板数据"); + } + + /** + * 获取优惠券模板详细信息 + */ +// @PreAuthorize("@ss.hasPermi('shop:couponTemplate:query')") + @GetMapping(value = "/{id}") + public CommonResult getInfo(@PathVariable("id") Long id) + { + return success(shopCouponTemplateService.selectShopCouponTemplateById(id)); + } + + /** + * 新增优惠券模板 + */ +// @PreAuthorize("@ss.hasPermi('shop:couponTemplate:add')") + @PostMapping + public CommonResult add(@RequestBody ShopCouponTemplate shopCouponTemplate) + { + return toAjax(shopCouponTemplateService.insertShopCouponTemplate(shopCouponTemplate)); + } + + /** + * 修改优惠券模板 + */ +// @PreAuthorize("@ss.hasPermi('shop:couponTemplate:edit')") + @PutMapping + public CommonResult edit(@RequestBody ShopCouponTemplate shopCouponTemplate) + { + return toAjax(shopCouponTemplateService.updateShopCouponTemplate(shopCouponTemplate)); + } + + /** + * 删除优惠券模板 + */ +// @PreAuthorize("@ss.hasPermi('shop:couponTemplate:remove')") + @DeleteMapping("/{ids}") + public CommonResult remove(@PathVariable Long[] ids) + { + return toAjax(shopCouponTemplateService.deleteShopCouponTemplateByIds(ids)); + } +} diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/PartnerDetailMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/PartnerDetailMapper.java index 5e72c57e..7d3b2108 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/PartnerDetailMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/PartnerDetailMapper.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.shop.mapper; import cn.iocoder.yudao.module.shop.entity.PartnerDetail; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -31,7 +32,7 @@ public interface PartnerDetailMapper * @param partnerDetail 【请填写功能名称】 * @return 【请填写功能名称】集合 */ - public List selectPartnerDetailList(PartnerDetail partnerDetail); + public List selectPartnerDetailList(Page page,@Param("vo") PartnerDetail partnerDetail); /** * 新增【请填写功能名称】 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/ShopCouponTemplateMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/ShopCouponTemplateMapper.java index 8cc4da96..65ff1c04 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/ShopCouponTemplateMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/ShopCouponTemplateMapper.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.shop.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.iocoder.yudao.module.shop.entity.ShopCouponTemplate; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -30,7 +31,7 @@ public interface ShopCouponTemplateMapper extends BaseMapper * @param shopCouponTemplate 优惠券模板 * @return 优惠券模板集合 */ - public List selectShopCouponTemplateList(ShopCouponTemplate shopCouponTemplate); + public List selectShopCouponTemplateList(Page page,@Param("vo") ShopCouponTemplate shopCouponTemplate); /** * 新增优惠券模板 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/ShopMallPartnersMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/ShopMallPartnersMapper.java index f469753c..029377fb 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/ShopMallPartnersMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/mapper/ShopMallPartnersMapper.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.shop.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -30,7 +31,7 @@ public interface ShopMallPartnersMapper extends BaseMapper * @param shopMallPartners 合作商管理 * @return 合作商管理集合 */ - public List selectShopMallPartnersList(ShopMallPartners shopMallPartners); + public List selectShopMallPartnersList(Page page, @Param("shop") ShopMallPartners shopMallPartners); /** * 新增合作商管理 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IPartnerDetailService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IPartnerDetailService.java index beb36241..c687e378 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IPartnerDetailService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IPartnerDetailService.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.shop.service; import cn.iocoder.yudao.module.shop.entity.PartnerDetail; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import java.util.List; @@ -28,7 +29,7 @@ public interface IPartnerDetailService * @param partnerDetail 【请填写功能名称】 * @return 【请填写功能名称】集合 */ - public List selectPartnerDetailList(PartnerDetail partnerDetail); + public List selectPartnerDetailList(Page page,PartnerDetail partnerDetail); /** * 新增【请填写功能名称】 @@ -60,4 +61,6 @@ public interface IPartnerDetailService * @return 结果 */ public int deletePartnerDetailById(Long id); + + public int examine(PartnerDetail partnerDetail) throws Exception; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IShopCouponTemplateService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IShopCouponTemplateService.java index 72ae2e59..c5dd7793 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IShopCouponTemplateService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IShopCouponTemplateService.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.shop.service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import cn.iocoder.yudao.module.shop.entity.ShopCouponTemplate; @@ -27,7 +28,7 @@ public interface IShopCouponTemplateService extends IService selectShopCouponTemplateList(ShopCouponTemplate shopCouponTemplate); + public List selectShopCouponTemplateList(Page page,ShopCouponTemplate shopCouponTemplate); /** * 新增优惠券模板 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IShopMallPartnersService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IShopMallPartnersService.java index e00ba32a..069d1c53 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IShopMallPartnersService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/IShopMallPartnersService.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.shop.service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; @@ -27,7 +28,7 @@ public interface IShopMallPartnersService extends IService * @param shopMallPartners 合作商管理 * @return 合作商管理集合 */ - public List selectShopMallPartnersList(ShopMallPartners shopMallPartners); + public List selectShopMallPartnersList(Page page, ShopMallPartners shopMallPartners); /** * 新增合作商管理 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/PartnerDetailServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/PartnerDetailServiceImpl.java index db404c69..0244d0f5 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/PartnerDetailServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/PartnerDetailServiceImpl.java @@ -1,7 +1,13 @@ package cn.iocoder.yudao.module.shop.service.impl; +import cn.iocoder.yudao.module.partner.entity.PartnerBalance; +import cn.iocoder.yudao.module.partner.entity.PartnerBankInfo; +import cn.iocoder.yudao.module.partner.entity.PartnerWorker; import cn.iocoder.yudao.module.partner.service.IPartnerBalanceService; import cn.iocoder.yudao.module.partner.service.IPartnerWorkerService; +import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; +import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; +import cn.iocoder.yudao.module.system.service.permission.PermissionService; import cn.iocoder.yudao.module.system.service.user.AdminUserService; import cn.iocoder.yudao.util.InspWechatPayConfig; import cn.iocoder.yudao.util.DateUtils; @@ -9,6 +15,8 @@ import cn.iocoder.yudao.module.shop.entity.PartnerDetail; import cn.iocoder.yudao.module.shop.mapper.PartnerDetailMapper; import cn.iocoder.yudao.module.shop.service.IPartnerDetailService; import cn.iocoder.yudao.module.shop.service.IShopMallPartnersService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.wechat.pay.java.core.Config; import com.wechat.pay.java.core.RSAAutoCertificateConfig; import com.wechat.pay.java.service.profitsharing.ProfitsharingService; @@ -20,8 +28,14 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.HashSet; import java.util.List; +import java.util.Set; + import com.ruoyi.partner.service.IPartnerBankInfoService; +import org.springframework.transaction.annotation.Transactional; + +import static cn.iocoder.yudao.util.AddressSplitter.splitAddress; /** @@ -47,6 +61,8 @@ public class PartnerDetailServiceImpl implements IPartnerDetailService private IPartnerBankInfoService partnerBankInfoService; @Resource private InspWechatPayConfig inspWechatPayConfig; + @Autowired + private PermissionService permissionService; /** * 查询【请填写功能名称】 @@ -73,9 +89,9 @@ public class PartnerDetailServiceImpl implements IPartnerDetailService * @return 【请填写功能名称】 */ @Override - public List selectPartnerDetailList(PartnerDetail partnerDetail) + public List selectPartnerDetailList(Page page,PartnerDetail partnerDetail) { - return partnerDetailMapper.selectPartnerDetailList(partnerDetail); + return partnerDetailMapper.selectPartnerDetailList(page,partnerDetail); } /** @@ -149,4 +165,66 @@ public class PartnerDetailServiceImpl implements IPartnerDetailService } + + //审核接口 + @Override + @Transactional(rollbackFor = Exception.class) + public int examine(PartnerDetail partnerDetail) throws Exception { + if (partnerDetail.getStatus().equals("2")){ + //开设店铺 + ShopMallPartners shopMallPartners =new ShopMallPartners(); + shopMallPartners.setUserId(partnerDetail.getUserId()); + shopMallPartners.setType(partnerDetail.getType()); + shopMallPartners.setAverageScore(4.5); + List strings = splitAddress(partnerDetail.getPosition()); + shopMallPartners.setProvince(strings.get(0)); + shopMallPartners.setCity(strings.get(1)); + shopMallPartners.setArea(strings.get(2)); + shopMallPartners.setIsWorking("0"); + shopMallPartners.setIsBanned("0"); + shopMallPartners.setContactNumber(partnerDetail.getPhone()); + shopMallPartners.setOpenComment("0"); + shopMallPartners.setPartnerName(partnerDetail.getPartnerName()); + partnersService.save(shopMallPartners); + partnerDetail.setPartnerId(shopMallPartners.getPartnerId()); + //审核通过 + partnerDetailMapper.updatePartnerDetail(partnerDetail); + AdminUserDO user = userService.getUser(partnerDetail.getUserId()); + Set role = new HashSet<>(); + role.add(113L); + permissionService.assignUserRole(user.getId(),role); + + //创建账户 + PartnerBalance partnerBalance =new PartnerBalance(); + partnerBalance.setPartnerId(shopMallPartners.getPartnerId()); + partnerBalance.setTotalRevenue(0L); + partnerBalance.setAmount(0L); + partnerBalance.setFrozenAmount(0L); + partnerBalance.setWithdrawAmount(0L); + partnerBalanceService.save(partnerBalance); + //将店主加入员工 + PartnerWorker partnerWorker =new PartnerWorker(); + partnerWorker.setUserId(user.getId()); + partnerWorker.setPartnerId(shopMallPartners.getPartnerId()); + partnerWorker.setAvatar(user.getAvatar()); + partnerWorker.setWorkName(user.getNickname()); + partnerWorker.setWorkPhone(user.getMobile()); + workerService.save(partnerWorker); + //添加平台为收帐放 + LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); + queryWrapper.eq(PartnerBankInfo::getPartnerId,shopMallPartners.getPartnerId()); + PartnerBankInfo bankInfo = partnerBankInfoService.getOne(queryWrapper); + try { + receiversAdd(inspWechatPayConfig.getAppId(), bankInfo.getMchId(),bankInfo.getApiclientKey(), + bankInfo.getSerialNo(),bankInfo.getApiV3Key()); + }catch (Exception e){ + throw new Exception("商户信息不正确,请联系管理员"); + } + + }else if (partnerDetail.getStatus().equals("3")){ + //拒绝通过 + partnerDetailMapper.updatePartnerDetail(partnerDetail); + } + return 0; + } } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/ShopCouponTemplateServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/ShopCouponTemplateServiceImpl.java index 7bc2e8d7..8fd74661 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/ShopCouponTemplateServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/ShopCouponTemplateServiceImpl.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.shop.service.impl; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.iocoder.yudao.util.DateUtils; import cn.iocoder.yudao.module.shop.entity.ShopCouponTemplate; @@ -39,9 +40,9 @@ public class ShopCouponTemplateServiceImpl extends ServiceImpl selectShopCouponTemplateList(ShopCouponTemplate shopCouponTemplate) + public List selectShopCouponTemplateList(Page page,ShopCouponTemplate shopCouponTemplate) { - return baseMapper.selectShopCouponTemplateList(shopCouponTemplate); + return baseMapper.selectShopCouponTemplateList(page,shopCouponTemplate); } /** diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/ShopMallPartnersServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/ShopMallPartnersServiceImpl.java index e5538422..d43bf18a 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/ShopMallPartnersServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/shop/service/impl/ShopMallPartnersServiceImpl.java @@ -7,6 +7,7 @@ import cn.iocoder.yudao.module.system.dal.dataobject.permission.UserRoleDO; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.dal.mysql.permission.UserRoleMapper; import cn.iocoder.yudao.module.system.service.user.AdminUserService; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.iocoder.yudao.module.partner.entity.PartnerWorker; import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; @@ -54,9 +55,10 @@ public class ShopMallPartnersServiceImpl extends ServiceImpl selectShopMallPartnersList(ShopMallPartners shopMallPartners) + public List selectShopMallPartnersList(Page page, ShopMallPartners shopMallPartners) { - return baseMapper.selectShopMallPartnersList(shopMallPartners); + + return baseMapper.selectShopMallPartnersList(page,shopMallPartners); } /** diff --git a/dl-module-inspection/src/main/resources/mapper/contract/ContractHistoryMapper.xml b/dl-module-inspection/src/main/resources/mapper/contract/ContractHistoryMapper.xml index 604c12cf..a7e69f5a 100644 --- a/dl-module-inspection/src/main/resources/mapper/contract/ContractHistoryMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/contract/ContractHistoryMapper.xml @@ -10,13 +10,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + - select id, user_id, contract_id, sign_contract, create_time, create_by, update_time, update_by from contract_history + select id, user_id, contract_id, sign_contract, create_time, creator, update_time, updater from contract_history @@ -44,9 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" position_json, order_num, create_time, - create_by, + creator, update_time, - update_by, + updater, #{id}, @@ -55,9 +55,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{positionJson}, #{orderNum}, #{createTime}, - #{createBy}, + #{creator}, #{updateTime}, - #{updateBy}, + #{updater}, @@ -69,9 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" position_json = #{positionJson}, order_num = #{orderNum}, create_time = #{createTime}, - create_by = #{createBy}, + creator = #{creator}, update_time = #{updateTime}, - update_by = #{updateBy}, + updater = #{updater}, where id = #{id} diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/DelInspectionInfoMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/DelInspectionInfoMapper.xml index 754c8fa1..9d18963a 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/DelInspectionInfoMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/DelInspectionInfoMapper.xml @@ -36,9 +36,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + @@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, inspection_order_id, user_id, user_name, buy_name, buy_phone, user_address, unit_name, partner_id, work_id, worker_name, worker_phone, worker_avatar, category_id, car_num, car_model, car_nature, car_status, car_id_no, is_pass, is_retrial, remark, customer_source, status, start_time, end_time, make_cert, year, month, day, create_time, create_by, update_time, update_by, next_maintenance_date, next_inspection_date, other_phone, driver_licenes_img, is_pay_online, is_pick_car from del_inspection_info + select id, inspection_order_id, user_id, user_name, buy_name, buy_phone, user_address, unit_name, partner_id, work_id, worker_name, worker_phone, worker_avatar, category_id, car_num, car_model, car_nature, car_status, car_id_no, is_pass, is_retrial, remark, customer_source, status, start_time, end_time, make_cert, year, month, day, create_time, creator, update_time, updater, next_maintenance_date, next_inspection_date, other_phone, driver_licenes_img, is_pay_online, is_pick_car from del_inspection_info @@ -155,10 +155,10 @@ partner_id, partner_name, create_time, - create_by, + creator, dept_id, update_time, - update_by, + updater, validation_time, validation_real_name, validation_user_id, @@ -210,10 +210,10 @@ #{partnerId}, #{partnerName}, #{createTime}, - #{createBy}, + #{creator}, #{deptId}, #{updateTime}, - #{updateBy}, + #{updater}, #{validationTime}, #{validationRealName}, #{validationUserId}, @@ -268,10 +268,10 @@ partner_id = #{partnerId}, partner_name = #{partnerName}, create_time = #{createTime}, - create_by = #{createBy}, + creator = #{creator}, dept_id = #{deptId}, update_time = #{updateTime}, - update_by = #{updateBy}, + updater = #{updater}, validation_time = #{validationTime}, validation_real_name = #{validationRealName}, validation_user_id = #{validationUserId}, diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionAppointmentMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionAppointmentMapper.xml index 75d55464..c0e3365b 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionAppointmentMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionAppointmentMapper.xml @@ -12,13 +12,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + - select id, partner_id, order_id, goods_title, appointment_day, appointment_period, create_time, create_by, update_time, update_by from inspection_appointment + select id, partner_id, order_id, goods_title, appointment_day, appointment_period, create_time, creator, update_time, updater from inspection_appointment @@ -41,8 +41,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sku_name, sku_price, create_time, - create_by, - update_by, + creator, + updater, update_time, @@ -51,8 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{skuName}, #{skuPrice}, #{createTime}, - #{createBy}, - #{updateBy}, + #{creator}, + #{updater}, #{updateTime}, @@ -64,8 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sku_name = #{skuName}, sku_price = #{skuPrice}, create_time = #{createTime}, - create_by = #{createBy}, - update_by = #{updateBy}, + creator = #{creator}, + updater = #{updater}, update_time = #{updateTime}, where id = #{id} @@ -81,4 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{id} + + delete from inspection_category_template where category_id = #{id} + diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionHomeGoodsMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionHomeGoodsMapper.xml index ff3b5eb0..da281d38 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionHomeGoodsMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionHomeGoodsMapper.xml @@ -28,9 +28,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order_num, reason, create_time, - create_by, + creator, update_time, - update_by, + updater, #{id}, @@ -38,9 +38,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{orderNum}, #{reason}, #{createTime}, - #{createBy}, + #{creator}, #{updateTime}, - #{updateBy}, + #{updater}, @@ -51,9 +51,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order_num = #{orderNum}, reason = #{reason}, create_time = #{createTime}, - create_by = #{createBy}, + creator = #{creator}, update_time = #{updateTime}, - update_by = #{updateBy}, + updater = #{updater}, where id = #{id} diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml index fc365dc4..04c5c46a 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionInfoMapper.xml @@ -18,13 +18,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + - select id, inspection_order_id, work_id, worker_name, worker_phone, is_pass, status, start_time, end_time, year, month, day, create_time, create_by, update_time, update_by from inspection_info + select id, inspection_order_id, work_id, worker_name, worker_phone, is_pass, status, start_time, end_time, year, month, day, create_time, creator, update_time, updater from inspection_info @@ -40,18 +40,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" news_id, type, create_time, - create_by, + creator, update_time, - update_by, + updater, #{userId}, #{newsId}, #{type}, #{createTime}, - #{createBy}, + #{creator}, #{updateTime}, - #{updateBy}, + #{updater}, @@ -62,9 +62,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" news_id = #{newsId}, type = #{type}, create_time = #{createTime}, - create_by = #{createBy}, + creator = #{creator}, update_time = #{updateTime}, - update_by = #{updateBy}, + updater = #{updater}, where id = #{id} diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionNewsCommentMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionNewsCommentMapper.xml index 25e18cad..07d3bbe4 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionNewsCommentMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionNewsCommentMapper.xml @@ -11,13 +11,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + - select id, news_id, context, real_name, user_avatar, create_time, create_by, update_time, update_by from inspection_news_comment + select id, news_id, context, real_name, user_avatar, create_time, creator, update_time, updater from inspection_news_comment - and category = #{category} - and news_title = #{newsTitle} - and news_cover = #{newsCover} - and publish_unit = #{publishUnit} - and news_content = #{newsContent} - and type = #{type} - and order_num = #{orderNum} - and read_num = #{readNum} - and like_num = #{likeNum} - and collect_num = #{collectNum} - and creator = #{creator} + and category = #{vo.category} + and news_title = #{vo.newsTitle} + and news_cover = #{vo.newsCover} + and publish_unit = #{vo.publishUnit} + and news_content = #{vo.newsContent} + and type = #{vo.type} + and order_num = #{vo.orderNum} + and read_num = #{vo.readNum} + and like_num = #{vo.likeNum} + and collect_num = #{vo.collectNum} + and creator = #{vo.creator} order by create_time desc @@ -52,9 +52,9 @@ like_num, collect_num, create_time, - create_by, + creator, update_time, - update_by, + updater, #{id}, @@ -70,9 +70,9 @@ #{likeNum}, #{collectNum}, #{createTime}, - #{createBy}, + #{creator}, #{updateTime}, - #{updateBy}, + #{updater}, @@ -91,9 +91,9 @@ like_num = #{likeNum}, collect_num = #{collectNum}, create_time = #{createTime}, - create_by = #{createBy}, + creator = #{creator}, update_time = #{updateTime}, - update_by = #{updateBy}, + updater = #{updater}, where id = #{id} @@ -113,9 +113,9 @@ like_num = like_num +1, collect_num = collect_num +1, create_time = #{createTime}, - create_by = #{createBy}, + creator = #{creator}, update_time = #{updateTime}, - update_by = #{updateBy}, + updater = #{updater}, where id = #{id} diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionPickCarMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionPickCarMapper.xml index 6a76274b..7d346106 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/InspectionPickCarMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/InspectionPickCarMapper.xml @@ -19,13 +19,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + - select id, partner_id, goods_title, user_id, order_id, user_phone, longitude, latitude, adress_detail, appointment_day, appointment_time, distance, need_price, create_time, create_by, update_time, update_by from inspection_pick_car + select id, partner_id, goods_title, user_id, order_id, user_phone, longitude, latitude, adress_detail, appointment_day, appointment_time, distance, need_price, create_time, creator, update_time, updater from inspection_pick_car - and title = #{title} - and discount = #{discount} - and effective_day = #{effectiveDay} - and start_time = #{startTime} - and expiration_time = #{expirationTime} - and events_start_time = #{eventsStartTime} - and events_end_time = #{eventsEndTime} + and title = #{vo.title} + and discount = #{vo.discount} + and effective_day = #{vo.effectiveDay} + and start_time = #{vo.startTime} + and expiration_time = #{vo.expirationTime} + and events_start_time = #{vo.eventsStartTime} + and events_end_time = #{vo.eventsEndTime} @@ -75,9 +75,9 @@ events_start_time, events_end_time, role_key, - create_by, + creator, create_time, - update_by, + updater, update_time, @@ -96,9 +96,9 @@ #{eventsStartTime}, #{eventsEndTime}, #{roleKey}, - #{createBy}, + #{creator}, #{createTime}, - #{updateBy}, + #{updater}, #{updateTime}, @@ -120,9 +120,9 @@ events_start_time = #{eventsStartTime}, events_end_time = #{eventsEndTime}, role_key = #{roleKey}, - create_by = #{createBy}, + creator = #{creator}, create_time = #{createTime}, - update_by = #{updateBy}, + updater = #{updater}, update_time = #{updateTime}, where id = #{id} diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/ShopInspectionGoodsMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/ShopInspectionGoodsMapper.xml index 7151a7f1..dcdf7e32 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/ShopInspectionGoodsMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/ShopInspectionGoodsMapper.xml @@ -3,6 +3,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + delete from shop_inspection_goods where id in + + #{item} + + diff --git a/dl-module-inspection/src/main/resources/mapper/inspection/SiteInfoMapper.xml b/dl-module-inspection/src/main/resources/mapper/inspection/SiteInfoMapper.xml index d6c78799..7816aba6 100644 --- a/dl-module-inspection/src/main/resources/mapper/inspection/SiteInfoMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/inspection/SiteInfoMapper.xml @@ -14,28 +14,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + - select id, site_name, site_longitude, site_latitude, site_address, site_contract_name, site_contract_phone, order_num, create_time, create_by, update_time, update_by from site_info + select id, site_name, site_longitude, site_latitude, site_address, site_contract_name, site_contract_phone, order_num, create_time, creator, update_time, updater from site_info @@ -57,9 +57,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" site_contract_phone, order_num, create_time, - create_by, + creator, update_time, - update_by, + updater, #{id}, @@ -71,9 +71,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{siteContractPhone}, #{orderNum}, #{createTime}, - #{createBy}, + #{creator}, #{updateTime}, - #{updateBy}, + #{updater}, @@ -88,9 +88,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" site_contract_phone = #{siteContractPhone}, order_num = #{orderNum}, create_time = #{createTime}, - create_by = #{createBy}, + creator = #{creator}, update_time = #{updateTime}, - update_by = #{updateBy}, + updater = #{updater}, where id = #{id} diff --git a/dl-module-inspection/src/main/resources/mapper/payment/FzRecordMapper.xml b/dl-module-inspection/src/main/resources/mapper/payment/FzRecordMapper.xml new file mode 100644 index 00000000..57ea57c1 --- /dev/null +++ b/dl-module-inspection/src/main/resources/mapper/payment/FzRecordMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + diff --git a/dl-module-inspection/src/main/resources/mapper/payment/OrderInfoDetailMapper.xml b/dl-module-inspection/src/main/resources/mapper/payment/OrderInfoDetailMapper.xml index 7a072c69..83476524 100644 --- a/dl-module-inspection/src/main/resources/mapper/payment/OrderInfoDetailMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/payment/OrderInfoDetailMapper.xml @@ -13,13 +13,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + - select id, order_id, detail_info, record_time, record_money, record_type, dept_id, create_time, create_by, update_time, update_by from order_info_detail + select id, order_id, detail_info, record_time, record_money, record_type, dept_id, create_time, creator, update_time, updater from order_info_detail - and user_id = #{userId} - and type = #{type} - and partner_id = #{partnerId} - and partner_name like concat('%', #{partnerName}, '%') - and business_license = #{businessLicense} - and shop_image = #{shopImage} - and position = #{position} - and phone = #{phone} - and id_card_front = #{idCardFront} - and id_card_back = #{idCardBack} - and status = #{status} + and user_id = #{vo.userId} + and type = #{vo.type} + and partner_id = #{vo.partnerId} + and partner_name like concat('%', #{vo.partnerName}, '%') + and business_license = #{vo.businessLicense} + and shop_image = #{vo.shopImage} + and position = #{vo.position} + and phone = #{vo.phone} + and id_card_front = #{vo.idCardFront} + and id_card_back = #{vo.idCardBack} + and status = #{vo.status} @@ -70,9 +70,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" id_card_back, status, create_time, - create_by, + creator, update_time, - update_by, + updater, #{id}, @@ -88,9 +88,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{idCardBack}, #{status}, #{createTime}, - #{createBy}, + #{creator}, #{updateTime}, - #{updateBy}, + #{updater}, @@ -110,9 +110,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" status = #{status}, reject_reason = #{rejectReason}, create_time = #{createTime}, - create_by = #{createBy}, + creator = #{creator}, update_time = #{updateTime}, - update_by = #{updateBy}, + updater = #{updater}, where id = #{id} diff --git a/dl-module-inspection/src/main/resources/mapper/shop/ShopCouponMapper.xml b/dl-module-inspection/src/main/resources/mapper/shop/ShopCouponMapper.xml index 9bd0932a..bad813f4 100644 --- a/dl-module-inspection/src/main/resources/mapper/shop/ShopCouponMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/shop/ShopCouponMapper.xml @@ -15,9 +15,9 @@ - + - + @@ -28,7 +28,7 @@ select coupon_id,title, coupon_type, coupon_code, bind_moudle, bind_goods_ids, discount, start_time, - expiration_time, use_time, coupon_status, shop_coupon.create_by, shop_coupon.create_time, shop_coupon.update_by, + expiration_time, use_time, coupon_status, shop_coupon.creator, shop_coupon.create_time, shop_coupon.updater, shop_coupon.update_time,shop_coupon.user_id,order_id,shop_coupon.phonenumber,sys_user.real_name from shop_coupon LEFT JOIN sys_user on shop_coupon.user_id = sys_user.user_id @@ -151,9 +151,9 @@ expiration_time, use_time, coupon_status, - create_by, + creator, create_time, - update_by, + updater, update_time, title, user_id, @@ -171,9 +171,9 @@ #{expirationTime}, #{useTime}, #{couponStatus}, - #{createBy}, + #{creator}, #{createTime}, - #{updateBy}, + #{updater}, #{updateTime}, #{title}, #{userId}, @@ -194,9 +194,9 @@ expiration_time = #{expirationTime}, use_time = #{useTime}, coupon_status = #{couponStatus}, - create_by = #{createBy}, + creator = #{creator}, create_time = #{createTime}, - update_by = #{updateBy}, + updater = #{updater}, update_time = #{updateTime}, title = #{title}, user_id = #{userId}, @@ -210,7 +210,7 @@ use_time = null, coupon_status = #{couponStatus}, - update_by = #{updateBy}, + updater = #{updater}, update_time = #{updateTime}, order_id = null diff --git a/dl-module-inspection/src/main/resources/mapper/shop/ShopMallPartnersMapper.xml b/dl-module-inspection/src/main/resources/mapper/shop/ShopMallPartnersMapper.xml index 9ab9e7f8..f96ad6ac 100644 --- a/dl-module-inspection/src/main/resources/mapper/shop/ShopMallPartnersMapper.xml +++ b/dl-module-inspection/src/main/resources/mapper/shop/ShopMallPartnersMapper.xml @@ -27,9 +27,9 @@ - + - + @@ -55,40 +55,17 @@ is_working, order_num, create_time, - create_by, + creator, update_time, - update_by + updater from shop_mall_partners @@ -132,9 +109,9 @@ is_banned, is_working, create_time, - create_by, + creator, update_time, - update_by, + updater, #{userId}, @@ -158,9 +135,9 @@ #{isBanned}, #{isWorking}, #{createTime}, - #{createBy}, + #{creator}, #{updateTime}, - #{updateBy}, + #{updater}, @@ -188,9 +165,9 @@ is_banned=#{isBanned}, is_working=#{isWorking}, create_time = #{createTime}, - create_by = #{createBy}, + creator = #{creator}, update_time = #{updateTime}, - update_by = #{updateBy}, + updater = #{updater}, where partner_id = #{partnerId} diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/appBase/service/impl/SysAnnouncementServiceImpl.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/appBase/service/impl/SysAnnouncementServiceImpl.java index 5a73c3ee..39e5882b 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/appBase/service/impl/SysAnnouncementServiceImpl.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/appBase/service/impl/SysAnnouncementServiceImpl.java @@ -76,6 +76,7 @@ public class SysAnnouncementServiceImpl extends ServiceImpl sessionMap = new ConcurrentHashMap<>(); //关键代码,设置一个静态上下文属性appcontext private static ApplicationContext appcontext; + + public RescueDriverSocket(SpringUtil springUtil) { + + } + public static void setAppcontext(ApplicationContext appcontext) { RescueDriverSocket.appcontext = appcontext; } @@ -44,7 +50,7 @@ public class RescueDriverSocket { public void onOpen(Session session, @PathParam(value = "driverId") String driverId) { this.sessionMap.put(driverId,session); //更新司机在线状态 - IRescueDriverInfoService rescueDriverInfoService = appcontext.getBean(IRescueDriverInfoService.class); + IRescueDriverInfoService rescueDriverInfoService = SpringUtil.getBean(IRescueDriverInfoService.class); rescueDriverInfoService.topLine(Long.parseLong(driverId)); log.info("用户{}已创建连接", driverId); } @@ -64,7 +70,7 @@ public class RescueDriverSocket { public void onMessage(String msg,@PathParam(value = "driverId") String driverId){ JSONObject requestMsg = JSONObject.parseObject(msg); //更新司机位置信息 - IRescueDriverInfoService rescueDriverInfoService = appcontext.getBean(IRescueDriverInfoService.class); + IRescueDriverInfoService rescueDriverInfoService = SpringUtil.getBean(IRescueDriverInfoService.class); rescueDriverInfoService.updatePosition(Long.parseLong(driverId),requestMsg); log.info("用户{}发来消息:{}",driverId,msg); } @@ -79,7 +85,7 @@ public class RescueDriverSocket { public void onClose(Session session,@PathParam(value = "driverId") String driverId){ this.sessionMap.remove(driverId); //更新司机在线状态 - IRescueDriverInfoService rescueDriverInfoService = appcontext.getBean(IRescueDriverInfoService.class); + IRescueDriverInfoService rescueDriverInfoService = SpringUtil.getBean(IRescueDriverInfoService.class); rescueDriverInfoService.downLine(Long.parseLong(driverId)); log.info("用户{}已关闭连接", driverId); diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueDriverInfoServiceImpl.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueDriverInfoServiceImpl.java index 2dd5f836..8a1e3b7b 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueDriverInfoServiceImpl.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueDriverInfoServiceImpl.java @@ -410,7 +410,7 @@ public class RescueDriverInfoServiceImpl extends ServiceImpldriver_accept, driver_reject_reason, create_time, - creator, + creator, update_time, - updater, + updater, #{id}, @@ -55,9 +55,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{driverAccept}, #{driverRejectReason}, #{createTime}, - #{createBy}, + #{creator}, #{updateTime}, - #{updateBy}, + #{updater}, @@ -69,9 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" driver_accept = #{driverAccept}, driver_reject_reason = #{driverRejectReason}, create_time = #{createTime}, - creator = #{createBy}, + creator = #{creator}, update_time = #{updateTime}, - updater = #{updateBy}, + updater = #{updater}, where id = #{id} diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 048d7049..4f823ba4 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -26,7 +26,7 @@ 1.2.23 3.5.16 3.5.7 - 1.4.2 + 2.1.0 4.9 3.5.7 4.3.1 @@ -140,11 +140,11 @@ ${revision} - - cn.iocoder.boot - yudao-spring-boot-starter-websocket - ${revision} - + + + + + com.github.xiaoymin diff --git a/yudao-framework/pom.xml b/yudao-framework/pom.xml index 76e67409..ea1d5aed 100644 --- a/yudao-framework/pom.xml +++ b/yudao-framework/pom.xml @@ -15,7 +15,7 @@ yudao-spring-boot-starter-redis yudao-spring-boot-starter-web yudao-spring-boot-starter-security - yudao-spring-boot-starter-websocket + yudao-spring-boot-starter-monitor yudao-spring-boot-starter-protection diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml b/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml index 4aa2e7ba..a01fd38f 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/pom.xml @@ -71,6 +71,17 @@ com.github.pagehelper pagehelper-spring-boot-starter + 2.1.0 + + + mybatis-spring + org.mybatis + + + mybatis + org.mybatis + + com.baomidou diff --git a/yudao-module-infra/yudao-module-infra-biz/pom.xml b/yudao-module-infra/yudao-module-infra-biz/pom.xml index f2840cfc..a12f078a 100644 --- a/yudao-module-infra/yudao-module-infra-biz/pom.xml +++ b/yudao-module-infra/yudao-module-infra-biz/pom.xml @@ -42,10 +42,10 @@ yudao-spring-boot-starter-security - - cn.iocoder.boot - yudao-spring-boot-starter-websocket - + + + + diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/api/websocket/WebSocketSenderApiImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/api/websocket/WebSocketSenderApiImpl.java index 046cd2fc..93d7b82f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/api/websocket/WebSocketSenderApiImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/api/websocket/WebSocketSenderApiImpl.java @@ -1,34 +1,34 @@ -package cn.iocoder.yudao.module.infra.api.websocket; - -import cn.iocoder.yudao.framework.websocket.core.sender.WebSocketMessageSender; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; - -/** - * WebSocket 发送器的 API 实现类 - * - * @author 芋道源码 - */ -@Component -public class WebSocketSenderApiImpl implements WebSocketSenderApi { - - @Resource - private WebSocketMessageSender webSocketMessageSender; - - @Override - public void send(Integer userType, Long userId, String messageType, String messageContent) { - webSocketMessageSender.send(userType, userId, messageType, messageContent); - } - - @Override - public void send(Integer userType, String messageType, String messageContent) { - webSocketMessageSender.send(userType, messageType, messageContent); - } - - @Override - public void send(String sessionId, String messageType, String messageContent) { - webSocketMessageSender.send(sessionId, messageType, messageContent); - } - -} +//package cn.iocoder.yudao.module.infra.api.websocket; +// +//import cn.iocoder.yudao.framework.websocket.core.sender.WebSocketMessageSender; +//import org.springframework.stereotype.Component; +// +//import javax.annotation.Resource; +// +///** +// * WebSocket 发送器的 API 实现类 +// * +// * @author 芋道源码 +// */ +//@Component +//public class WebSocketSenderApiImpl implements WebSocketSenderApi { +// +// @Resource +// private WebSocketMessageSender webSocketMessageSender; +// +// @Override +// public void send(Integer userType, Long userId, String messageType, String messageContent) { +// webSocketMessageSender.send(userType, userId, messageType, messageContent); +// } +// +// @Override +// public void send(Integer userType, String messageType, String messageContent) { +// webSocketMessageSender.send(userType, messageType, messageContent); +// } +// +// @Override +// public void send(String sessionId, String messageType, String messageContent) { +// webSocketMessageSender.send(sessionId, messageType, messageContent); +// } +// +//} diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/websocket/DemoWebSocketMessageListener.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/websocket/DemoWebSocketMessageListener.java index 9ccf6070..3c7abe33 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/websocket/DemoWebSocketMessageListener.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/websocket/DemoWebSocketMessageListener.java @@ -1,48 +1,48 @@ -package cn.iocoder.yudao.module.infra.websocket; - -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; -import cn.iocoder.yudao.framework.websocket.core.listener.WebSocketMessageListener; -import cn.iocoder.yudao.framework.websocket.core.sender.WebSocketMessageSender; -import cn.iocoder.yudao.framework.websocket.core.util.WebSocketFrameworkUtils; -import cn.iocoder.yudao.module.infra.websocket.message.DemoReceiveMessage; -import cn.iocoder.yudao.module.infra.websocket.message.DemoSendMessage; -import org.springframework.stereotype.Component; -import org.springframework.web.socket.WebSocketSession; - -import javax.annotation.Resource; - -/** - * WebSocket 示例:单发消息 - * - * @author 芋道源码 - */ -@Component -public class DemoWebSocketMessageListener implements WebSocketMessageListener { - - @Resource - private WebSocketMessageSender webSocketMessageSender; - - @Override - public void onMessage(WebSocketSession session, DemoSendMessage message) { - Long fromUserId = WebSocketFrameworkUtils.getLoginUserId(session); - // 情况一:单发 - if (message.getToUserId() != null) { - DemoReceiveMessage toMessage = new DemoReceiveMessage().setFromUserId(fromUserId) - .setText(message.getText()).setSingle(true); - webSocketMessageSender.sendObject(UserTypeEnum.ADMIN.getValue(), message.getToUserId(), // 给指定用户 - "demo-message-receive", toMessage); - return; - } - // 情况二:群发 - DemoReceiveMessage toMessage = new DemoReceiveMessage().setFromUserId(fromUserId) - .setText(message.getText()).setSingle(false); - webSocketMessageSender.sendObject(UserTypeEnum.ADMIN.getValue(), // 给所有用户 - "demo-message-receive", toMessage); - } - - @Override - public String getType() { - return "demo-message-send"; - } - -} +//package cn.iocoder.yudao.module.infra.websocket; +// +//import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; +//import cn.iocoder.yudao.framework.websocket.core.listener.WebSocketMessageListener; +//import cn.iocoder.yudao.framework.websocket.core.sender.WebSocketMessageSender; +//import cn.iocoder.yudao.framework.websocket.core.util.WebSocketFrameworkUtils; +//import cn.iocoder.yudao.module.infra.websocket.message.DemoReceiveMessage; +//import cn.iocoder.yudao.module.infra.websocket.message.DemoSendMessage; +//import org.springframework.stereotype.Component; +//import org.springframework.web.socket.WebSocketSession; +// +//import javax.annotation.Resource; +// +///** +// * WebSocket 示例:单发消息 +// * +// * @author 芋道源码 +// */ +//@Component +//public class DemoWebSocketMessageListener implements WebSocketMessageListener { +// +// @Resource +// private WebSocketMessageSender webSocketMessageSender; +// +// @Override +// public void onMessage(WebSocketSession session, DemoSendMessage message) { +// Long fromUserId = WebSocketFrameworkUtils.getLoginUserId(session); +// // 情况一:单发 +// if (message.getToUserId() != null) { +// DemoReceiveMessage toMessage = new DemoReceiveMessage().setFromUserId(fromUserId) +// .setText(message.getText()).setSingle(true); +// webSocketMessageSender.sendObject(UserTypeEnum.ADMIN.getValue(), message.getToUserId(), // 给指定用户 +// "demo-message-receive", toMessage); +// return; +// } +// // 情况二:群发 +// DemoReceiveMessage toMessage = new DemoReceiveMessage().setFromUserId(fromUserId) +// .setText(message.getText()).setSingle(false); +// webSocketMessageSender.sendObject(UserTypeEnum.ADMIN.getValue(), // 给所有用户 +// "demo-message-receive", toMessage); +// } +// +// @Override +// public String getType() { +// return "demo-message-send"; +// } +// +//} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/NoticeController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/NoticeController.java index 138f2d9a..e870da01 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/NoticeController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notice/NoticeController.java @@ -32,8 +32,8 @@ public class NoticeController { @Resource private NoticeService noticeService; - @Resource - private WebSocketSenderApi webSocketSenderApi; +// @Resource +// private WebSocketSenderApi webSocketSenderApi; @PostMapping("/create") @Operation(summary = "创建通知公告") @@ -85,7 +85,7 @@ public class NoticeController { NoticeDO notice = noticeService.getNotice(id); Assert.notNull(notice, "公告不能为空"); // 通过 websocket 推送给在线的用户 - webSocketSenderApi.sendObject(UserTypeEnum.ADMIN.getValue(), "notice-push", notice); +// webSocketSenderApi.sendObject(UserTypeEnum.ADMIN.getValue(), "notice-push", notice); return success(true); } diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index cc75032d..c3253938 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -221,6 +221,7 @@ yudao: permit-all_urls: - /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,不需要登录 - /admin-api/system/config/configKey/** + - /websocket/** websocket: enable: true # websocket的开关 path: /infra/ws # 路径