Commit a4d40726 by guojuxing

Merge remote-tracking branch 'origin/developer' into developer

parents f7cf99e6 93e25a42
......@@ -103,6 +103,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
......
......@@ -125,8 +125,12 @@ public class CustomGuideApiServiceImpl implements CustomGuideApiService {
String title = guide.getTitle();
Map<String, Object> listMap = new HashMap<String, Object>();
JSONObject jsonObject = JSON.parseObject(guide.getIcon());
String selectIconPath = iconPath + jsonObject.getString("type")+ jsonObject.getString("name")+"-active.png";
String unIconPath = iconPath + jsonObject.getString("type")+ jsonObject.getString("name")+".png";
String selectIconPath = "";
String unIconPath = "";
if(jsonObject != null){
selectIconPath = iconPath + jsonObject.getString("type")+ jsonObject.getString("name")+"-active.png";
unIconPath = iconPath + jsonObject.getString("type")+ jsonObject.getString("name")+".png";
}
listMap.put("selectedIconPath", selectIconPath);
listMap.put("iconPath", unIconPath);
listMap.put("pagePath", guide.getCustomPage());
......
......@@ -114,7 +114,7 @@ public class AccountBalanceStrategy implements PayStrategy {
private BillingPayInfoDTO savePayInfo(OutPayDTO outPayDTO) {
BillingPayInfoDTO payInfoDTO = new BillingPayInfoDTO();
payInfoDTO.setEnterpriseId(outPayDTO.getEnterpriseId());
payInfoDTO.setSerialNumber(CreateRandomUtils.createSerialNumber());
payInfoDTO.setSerialNumber(CreateRandomUtils.getStringRandom(11));
payInfoDTO.setPayType(PayTypeEnum.BALANCE_PAY.getCode());
payInfoDTO.setTotalFeePaid(outPayDTO.getTotalFeePaid());
payInfoDTO.setTimeStart(outPayDTO.getTimeStart());
......
......@@ -3,7 +3,7 @@ package com.gic.enterprise.web.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
@Configuration
//@Configuration
public class Config {
@Value("${host}")
private String host;
......
......@@ -10,7 +10,8 @@ import java.util.Map;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import com.gic.enterprise.web.config.Config;
import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -59,8 +60,8 @@ public class BillingAccountController {
private MarketUserApiService marketUserApiService;
@Autowired
private AppTokenApiService appTokenApiService;
@Autowired
private Config config;
//@Autowired
//private Config config;
//private static final String URL = "https://four.gicdev.com";
......@@ -280,7 +281,9 @@ public class BillingAccountController {
ServiceResponse<String> result = marketUserApiService
.BindGicEnterprise(Long.valueOf(enterpriseId), null, null, null);
if (result.isSuccess()) {
return RestResponse.success(config.getHost() + "/market/gic" + "?loginKey=" + result.getResult()
Config config = ConfigService.getConfig("COMMON.4.0-gic-properties");
String url = config.getProperty("service_host", "").replace("/gic", "");
return RestResponse.success(url + "/market/gic" + "?loginKey=" + result.getResult()
+ "&enterpriseId=" + enterpriseId);
}
return EnterpriseRestResponse.failure(result);
......
......@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
@Configuration
//@Configuration
public class Config {
@Value("${host}")
private String host;
......
......@@ -5,7 +5,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gic.operation.web.config.Config;
import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -46,8 +47,7 @@ public class LoginController {
private UserApiService userApiService;
@Autowired
private MarketUserApiService marketUserApiService;
@Autowired
private Config config;
// private static final String URL = "https://four.gicdev.com";
......@@ -83,7 +83,9 @@ public class LoginController {
ServiceResponse<String> result = marketUserApiService.BindGicEnterprise(Long.valueOf(enterpriseId), null, null,
null);
if (result.isSuccess()) {
return RestResponse.success(config.getHost() + "/market/gic" + "?loginKey=" + result.getResult()
Config config = ConfigService.getConfig("COMMON.4.0-gic-properties");
String url = config.getProperty("service_host", "").replace("/gic", "");
return RestResponse.success(url + "/market/gic" + "?loginKey=" + result.getResult()
+ "&enterpriseId=" + enterpriseId);
}
return EnterpriseRestResponse.failure(result);
......@@ -91,8 +93,10 @@ public class LoginController {
@RequestMapping("login-gic")
public RestResponse login(Integer enterpriseId, String redirectUrl) throws IOException {
Config config = ConfigService.getConfig("COMMON.4.0-gic-properties");
String url = config.getProperty("service_host", "").replace("/gic", "");
if (StringUtils.isBlank(redirectUrl)) {
redirectUrl = config.getHost() + "/damo-system/overview/index";
redirectUrl = url + "/damo-system/overview/index";
// redirectUrl = "https://four.gicdev.com/cost-center/billing-center/overview";
}
String token;
......@@ -168,7 +172,7 @@ public class LoginController {
//塞缓存
token = UserDetailUtils.setUserDetail(userDetail);
String SSO_LOGIN_URL = config.getHost() + "/gic-auth-web/login-for-operation";
String SSO_LOGIN_URL = url + "/gic-auth-web/login-for-operation";
return RestResponse.success(SSO_LOGIN_URL + "?token=" + token + "&redirectUrl=" + redirectUrl);
}
return RestResponse.success();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment