1、组织资金、销售明细、购买记录controller单元测试完善;2、token管理service、controller单元测试完善;3、新增/贴皮管理http method错误修正;

This commit is contained in:
gaoqr
2026-01-07 14:40:15 +08:00
parent 953ad8909f
commit 58c06ba5d4
12 changed files with 1172 additions and 36 deletions
@@ -123,7 +123,8 @@ public class TokenConfigController {
public void exportTokenConfigExcel(@Valid TokenConfigPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<TokenConfigRespVO> list = tokenConfigService.exportTokenConfigExcel(pageReqVO).getList();
pageReqVO.setTimeType(null);
List<TokenConfigRespVO> list = tokenConfigService.getTokenConfigPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "token配置信息表.xls", "数据", TokenConfigRespVO.class,
BeanUtils.toBean(list, TokenConfigRespVO.class));
@@ -62,7 +62,7 @@ public class TokenConfigDO extends BaseDO {
/**
* 组织id
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@TableField(fill = FieldFill.INSERT)
private Long organId;
}
@@ -12,24 +12,56 @@ import com.cf.imes.module.system.dal.dataobject.tokenconfig.TokenConfigDO;
*/
public interface TokenConfigService {
/**
* 获取token分页
*
* @param pageReqVO
* @return
*/
PageResult<TokenConfigRespVO> getTokenConfigPage(TokenConfigPageReqVO pageReqVO);
/**
* 根据id查询token
*
* @param id
* @return
*/
TokenConfigDO getTokenConConfig(Long id);
/**
* 新增token
*
* @param reqVO
*/
void insertTokenConfig(TokenConfigSaveReqVO reqVO);
/**
* 更新token
*
* @param reqVO
*/
void updateTokenConfig(TokenConfigSaveReqVO reqVO);
/**
* 删除token
*
* @param id
*/
void deleteTokenConfig(Long id);
/**
* 校验token
*
* @param token
* @return
*/
Long checkTokenConfig(String token);
/**
* 复制token
*
* @param id
* @return
*/
String tokenConfigCopy(Long id);
PageResult<TokenConfigRespVO> exportTokenConfigExcel(TokenConfigPageReqVO pageReqVO);
}
@@ -247,29 +247,6 @@ public class TokenConfigServiceImpl implements TokenConfigService{
}
@Override
public PageResult<TokenConfigRespVO> exportTokenConfigExcel(TokenConfigPageReqVO pageReqVO) {
PageResult<TokenConfigDO> pageResult = tokenConfigMapper.selectConfigPage(pageReqVO,null);
if(CollUtil.isEmpty(pageResult.getList())) {
return new PageResult<>();
}
OrganizationDO organizationDO = organService.validOrgan(getUserOrganId());
PageResult<TokenConfigRespVO> result = BeanUtils.toBean(pageResult, TokenConfigRespVO.class);
result.getList().forEach(f->{
f.setOrganName(organizationDO.getName());
f.setAppToken(FIELD_IMES+f.getAppToken());
});
return result;
}
private TokenConfigDO validateTokenConfigExists(Long id) {
TokenConfigDO tokenConfigDO = tokenConfigMapper.selectById(id);