推广宽图改版,商户列表,注册改版
This commit is contained in:
@@ -40,13 +40,13 @@ public class IntroduceController {
|
||||
//如果是推广宽图则看宽图是否开放
|
||||
if (Objects.equals(entity.getType(), "1")) {
|
||||
String type = httpServletRequest.getHeader("type");
|
||||
//TODO 暂时安卓开发IOS不开
|
||||
if ("1".equals(type)){
|
||||
//TODO 双端开启
|
||||
if ("1".equals(type) || "2".equals(type)){
|
||||
return ResultGenerator.genSuccessResult(entity.getContent());
|
||||
}
|
||||
else if ("2".equals(type)){
|
||||
return ResultGenerator.genFailResult("");
|
||||
}
|
||||
// else if ("2".equals(type)){
|
||||
// return ResultGenerator.genFailResult("");
|
||||
// }
|
||||
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||
}else {
|
||||
return ResultGenerator.genFailResult("");
|
||||
@@ -72,16 +72,55 @@ public class IntroduceController {
|
||||
//如果是推广宽图则看宽图是否开放
|
||||
if (Objects.equals(entity.getType(), "1")) {
|
||||
String type = httpServletRequest.getHeader("type");
|
||||
//TODO 暂时安卓开发IOS不开
|
||||
if ("1".equals(type)){
|
||||
//TODO 双端开启
|
||||
if ("1".equals(type)||"2".equals(type)) {
|
||||
return ResultGenerator.genSuccessResult(image(params.get("typeCode"), params.get("merchantType")));
|
||||
}else if ("2".equals(type)){
|
||||
return ResultGenerator.genFailResult("");
|
||||
}
|
||||
// }else if ("2".equals(type)){
|
||||
// return ResultGenerator.genFailResult("");
|
||||
// }
|
||||
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||
}else {
|
||||
return ResultGenerator.genFailResult("");
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping ("/commonV2")
|
||||
public Result<String> billIntroV2(HttpServletRequest httpServletRequest,
|
||||
@RequestBody Map<String, String> params) {
|
||||
AppGuide entity = appGuideService.getByCode(imageV2(params.get("typeCode"), params.get("merchantType")));
|
||||
|
||||
//如果是推广宽图则看宽图是否开放
|
||||
if (Objects.equals(entity.getType(), "1")) {
|
||||
//获取安卓或者IOS
|
||||
String type = httpServletRequest.getHeader("type");
|
||||
//安卓
|
||||
if ("1".equals(type)){
|
||||
if ("1".equals(entity.getAndroid())) {
|
||||
return ResultGenerator.genSuccessResult(entity.getContent());
|
||||
}
|
||||
return ResultGenerator.genSuccessResult("");
|
||||
//IOS
|
||||
}else if ("2".equals(type)){
|
||||
if ("1".equals(entity.getIos())) {
|
||||
return ResultGenerator.genSuccessResult(entity.getContent());
|
||||
}
|
||||
return ResultGenerator.genSuccessResult("");
|
||||
}
|
||||
return ResultGenerator.genFailResult("");
|
||||
}else {
|
||||
return ResultGenerator.genFailResult("");
|
||||
}
|
||||
}
|
||||
|
||||
private String imageV2(String typeCode, String merchantType){
|
||||
if ("AG".equals(typeCode) || "FB".equals(typeCode) || "SB".equals(typeCode)){
|
||||
return "SHTGKT";
|
||||
}
|
||||
if ("1".equals(merchantType)){
|
||||
return "XWTG";
|
||||
}
|
||||
return "PUSH";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user