|
@ -142,10 +142,15 @@ public class CommunityCanteenServiceImpl extends BaseServiceImpl<CommunityCantee |
|
|
public void update(CommunityCanteenDTO dto) { |
|
|
public void update(CommunityCanteenDTO dto) { |
|
|
CommunityCanteenEntity entity = ConvertUtils.sourceToTarget(dto, CommunityCanteenEntity.class); |
|
|
CommunityCanteenEntity entity = ConvertUtils.sourceToTarget(dto, CommunityCanteenEntity.class); |
|
|
if (null != dto.getBusinessHours() && dto.getBusinessHours().length > 0) { |
|
|
if (null != dto.getBusinessHours() && dto.getBusinessHours().length > 0) { |
|
|
entity.setBusinessHours(StringUtils.join(dto.getBusinessHours())); |
|
|
entity.setBusinessHours(StringUtils.join(dto.getBusinessHours(), ",")); |
|
|
} |
|
|
} |
|
|
if (null != dto.getThreeMeals() && dto.getThreeMeals().length > 0) { |
|
|
if (null != dto.getThreeMeals() && dto.getThreeMeals().length > 0) { |
|
|
entity.setThreeMeals(StringUtils.join(dto.getThreeMeals())); |
|
|
entity.setThreeMeals(StringUtils.join(dto.getThreeMeals(), ",")); |
|
|
|
|
|
} |
|
|
|
|
|
if (StringUtils.isNotEmpty(dto.getAgencyId())) { |
|
|
|
|
|
AgencyInfoCache info = CustomerOrgRedis.getAgencyInfo(dto.getAgencyId()); |
|
|
|
|
|
entity.setAgencyId(PidUtils.convertPid2OrgIdPath(dto.getAgencyId(), info.getPids())); |
|
|
|
|
|
entity.setCustomerId(info.getCustomerId()); |
|
|
} |
|
|
} |
|
|
updateById(entity); |
|
|
updateById(entity); |
|
|
} |
|
|
} |
|
|