Browse Source

[成长值、等级C端展示][新增]

release_toaliyun_real
Stormeye.Wu 7 years ago
parent
commit
61eeed8085
1 changed files with 27 additions and 0 deletions
  1. +27
    -0
      mallinkCApi/src/main/java/com/iformall/controller/WxMallController.java

+ 27
- 0
mallinkCApi/src/main/java/com/iformall/controller/WxMallController.java View File

@@ -5,9 +5,13 @@ import com.iformall.common.ErrorCode;
import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxAppinfo;
import com.iformall.domain.po.WxLevelConfig;
import com.iformall.domain.po.WxMall;
import com.iformall.domain.po.WxScoreRules;
import com.iformall.service.WxAppinfoService;
import com.iformall.service.WxLevelConfigService;
import com.iformall.service.WxMallService;
import com.iformall.service.WxScoreRulesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
@@ -20,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@@ -37,6 +42,12 @@ public class WxMallController extends BaseController {
@Autowired
private WxAppinfoService wxAppinfoService;

@Autowired
private WxScoreRulesService wxScoreRulesService;

@Autowired
private WxLevelConfigService wxLevelConfigService;


@AuthIgnore
@ApiOperation("根据appId获取")
@@ -90,6 +101,22 @@ public class WxMallController extends BaseController {
return new ResultData(Result.SUCCESS, "查询成功", mall);
}

@ApiOperation("根据appId获取")
@GetMapping("/scoreLevelInfo")
@ApiImplicitParam(name = "appId", value = "appId", dataType = "String", paramType = "query", required = true)
public ResultData getScoreLevelInfo(String appId) {
WxAppinfo appInfo = wxAppinfoService.getByAppId(appId);
if (appInfo == null) {
return new ResultData(ErrorCode.APP_ID_NOT_FOUND);
}
Map map = new HashMap();
WxScoreRules scoreRules = wxScoreRulesService.getScoreRules(appInfo.getTenantId());
map.put("score", scoreRules);
List<WxLevelConfig> levelConfigList = wxLevelConfigService.getByTenantId(appInfo.getTenantId());
map.put("levelList", levelConfigList);
return new ResultData(Result.SUCCESS, "查询成功", map);
}

@AuthIgnore
@ApiOperation("获取后端版本号")
@GetMapping("/version")


Loading…
Cancel
Save