Commit 340f5456 authored by hanfeng's avatar hanfeng

Merge remote-tracking branch 'origin/dev' into dev

parents 0ce196e1 bdc1737a
......@@ -3,6 +3,7 @@ package com.xxfc.platform.im.biz;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.github.wxiaoqi.security.admin.entity.AppUserLogin;
......@@ -13,6 +14,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.RandomUtil;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.google.common.collect.Lists;
import com.mongodb.client.result.DeleteResult;
import com.mongodb.client.result.UpdateResult;
import com.xxfc.platform.im.dto.CommentVo;
......@@ -88,9 +90,7 @@ public class MsgBiz {
goodPageInfo.setPageSize(totalSize % limit == 0 ? totalSize / limit : totalSize / limit + 1);
return ObjectRestResponse.succ(goodPageInfo);
} else {
List<Integer> ids = new ArrayList<>();
ids.add(2);
ids.add(4);
List<Integer> ids = getType();
query = new Query(Criteria.where("body.type").in(ids).and("visible").is(1));
int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size();
query.with(pageable);
......@@ -113,9 +113,7 @@ public class MsgBiz {
page = page == null ? 1 : page;
limit = limit == null ? 10 : limit;
Pageable pageable = PageRequest.of(--page, limit);
List<Integer> ids = new ArrayList<>();
ids.add(2);
ids.add(4);
List<Integer> ids = getType();
Query query = new Query(Criteria.where("body.type").in(ids).and("count.praise").gt(getNumber()).and("visible").is(1));
int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size();
query.with(pageable);
......@@ -370,6 +368,17 @@ public class MsgBiz {
}
public List<Integer> getType() {
List<Integer> list = Lists.newArrayList();
Dictionary dictionary = thirdFeign.findDictionaryByTypeAndCode(IM_TYPE, DictionaryKey.IM_MSG_TYPE_LIST);
if (dictionary != null && StringUtils.isNotBlank(dictionary.getDetail())) {
log.info("查询IM限制数为字典表的结果为: dictionary = {}", dictionary.toString());
list = JSONArray.parseArray( dictionary.getDetail(), Integer.class);
}
return list;
}
/**
* 后台管理接口
*/
......@@ -427,9 +436,7 @@ public class MsgBiz {
goodPageInfo.setTotal(totalSize);
return ObjectRestResponse.succ(goodPageInfo);
} else {
List<Integer> ids = new ArrayList<>();
ids.add(2);
ids.add(4);
List<Integer> ids = getType();
query = new Query(Criteria.where("body.type").in(ids));
int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size();
query.with(pageable);
......
......@@ -245,7 +245,7 @@ public class OrderCalculateBiz {
//计算违约金
//residueDays * 身份价格
if(realResidueDays > 0) {
if(realResidueDays > 0) { //提前还车
//设置消耗费用列表
for(int i = 0; i < useDays; i++) {
......@@ -275,6 +275,9 @@ public class OrderCalculateBiz {
inProgressVO.setViolateDesc(" 提前还车违约金:"+ violateDesc);
OrderAccountDeduction violateDeduction = orderAccountBiz.initDeduction(inProgressVO.getViolateAmount(), violateDesc, DeductionTypeEnum.VIOLATE_ADVANCE, OrderAccountDeduction.ORIGIN_DEPOSIT);
oad.getDeductions().add(violateDeduction);
}else if (realResidueDays.equals(0)) { //准时还车
//设置消耗费用列表
useAmountList.addAll(Convert.toList(VMCalendarPriceCostDTO.class, realVmcpds));
}else if(realResidueDays < 0 && !isCancel){
//isCancel 表示是否为取消,取消则不计算延期还车(因为没有出车)
//设置消耗费用列表
......
......@@ -37,6 +37,12 @@ public class DictionaryKey {
* IM限制条数
*/
public static final String MSG_LIMIT_NUMBER = "MSG_LIMIT_NUMBER";
/**
*
*/
public static final String IM_MSG_TYPE_LIST = "IM_MSG_TYPE_LIST";
/**
* 支付
*/
......
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