| | |
| | | package com.nq.service.impl; |
| | | |
| | | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.nq.common.ServerResponse; |
| | | |
| | | import com.nq.dao.AgentUserMapper; |
| | |
| | | import com.nq.pojo.User; |
| | | import com.nq.service.ISiteInfoService; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.nq.service.IUserService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.util.UriComponentsBuilder; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, String> metadataMap = new HashMap<>(); |
| | | metadataMap.put("name", user.getNickName()); |
| | | String url = null; |
| | | try { |
| | | url = siteInfo.getOnlineService() + "&metadata=" + objectMapper.writeValueAsString(metadataMap); |
| | | } catch (JsonProcessingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | siteInfo.setOnlineService(url); |
| | | return ServerResponse.createBySuccess(siteInfo); |
| | | } |
| | | return ServerResponse.createByErrorMsg("设置信息info不存在"); |