Commit e8e2df9b by 穆龙飞

modify:组装分类对象

parent 55b4808e
package com.netease.mail.yanxuan.change.biz.service.impl.change;
import com.netease.mail.yanxuan.change.biz.service.change.ChangeConfigService;
import com.netease.mail.yanxuan.change.dal.entity.ChangeConfig;
import com.netease.mail.yanxuan.change.dal.entity.ChangeType;
import com.netease.mail.yanxuan.change.dal.mapper.ChangeConfigMapper;
import com.netease.mail.yanxuan.change.dal.mapper.ChangeTypeMapper;
import com.netease.mail.yanxuan.change.dal.meta.model.po.ChangeConfigPo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* @author WangJiaXiang
* @date 2022/11/11/011$
......@@ -16,6 +21,9 @@ public class ChangeConfigServiceImpl implements ChangeConfigService {
@Autowired
public ChangeConfigMapper mapper;
@Autowired
private ChangeTypeMapper changeTypeMapper;
@Override
public ChangeConfig queryChangeConfig(Long id) {
return mapper.queryById(id);
......@@ -28,7 +36,14 @@ public class ChangeConfigServiceImpl implements ChangeConfigService {
@Override
public ChangeConfigPo queryInfoPo(Long parentChangeClassId,Long sonChangeClassId) {
return mapper.queryInfoPo(parentChangeClassId,sonChangeClassId);
ChangeConfigPo changeConfigPo = mapper.queryInfoPo(parentChangeClassId, sonChangeClassId);
ChangeType parentChangeType = changeTypeMapper.selectByPrimaryKey(changeConfigPo.getParentChangeClassId());
ChangeType sonChangeType = changeTypeMapper.selectByPrimaryKey(changeConfigPo.getSonChangeClassId());
List<ChangeType> changeTypes = new ArrayList<>();
changeTypes.add(parentChangeType);
changeTypes.add(sonChangeType);
changeConfigPo.setChangeTypes(changeTypes);
return changeConfigPo;
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment