| | |
| | | if (serviceId == null || serviceId <= 0) throw new BusinessException(ErrorCode.BAD_REQUEST, "学生托付服务信息不能为空"); |
| | | List<Map<String, Object>> rows = query(""" |
| | | select m.id, m.merchant_rights_config, m.usage_instructions |
| | | from merchant m join premium_topic_merchant mapping on mapping.merchant_id = m.id |
| | | where m.id = ? and m.deleted = 0 and mapping.deleted = 0 and mapping.category_key = 'children' |
| | | from merchant m |
| | | where m.id = ? and m.deleted = 0 and m.merchant_type_code = 'children' |
| | | """, serviceId); |
| | | if (rows.isEmpty()) throw new BusinessException(ErrorCode.NOT_FOUND, "学生托付服务不存在"); |
| | | return rows.get(0); |