From ade57fd7eb5b36d183aaee643c109c17a635f3ab Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Wed, 5 Mar 2025 10:18:39 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 675c91c4aae2d8e5b87310a620a9e09d97e28ef9. --- .../controller/CustOrgController.java | 119 ------------------ .../core/customer/mapper/CustInfoMapper.java | 4 - .../po/CustomerNumByOrgIdMapperPO.java | 23 ---- .../service/impl/CustInfoServiceImpl.java | 4 +- .../mapper/customer/CustInfoMapper.xml | 18 --- 5 files changed, 1 insertion(+), 167 deletions(-) delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/controller/CustOrgController.java delete mode 100644 bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/po/CustomerNumByOrgIdMapperPO.java diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/controller/CustOrgController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/controller/CustOrgController.java deleted file mode 100644 index 4a2fe512..00000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/controller/CustOrgController.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.bonus.canteen.core.customer.controller; - -import cn.hutool.core.lang.tree.Tree; -import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.bonus.canteen.core.common.base.BaseController; -import com.bonus.canteen.core.customer.dto.CustOrgPageDTO; -import com.bonus.canteen.core.customer.service.CustOrgService; -import com.bonus.canteen.core.customer.vo.CustOrgVO; -import com.bonus.common.houqin.utils.AesEncryptUtil; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Lazy; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -@RestController -@RequestMapping({"/custOrg"}) -@Api("customer-组织机构(部门)控制器") -public class CustOrgController extends BaseController { - private static final Logger log = LoggerFactory.getLogger(CustOrgController.class); - @Autowired - @Lazy - private CustOrgService custOrgService; - @Autowired - @Lazy - private AesEncryptUtil aesEncryptUtil; - - @ApiOperation("分页查询组织") - @PostMapping({"/queryPageCustOrg"}) - public Page queryPageCustOrg(@RequestBody CustOrgPageDTO content) { - Page custOrgVOPage = this.custOrgService.pageCustOrgByParams(new Page(content.getCurrent(), content.getSize()), content); - Iterator var4 = custOrgVOPage.getRecords().iterator(); - - while(var4.hasNext()) { - CustOrgVO custOrgVO = (CustOrgVO)var4.next(); - custOrgVO.setOrgTel(this.aesEncryptUtil.aesEncrypt(custOrgVO.getOrgTel())); - } - - return custOrgVOPage; - } - - -// @RequiresGuest -// @ApiOperation("根据id查询组织") -// @GetMapping({"/queryCustOrgById"}) -// public CustOrg queryCustOrgById(LeRequest request) { -// Map contentMap = (Map)this.gson.fromJson((String)request.getContent(), Map.class); -// return this.custOrgService.getCustOrg(((JSONObject)contentMap.get("object")).getLong("id")); -// } -// -// @RequiresPermissions({"cust:org:add"}) -// @RequiresAuthentication -// @ApiOperation("新增") -// @PostMapping({"/addCustOrg"}) -// public void addCustOrg(@Validated({ValidationGroups.Insert.class}) @RequestBody LeRequest request) { -// CustOrg content = (CustOrg)request.getContent(); -// content.setOrgTel(this.aesEncryptUtil.aesDecode(content.getOrgTel())); -// this.custOrgService.addCustOrg(content); -// } -// -// @RequiresPermissions({"cust:org:edit"}) -// @ApiOperation("根据id修改") -// @PutMapping({"/updateCustOrgById"}) -// @RequiresAuthentication -// public void updateCustOrgById(@Validated({ValidationGroups.Update.class}) @RequestBody LeRequest request) { -// CustOrg content = (CustOrg)request.getContent(); -// content.setOrgTel(this.aesEncryptUtil.aesDecode(content.getOrgTel())); -// this.custOrgService.updateOrg(content); -// } -// -// @RequiresPermissions({"cust:org:del"}) -// @ApiOperation("根据组织id删除") -// @DeleteMapping({"/deleteCustOrgByOrgId"}) -// @RequiresAuthentication -// public void deleteCustOrgByOrgId(@Validated({ValidationGroups.Delete.class}) @RequestBody LeRequest request) { -// this.custOrgService.deleteByOrdId(((CustOrg)request.getContent()).getOrgId()); -// } -// -// @ApiOperation("系统组织树") -// @GetMapping({"/system/tree"}) -// @RequiresGuest -// public List> getSystemOrgTree() { -// return this.custOrgService.getSystemOrgTree(); -// } -// -// @ApiOperation("商户权限组织树") -// @GetMapping({"/tenant/tree"}) -// @RequiresAuthentication -// public List> getTenantOrgTree() { -// return this.custOrgService.getTenantOrgTree(); -// } -// -// @ApiOperation("查询组织下默认就餐地") -// @GetMapping({"/query/diningPlace"}) -// @RequiresGuest -// @RequiresAuthentication -// public JsonNode queryDiningPlace(@RequestParam("orgId") Long orgId) { -// return this.custOrgService.queryDiningPlaceByOrgId(orgId); -// } -// -// @ApiOperation("根据superId查询懒加载子级组织树") -// @PostMapping({"/lazy/org/tree"}) -// public List getPlaceLazyTree(@RequestBody LeRequest request) { -// return this.custOrgService.getOrgLazyTree((CustOrgTreeDTO)request.getContent()); -// } -// -// @ApiOperation("组织树同层级拖动排序") -// @PostMapping({"/dragOrgSort"}) -// public void dragOrgSort(@RequestBody LeRequest request) { -// this.custOrgService.dragOrgSort((CustOrgTreeDTO)request.getContent()); -// } -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/mapper/CustInfoMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/mapper/CustInfoMapper.java index 6c1022cf..e1ec7d6f 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/mapper/CustInfoMapper.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/mapper/CustInfoMapper.java @@ -7,7 +7,6 @@ import com.bonus.canteen.core.customer.dto.CustInfoDTO; import com.bonus.canteen.core.customer.dto.CustInfoParam; import com.bonus.canteen.core.customer.dto.CustPayDTO; import com.bonus.canteen.core.customer.model.CustInfo; -import com.bonus.canteen.core.customer.po.CustomerNumByOrgIdMapperPO; import com.bonus.canteen.core.customer.vo.CustInfoForRechargeVO; import com.bonus.canteen.core.customer.vo.CustInfoVo; import com.bonus.canteen.core.customer.vo.CustPayVO; @@ -18,7 +17,6 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; -import java.util.Collection; import java.util.List; @Mapper @@ -68,6 +66,4 @@ public interface CustInfoMapper extends BaseMapper { permissionType = DataPermissionTypeEnum.PERMISSION_ORG ) List pageCustInfoPhoto(@Param("infoParam") CustInfoParam infoParam); - - List getCustomerNumByOrgIdList(@Param("orgIdList") Collection orgIdList); } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/po/CustomerNumByOrgIdMapperPO.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/po/CustomerNumByOrgIdMapperPO.java deleted file mode 100644 index a90cad5e..00000000 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/po/CustomerNumByOrgIdMapperPO.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.bonus.canteen.core.customer.po; - -public class CustomerNumByOrgIdMapperPO { - private Long orgId; - private Integer customerNum; - - public Long getOrgId() { - return this.orgId; - } - - public Integer getCustomerNum() { - return this.customerNum; - } - - public void setOrgId(final Long orgId) { - this.orgId = orgId; - } - - public void setCustomerNum(final Integer customerNum) { - this.customerNum = customerNum; - } - -} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/service/impl/CustInfoServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/service/impl/CustInfoServiceImpl.java index e631f7f1..85426251 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/service/impl/CustInfoServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/customer/service/impl/CustInfoServiceImpl.java @@ -13,7 +13,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.bonus.canteen.core.customer.constants.*; -import com.bonus.canteen.core.customer.po.CustomerNumByOrgIdMapperPO; import com.bonus.canteen.core.customer.vo.PageCustInfoPhotoVO; import com.bonus.common.core.constant.CacheConstants; import com.bonus.common.core.exception.ServiceException; @@ -467,8 +466,7 @@ public class CustInfoServiceImpl extends ServiceImpl i @Override public Map getCustomerNumBelongOrg() { - List customerNumByOrgIdList = ((CustInfoMapper)this.baseMapper).getCustomerNumByOrgIdList((Collection)null); - return (Map)(CollUtil.isEmpty(customerNumByOrgIdList) ? new HashMap() : (Map)customerNumByOrgIdList.stream().collect(Collectors.toMap(CustomerNumByOrgIdMapperPO::getOrgId, CustomerNumByOrgIdMapperPO::getCustomerNum))); + return null; } @Override diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustInfoMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustInfoMapper.xml index a7ea5ed6..fd495a6e 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustInfoMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/customer/CustInfoMapper.xml @@ -246,24 +246,6 @@ where casual_id = #{casualId} - -