Commit 015ea9ab authored by jiaorz's avatar jiaorz

添加押金记录客服电话,出行记录查询筛选

parent 5ddc3146
...@@ -7,6 +7,7 @@ import com.github.pagehelper.PageInfo; ...@@ -7,6 +7,7 @@ import com.github.pagehelper.PageInfo;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO; import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import com.github.wxiaoqi.security.admin.vo.ImiVo; import com.github.wxiaoqi.security.admin.vo.ImiVo;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.im.dto.CommentVo; import com.xxfc.platform.im.dto.CommentVo;
import com.xxfc.platform.im.dto.PraiseVo; import com.xxfc.platform.im.dto.PraiseVo;
import com.xxfc.platform.im.model.Comment; import com.xxfc.platform.im.model.Comment;
...@@ -122,6 +123,36 @@ public class MsgBiz { ...@@ -122,6 +123,36 @@ public class MsgBiz {
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
} }
public ObjectRestResponse getMsgListByUserId(Integer page, Integer limit) {
//获取所有朋友圈
page = page == null ? 1 : page;
limit = limit == null ? 10 : limit;
AppUserDTO appUserDTO = userBiz.getUserInfo();
Integer userId = null;
if(appUserDTO != null) {
userId = appUserDTO.getImUserid();
} else {
return ObjectRestResponse.createFailedResult(ResultCode.RSTOKEN_EXPIRED_CODE, "token失效");
}
Pageable pageable = PageRequest.of(--page, limit);
List<Integer> ids = new ArrayList<>();
ids.add(2);
ids.add(4);
Query query = new Query(Criteria.where("body.type").in(ids));
query.addCriteria(Criteria.where("userId").is(userId));
int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size();
query.with(pageable);
query.with(new Sort(Sort.Direction.DESC, "time"));
List<Msg> msgList = fetchAndAttach(mongoTemplate.find(query, Msg.class, "s_msg"), userId);
PageInfo<Msg> goodPageInfo = new PageInfo<>(msgList);
goodPageInfo.setPageSize(totalSize%limit == 0 ?totalSize/limit : totalSize/limit + 1);
return ObjectRestResponse.succ(goodPageInfo);
}
/** /**
* 添加评论和点赞 * 添加评论和点赞
* *
......
...@@ -31,4 +31,8 @@ public class MsgController { ...@@ -31,4 +31,8 @@ public class MsgController {
return msgBiz.get(id); return msgBiz.get(id);
} }
@GetMapping(value = "/getByUserId")
public ObjectRestResponse getByUserId(Integer page, Integer limit) {
return msgBiz.getMsgListByUserId(page, limit);
}
} }
...@@ -33,7 +33,7 @@ public class VehicleBookRecordVo extends VehicleBookRecord { ...@@ -33,7 +33,7 @@ public class VehicleBookRecordVo extends VehicleBookRecord {
private Integer liftStatus; private Integer liftStatus;
private Integer retStatus; private Integer retStatus;
private Integer state;
List<VehicleUpkeepItem> vehicleUpkeepItems; List<VehicleUpkeepItem> vehicleUpkeepItems;
} }
...@@ -473,11 +473,14 @@ ...@@ -473,11 +473,14 @@
#{id} #{id}
</foreach>) </foreach>)
</if> </if>
<if test="status != null and status != 0 and status != -1"> <if test="status != null and status != 0 and status != -1 and status != -2">
and v1.status = #{status} and v1.status = #{status}
</if> </if>
<if test="status != null and (status == 0 or status == -1)"> <if test="status != null and status == 0 ">
and v4.state = #{status} and v4.state = 0
</if>
<if test="status != null and status == -1 ">
and v4.state = 1
</if> </if>
and v1.book_user != -2 and v1.book_user != -2
</where> </where>
......
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