修改明细代码调整
This commit is contained in:
parent
e015b16862
commit
8f6959f3e2
@ -1,9 +1,12 @@
|
|||||||
package cn.axzo.tyr.server.repository.dao;
|
package cn.axzo.tyr.server.repository.dao;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import cn.axzo.basics.common.constant.enums.TableIsDeleteEnum;
|
||||||
import cn.axzo.tyr.server.repository.entity.SaasFeatureApplyDetail;
|
import cn.axzo.tyr.server.repository.entity.SaasFeatureApplyDetail;
|
||||||
import cn.axzo.tyr.server.repository.mapper.SaasFeatureApplyDetailMapper;
|
import cn.axzo.tyr.server.repository.mapper.SaasFeatureApplyDetailMapper;
|
||||||
|
|
||||||
@ -15,4 +18,9 @@ import cn.axzo.tyr.server.repository.mapper.SaasFeatureApplyDetailMapper;
|
|||||||
**/
|
**/
|
||||||
@Repository
|
@Repository
|
||||||
public class SaasFeatureApplyDetailDao extends ServiceImpl<SaasFeatureApplyDetailMapper, SaasFeatureApplyDetail> {
|
public class SaasFeatureApplyDetailDao extends ServiceImpl<SaasFeatureApplyDetailMapper, SaasFeatureApplyDetail> {
|
||||||
|
@Override
|
||||||
|
public SaasFeatureApplyDetail getById(Serializable id) {
|
||||||
|
return super.lambdaQuery().eq(SaasFeatureApplyDetail::getId, id)
|
||||||
|
.eq(SaasFeatureApplyDetail::getIsDelete, TableIsDeleteEnum.NORMAL.value).one();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -22,9 +22,7 @@ public interface SaasFeatureApplyDetailService {
|
|||||||
|
|
||||||
PermissionPointApplyDetailResp getApplyDetail(Long applyDetailId);
|
PermissionPointApplyDetailResp getApplyDetail(Long applyDetailId);
|
||||||
|
|
||||||
Void updateApplyDetail(PermissionPointApplyDetailUpdateReq req);
|
void updateApplyDetail(PermissionPointApplyDetailUpdateReq req);
|
||||||
|
|
||||||
List<PermissionPointApplyDetailResp> getApplyDetails(Long applyId);
|
List<PermissionPointApplyDetailResp> getApplyDetails(Long applyId);
|
||||||
|
|
||||||
void processAbort(Long applyId);
|
|
||||||
}
|
}
|
||||||
@ -9,7 +9,6 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import cn.axzo.basics.common.BeanMapper;
|
import cn.axzo.basics.common.BeanMapper;
|
||||||
import cn.axzo.basics.common.constant.enums.TableIsDeleteEnum;
|
import cn.axzo.basics.common.constant.enums.TableIsDeleteEnum;
|
||||||
@ -67,18 +66,18 @@ public class SaasFeatureApplyDetailServiceImpl implements SaasFeatureApplyDetail
|
|||||||
public PermissionPointApplyDetailResp getApplyDetail(Long applyDetailId) {
|
public PermissionPointApplyDetailResp getApplyDetail(Long applyDetailId) {
|
||||||
SaasFeatureApplyDetail saasFeatureApplyDetail = saasFeatureApplyDetailDao.getById(applyDetailId);
|
SaasFeatureApplyDetail saasFeatureApplyDetail = saasFeatureApplyDetailDao.getById(applyDetailId);
|
||||||
return BeanMapper.copyBean(saasFeatureApplyDetail, PermissionPointApplyDetailResp.class, (s, p) -> {
|
return BeanMapper.copyBean(saasFeatureApplyDetail, PermissionPointApplyDetailResp.class, (s, p) -> {
|
||||||
p.setFitOuTypeList(JSON.parseList(s.getFitOuTypeBit(), Long.class));
|
if (StringUtils.isNotBlank(s.getFitOuTypeBit())) {
|
||||||
p.setFitOuNodeTypeList(JSON.parseList(s.getFitOuNodeTypeBit(), Long.class));
|
p.setFitOuTypeList(JSON.parseList(s.getFitOuTypeBit(), Long.class));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(s.getFitOuNodeTypeBit())) {
|
||||||
|
p.setFitOuNodeTypeList(JSON.parseList(s.getFitOuNodeTypeBit(), Long.class));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Void updateApplyDetail(PermissionPointApplyDetailUpdateReq req) {
|
public void updateApplyDetail(PermissionPointApplyDetailUpdateReq req) {
|
||||||
boolean updated = saasFeatureApplyDetailDao.updateById(BeanMapper.copyBean(req, SaasFeatureApplyDetail.class));
|
saasFeatureApplyDetailDao.updateById(BeanMapper.copyBean(req, SaasFeatureApplyDetail.class));
|
||||||
if (!updated){
|
|
||||||
throw new ServiceException("更新失败");
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -92,12 +91,6 @@ public class SaasFeatureApplyDetailServiceImpl implements SaasFeatureApplyDetail
|
|||||||
})).collect(Collectors.toList());
|
})).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public void processAbort(Long applyId) {
|
|
||||||
// 修改权限点专题
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<String> generateCode(String terminal, int maxCode, int maxLength, int size) {
|
private List<String> generateCode(String terminal, int maxCode, int maxLength, int size) {
|
||||||
List<String> result = new ArrayList<>();
|
List<String> result = new ArrayList<>();
|
||||||
for (int i = 1; i <= size; i++) {
|
for (int i = 1; i <= size; i++) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user