mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 05:42:06 +08:00
1、组织资金、销售明细、购买记录controller单元测试完善;2、token管理service、controller单元测试完善;3、新增/贴皮管理http method错误修正;
This commit is contained in:
+2
-1
@@ -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));
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ public class TokenConfigDO extends BaseDO {
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long organId;
|
||||
|
||||
}
|
||||
|
||||
+39
-7
@@ -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);
|
||||
}
|
||||
|
||||
-23
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user