数据返回结果
This commit is contained in:
parent
8159501cfc
commit
51b8a10208
|
|
@ -37,8 +37,23 @@ public class MaTypeServiceImpl implements ITypeService {
|
|||
*/
|
||||
@Override
|
||||
public MaType selectMaTypeByTypeId(Long typeId) {
|
||||
return maTypeMapper.selectMaTypeByTypeId(typeId);
|
||||
MaType maType = maTypeMapper.selectMaTypeByTypeId(typeId);
|
||||
List<Long> idList = new ArrayList<>();
|
||||
if (maType.getKeeperUserId() != null) {
|
||||
String[] idStrings = maType.getTypeName().split(",");
|
||||
for (String idString : idStrings) {
|
||||
try {
|
||||
Long id = Long.parseLong(idString.trim());
|
||||
idList.add(id);
|
||||
} catch (NumberFormatException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
maType.setKeeperUserId(idList);
|
||||
return maType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -48,7 +63,7 @@ public class MaTypeServiceImpl implements ITypeService {
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insertMaType(MaType maType) {
|
||||
Long parentId = maType.getParentId();
|
||||
MaType maType1 = maTypeMapper.selectMaTypeByTypeId(parentId);
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.unit_name, m.manage_type,
|
||||
m.lease_price,m.rent_price, m.eff_time, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
||||
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
|
||||
mtf2.file_name documentName, mtf2.file_url documentUrl, GROUP_CONCAT(mtk.user_id) keeperUserId,
|
||||
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
|
||||
GROUP_CONCAT(su.nick_name) keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time,
|
||||
m.remark, m.company_id,m.fac_model as facModel
|
||||
from ma_type m
|
||||
|
|
|
|||
Loading…
Reference in New Issue