Commit 54d312d2 authored by 张永's avatar 张永

需求 #14514

parent 433e8692
......@@ -99,17 +99,24 @@ public class CommonController {
@ApiOperation("获取配置信息")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "appId", dataType = "String"),
@ApiImplicitParam(paramType = "query", name = "orgNO", dataType = "String"),
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String"),
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = false, value = "终端标识", defaultValue = "wechat"),
@ApiImplicitParam(paramType = "query", name = "langID", dataType = "String", required = false, value = "语言", defaultValue = "936"),
@ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
})
@RequestMapping(value = "/getConfig",method=RequestMethod.GET)
public Object getConfig(String appId,String orgNO) {
public Object getConfig(String appId,String orgNo) {
Map<String, Object> map = null;
try {
map = jdbcTemplate.queryForMap("select sOrgNO, sOrgDesc, sOrgPicUrl from tOrg where sAppID = ? and sOrgNO = ? and nTag&1 = 0", appId,orgNO);
String sql = "select sOrgNO, sOrgDesc, sOrgPicUrl from tOrg where sAppID = ? and nTag&1 = 0 ";
if(StringUtil.isNotEmpty(orgNo)) {
sql += " and sOrgNO = ? ";
map = jdbcTemplate.queryForMap(sql, appId,orgNo);
}else {
map = jdbcTemplate.queryForMap(sql, appId);
}
} catch (Exception e) {
throw new XException("配置不存在", e);
}
......
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