Commit f8409bea authored by Quxl's avatar Quxl

x

parent 9ba42731
......@@ -206,17 +206,20 @@ public class BrandController {
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = true, value = "组织机构", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "ipId", dataType = "String", required = true, value = "热门IP ID", defaultValue = "10"),
@ApiImplicitParam(paramType = "query", name = "custNo", dataType = "String", required = true),
})
@RequestMapping(value = "/hotIPDetail",method=RequestMethod.GET)
public String hotIPDetail(HttpServletRequest request) {
String orgNO = request.getParameter("orgNo");
String ipId = request.getParameter("ipId");
if(!StringUtil.isNotEmpty(orgNO,ipId)) {
String custNo = request.getParameter("custNo");
if(!StringUtil.isNotEmpty(orgNO,ipId, custNo)) {
return Rjx.json().setCode(-1).setMessage(I18NUtils.getMessage(orgNO,ipId, "Msg_Parameter_empty")).toJson();
}
Map<String,Object> params = new HashMap<String,Object>();
params.put("orgNO", orgNO);
params.put("ipId", ipId);
params.put("custNo", custNo);
Map<String,Object> hotIpDetail = brandService.hotIPDetail(params);
if(hotIpDetail != null ) {
......
......@@ -146,13 +146,14 @@ public class BrandServiceImpl implements BrandService {
public Map<String, Object> hotIPDetail(Map<String, Object> params){
String orgNO = params.get("orgNO")+"";
String ipId = params.get("ipId")+"";
String custNo = params.get("custNo")+"";
jdbcTemplate.setDialect(new SqlServerDialect());
String sql = "SELECT IPID = a.sIPID, AgentContractNO = a.sAgentContractNO,OrgName = o.sOrgDesc,BrandID = a.sBrandID, BrandName = b.sBrandName,IPBrandTypeID = a.sIPBrandTypeID,"
+ " IPBrandType = a.sIPBrandType, LogoUrl = a.sLogoUrl,Introduce = a.sIntroduce,Describe = a.sDescribe,Memo = a.sMemo "
+ " FROM tIPBrand a join tOrg o on a.sOrgNO = o.sOrgNO join tBrand b on a.sBrandID = b.sBrandID "
+ " IPBrandType = a.sIPBrandType, LogoUrl = a.sLogoUrl,Introduce = a.sIntroduce,Describe = a.sDescribe,Memo = a.sMemo"
+ " FROM tIPBrand a left jion tIPBrandAuthorize ba on ba.sIPID = a.sIPID and ba.sCustNO = ? join tOrg o on a.sOrgNO = o.sOrgNO join tBrand b on a.sBrandID = b.sBrandID "
+ " WHERE a.sIPID = ? and a.sOrgNO = ? and a.nTag=2 ";
Map<String,Object> map = jdbcTemplate.queryForMap(sql,ipId,orgNO);
Map<String,Object> map = jdbcTemplate.queryForMap(sql,custNo,ipId,orgNO);
if(!map.isEmpty()) {
String picSql = "select Item = nItem,PicTypeID = sPicTypeID,PicType = sPicType,PicDesc = sPicDesc,URL = sURL, Idx = nIdx "
+ " from tIPBrandPic where sIPID = ?";
......
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