Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -19,7 +19,7 @@
|
||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||
|
||||
<properties>
|
||||
<revision>3.0.41</revision>
|
||||
<revision>3.0.42</revision>
|
||||
<!-- Maven 相关 -->
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.zt.plat.module.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
||||
import com.zt.plat.module.base.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - base")
|
||||
public interface BaseApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/base";
|
||||
|
||||
@GetMapping(PREFIX + "/getNoPage")
|
||||
@Operation(summary = "数据查询")
|
||||
List<AccountRespDto> getNoPage(@Valid AccountRespDto respVO);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zt.plat.module.api.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "RPC 服务 DTO")
|
||||
@Data
|
||||
public class AccountRespDto {
|
||||
private Long id;
|
||||
|
||||
private String type;
|
||||
|
||||
private String accountName;
|
||||
|
||||
private String bankAccount;
|
||||
|
||||
private String accountNumber;
|
||||
|
||||
private String taxNumber;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private String isEnable;
|
||||
|
||||
private String customerNumber;
|
||||
|
||||
private String customerName;
|
||||
|
||||
private String address;
|
||||
|
||||
private String phone;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.zt.plat.module.base.enums;
|
||||
|
||||
import com.zt.plat.framework.common.enums.RpcConstants;
|
||||
|
||||
/**
|
||||
* API 相关的枚举
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
public class ApiConstants {
|
||||
|
||||
/**
|
||||
* 服务名
|
||||
*
|
||||
* 注意,需要保证和 spring.application.name 保持一致
|
||||
*/
|
||||
public static final String NAME = "base-server";
|
||||
|
||||
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/base";
|
||||
|
||||
public static final String VERSION = "1.0.0";
|
||||
|
||||
public static final String TABLE_FIELD_SPLY_ERP_CPN_NUM = "NUM";
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.zt.plat.module.base.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.api.BaseApi;
|
||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.AccountDO;
|
||||
import com.zt.plat.module.base.service.base.AccountService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ERP Api 实现类
|
||||
*
|
||||
* @author ZT
|
||||
* @author jason
|
||||
*/
|
||||
@RestController
|
||||
@Validated
|
||||
public class BaseApiImpl implements BaseApi {
|
||||
|
||||
@Resource
|
||||
private AccountService accountService;
|
||||
|
||||
@Override
|
||||
public List<AccountRespDto> getNoPage(AccountRespDto respVO) {
|
||||
return accountService.getAccountNoPage(respVO);
|
||||
}
|
||||
}
|
||||
@@ -3,10 +3,14 @@ package com.zt.plat.module.base.dal.mysql.base;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.AccountDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 账户条款 Mapper
|
||||
*
|
||||
@@ -31,4 +35,18 @@ public interface AccountMapper extends BaseMapperX<AccountDO> {
|
||||
.orderByDesc(AccountDO::getId));
|
||||
}
|
||||
|
||||
default List<AccountDO> selectNoPage(AccountRespDto reqVO){
|
||||
return selectList(new LambdaQueryWrapperX<AccountDO>()
|
||||
.eqIfPresent(AccountDO::getType, reqVO.getType())
|
||||
.likeIfPresent(AccountDO::getAccountName, reqVO.getAccountName())
|
||||
.likeIfPresent(AccountDO::getAddress, reqVO.getAddress())
|
||||
.likeIfPresent(AccountDO::getPhone, reqVO.getPhone())
|
||||
.eqIfPresent(AccountDO::getBankAccount, reqVO.getBankAccount())
|
||||
.eqIfPresent(AccountDO::getCustomerName, reqVO.getCustomerName())
|
||||
.eqIfPresent(AccountDO::getCustomerNumber, reqVO.getCustomerNumber())
|
||||
.eqIfPresent(AccountDO::getIsEnable, reqVO.getIsEnable())
|
||||
.eqIfPresent(AccountDO::getAccountNumber, reqVO.getAccountNumber())
|
||||
.eqIfPresent(AccountDO::getTaxNumber, reqVO.getTaxNumber())
|
||||
.orderByDesc(AccountDO::getId));
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.zt.plat.module.base.controller.admin.base.vo.CompanyRelativityPageReq
|
||||
import com.zt.plat.module.base.dal.dataobject.base.CompanyRelaDeptDO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.CompanyRelativityDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -27,4 +28,6 @@ public interface CompanyRelativityMapper extends BaseMapperX<CompanyRelativityDO
|
||||
}
|
||||
|
||||
List<CompanyRelaDeptDO> getPageByReq(CompanyRelativityPageReqVO pageReqVO);
|
||||
|
||||
void removeByIds(@Param("ids")List<Long> ids);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zt.plat.module.base.service.base;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountSaveReqVO;
|
||||
@@ -67,4 +68,6 @@ public interface AccountService {
|
||||
* @param saveReqVOS 账户条款
|
||||
*/
|
||||
void enableAccountList(List<AccountSaveReqVO> saveReqVOS);
|
||||
|
||||
List<AccountRespDto> getAccountNoPage(AccountRespDto respVO);
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.zt.plat.module.base.service.base;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.api.dto.AccountRespDto;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountPageReqVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountRespVO;
|
||||
import com.zt.plat.module.base.controller.admin.base.vo.AccountSaveReqVO;
|
||||
@@ -96,4 +97,9 @@ public class AccountServiceImpl implements AccountService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccountRespDto> getAccountNoPage(AccountRespDto respVO) {
|
||||
List<AccountDO> entityList = accountMapper.selectNoPage(respVO);
|
||||
return BeanUtils.toBean(entityList, AccountRespDto.class);
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class CompanyRelativityServiceImpl implements CompanyRelativityService {
|
||||
// 校验存在
|
||||
validateCompanyRelativityExists(ids);
|
||||
// 删除
|
||||
companyRelativityMapper.deleteByIds(ids);
|
||||
companyRelativityMapper.removeByIds(ids);
|
||||
}
|
||||
|
||||
private void validateCompanyRelativityExists(List<Long> ids) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user