|
|
@ -80,6 +80,10 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void add(AddSocietyOrgFormDTO dto) { |
|
|
|
IcSocietyOrgEntity entity = ConvertUtils.sourceToTarget(dto, IcSocietyOrgEntity.class); |
|
|
|
//图片必填
|
|
|
|
if(dto.getImageList() != null&& StringUtils.isNotBlank(dto.getImageList()[0])){ |
|
|
|
entity.setImgUrl(dto.getImageList()[0]); |
|
|
|
} |
|
|
|
CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(dto.getCustomerId(), dto.getStaffId()); |
|
|
|
entity.setAgencyId(staffInfoCache.getAgencyId()); |
|
|
|
entity.setPids(staffInfoCache.getAgencyPIds()); |
|
|
@ -96,6 +100,10 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic |
|
|
|
if (null == entity) { |
|
|
|
throw new RenException(String.format("修改社会组织信息失败,社会组织信息不存在,组织Id->%s", formDTO.getSocietyId())); |
|
|
|
} |
|
|
|
//图片必填
|
|
|
|
if(formDTO.getImageList() != null&& StringUtils.isNotBlank(formDTO.getImageList()[0])){ |
|
|
|
entity.setImgUrl(formDTO.getImageList()[0]); |
|
|
|
} |
|
|
|
entity = ConvertUtils.sourceToTarget(formDTO, IcSocietyOrgEntity.class); |
|
|
|
entity.setId(formDTO.getSocietyId()); |
|
|
|
baseDao.updateById(entity); |
|
|
@ -115,7 +123,8 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic |
|
|
|
/** |
|
|
|
* @Author sun |
|
|
|
* @Description 社会组织列表查询 |
|
|
|
**/ |
|
|
|
* |
|
|
|
* @return*/ |
|
|
|
@Override |
|
|
|
public GetListSocietyOrgResultDTO getList(GetListSocietyOrgFormDTO formDTO) { |
|
|
|
GetListSocietyOrgResultDTO resultDTO = new GetListSocietyOrgResultDTO(); |
|
|
@ -291,4 +300,4 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic |
|
|
|
return ConvertUtils.sourceToTarget(entity,IcSocietyOrgDTO.class); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|