Commit 11c83063 authored by unset's avatar unset

Merge branch 'master-chw-bug' into master-chw

parents 6a7932b8 f296f3c0
...@@ -241,10 +241,10 @@ ...@@ -241,10 +241,10 @@
</choose> </choose>
</if> </if>
<if test="realName !=null and realName != ''"> <if test="realName !=null and realName != ''">
and d.realname like CONCAT('%',#{realName},'%') and (d.realname like CONCAT('%',#{realName},'%') or d.nickname like CONCAT('%',#{realName},'%'))
</if> </if>
<if test="nickname !=null and nickname != ''"> <if test="nickname !=null and nickname != ''">
and d.nickname, like CONCAT('%',#{nickname},'%') and d.nickname like CONCAT('%',#{nickname},'%')
</if> </if>
<if test="citySet != null and citySet.size > 0 "> <if test="citySet != null and citySet.size > 0 ">
and d.city_code in and d.city_code in
......
...@@ -193,7 +193,7 @@ public class MsgBiz { ...@@ -193,7 +193,7 @@ public class MsgBiz {
return imQuestionBiz.getList(questionParamDto); return imQuestionBiz.getList(questionParamDto);
} }
Query query = new Query(Criteria.where("body.type").in(ids)); Query query = new Query(Criteria.where("body.type").in(ids));
query.addCriteria(Criteria.where("userId").is(userId)); query.addCriteria(Criteria.where("userId").is(userId).and("visible").is(1));
int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size(); int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size();
query.with(pageable); query.with(pageable);
query.with(new Sort(Sort.Direction.DESC, "time")); query.with(new Sort(Sort.Direction.DESC, "time"));
......
...@@ -47,12 +47,12 @@ public class BannerBiz extends BaseBiz<BannerMapper, Banner> { ...@@ -47,12 +47,12 @@ public class BannerBiz extends BaseBiz<BannerMapper, Banner> {
* @param indexShow 是否首页展示 * @param indexShow 是否首页展示
* @return * @return
*/ */
public ObjectRestResponse<List<Banner>> getAll(Integer indexShow) { public ObjectRestResponse<List<Banner>> getAll(Integer indexShow, Integer location) {
Example example = new Example(Banner.class); Example example = new Example(Banner.class);
if (indexShow != null) { if (indexShow != null) {
example.createCriteria().andEqualTo("isDel", 0).andEqualTo("status", 1).andEqualTo("indexShow",indexShow); example.createCriteria().andEqualTo("isDel", 0).andEqualTo("status", 1).andEqualTo("indexShow",indexShow).andEqualTo("location", location);
} else { } else {
example.createCriteria().andEqualTo("isDel", 0).andEqualTo("status", 1); example.createCriteria().andEqualTo("isDel", 0).andEqualTo("status", 1).andEqualTo("location", location);
} }
example.orderBy("rank"); example.orderBy("rank");
return ObjectRestResponse.succ(mapper.selectByExample(example)); return ObjectRestResponse.succ(mapper.selectByExample(example));
......
package com.xxfc.platform.uccn.rest;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.uccn.biz.BannerBiz;
import com.xxfc.platform.uccn.entity.Banner;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("banner/web")
public class BannerWebController extends BaseController<BannerBiz, Banner> {
@GetMapping(value = "/app/unauth/getAll")
public ObjectRestResponse getAll(@RequestParam(value = "location", defaultValue = "1") Integer location) {
return baseBiz.getAll(1, location);
}
}
\ No newline at end of file
...@@ -21,8 +21,4 @@ public class BannerController extends BaseController<BannerBiz, Banner> { ...@@ -21,8 +21,4 @@ public class BannerController extends BaseController<BannerBiz, Banner> {
return baseBiz.selectList(bannerDto); return baseBiz.selectList(bannerDto);
} }
@GetMapping(value = "/app/unauth/getAll")
public ObjectRestResponse getAll() {
return baseBiz.getAll(1);
}
} }
\ No newline at end of file
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