Merge remote-tracking branch 'origin/ah-simple' into ah-simple
# Conflicts: # bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/domain/OrderInfoDto.java
This commit is contained in:
commit
3827dad74a
|
|
@ -45,6 +45,20 @@ public class BmMessageController extends BaseController {
|
||||||
List<BmMessage> list = bmMessageService.selectBmMessageListFromCache(bmMessage);
|
List<BmMessage> list = bmMessageService.selectBmMessageListFromCache(bmMessage);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据所属公司查询消息未读数量
|
||||||
|
* @param bmMessage
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据所属公司查询消息未读数量")
|
||||||
|
//@RequiresPermissions("basic:message:list")
|
||||||
|
@GetMapping("/getNoReadNum")
|
||||||
|
public AjaxResult getNoReadNum(BmMessage bmMessage) {
|
||||||
|
BmMessage message = bmMessageService.getNoReadNum(bmMessage);
|
||||||
|
return AjaxResult.success(message);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询消息列表")
|
@ApiOperation(value = "查询消息列表")
|
||||||
//@RequiresPermissions("basic:message:list")
|
//@RequiresPermissions("basic:message:list")
|
||||||
@GetMapping("/listOneToOne")
|
@GetMapping("/listOneToOne")
|
||||||
|
|
|
||||||
|
|
@ -80,4 +80,7 @@ public class BmMessage extends BaseEntity {
|
||||||
@ApiModelProperty(value = "是否已读(0:未读 1:已读)")
|
@ApiModelProperty(value = "是否已读(0:未读 1:已读)")
|
||||||
private Integer isRead;
|
private Integer isRead;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "消息未读数量")
|
||||||
|
private Integer isNoRead;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,4 +62,11 @@ public interface BmMessageMapper {
|
||||||
public int deleteBmMessageByIds(Long[] ids);
|
public int deleteBmMessageByIds(Long[] ids);
|
||||||
|
|
||||||
List<DeptDto> getdeptIds();
|
List<DeptDto> getdeptIds();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据所属公司查询消息未读数量
|
||||||
|
* @param bmMessage
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BmMessage getNoReadNum(BmMessage bmMessage);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,4 +65,11 @@ public interface IBmMessageService {
|
||||||
public int deleteBmMessageById(Long id);
|
public int deleteBmMessageById(Long id);
|
||||||
|
|
||||||
List<BmMessage> selectBmMessageListFromCacheOne(BmMessage bmMessage) throws JsonProcessingException;
|
List<BmMessage> selectBmMessageListFromCacheOne(BmMessage bmMessage) throws JsonProcessingException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据所属公司查询消息未读数量
|
||||||
|
* @param bmMessage
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BmMessage getNoReadNum(BmMessage bmMessage);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,17 @@ public class BmMessageServiceImpl implements IBmMessageService {
|
||||||
return sortedList;
|
return sortedList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据所属公司查询消息未读数量
|
||||||
|
* @param bmMessage
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BmMessage getNoReadNum(BmMessage bmMessage) {
|
||||||
|
bmMessage.setToCompany(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||||
|
return bmMessageMapper.getNoReadNum(bmMessage);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增消息
|
* 新增消息
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -43,7 +44,8 @@ public class DevInfoVo extends DevInfo {
|
||||||
private String companyLogoUrl;
|
private String companyLogoUrl;
|
||||||
|
|
||||||
@ApiModelProperty(value = "公司入驻时间")
|
@ApiModelProperty(value = "公司入驻时间")
|
||||||
private String companyCreateTime;
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date companyCreateTime;
|
||||||
|
|
||||||
@ApiModelProperty(value = "公司上架数量")
|
@ApiModelProperty(value = "公司上架数量")
|
||||||
private Long companyUpNum;
|
private Long companyUpNum;
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,25 @@ public class OrderInfoDto {
|
||||||
|
|
||||||
private BigDecimal totalRealPrice;
|
private BigDecimal totalRealPrice;
|
||||||
|
|
||||||
private Integer orderCount;
|
/**
|
||||||
|
* 订单总数
|
||||||
|
*/
|
||||||
|
private Integer orderCount = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁中订单总数
|
||||||
|
*/
|
||||||
|
private Integer leaseOrderCount = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成订单总数
|
||||||
|
*/
|
||||||
|
private Integer completeOrderCount = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单号查询
|
||||||
|
*/
|
||||||
|
private String keyWord;
|
||||||
|
|
||||||
private String deviceNames;
|
private String deviceNames;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -241,6 +241,20 @@ public class OrderServiceImpl implements OrderService {
|
||||||
dto.setBuyerCompany(SecurityUtils.getLoginUser().getSysUser().getCompanyId().intValue());
|
dto.setBuyerCompany(SecurityUtils.getLoginUser().getSysUser().getCompanyId().intValue());
|
||||||
}
|
}
|
||||||
List<OrderInfoDto> orderInfoDto = orderMapper.getOrderStatusCount(dto);
|
List<OrderInfoDto> orderInfoDto = orderMapper.getOrderStatusCount(dto);
|
||||||
|
int total = 0;
|
||||||
|
OrderInfoDto infoDto = new OrderInfoDto();
|
||||||
|
if (!CollectionUtils.isEmpty(orderInfoDto)) {
|
||||||
|
for (OrderInfoDto info : orderInfoDto) {
|
||||||
|
if (info.getOrderStatus().equals(OrderStatusEnum.ORDER_AWAITING_RECEIPT.getStatus().toString())) {
|
||||||
|
infoDto.setLeaseOrderCount(info.getOrderCount());
|
||||||
|
} else if (info.getOrderStatus().equals(OrderStatusEnum.ORDER_FINISHED.getStatus().toString())) {
|
||||||
|
infoDto.setCompleteOrderCount(info.getOrderCount());
|
||||||
|
}
|
||||||
|
total += info.getOrderCount();
|
||||||
|
}
|
||||||
|
infoDto.setOrderCount(total);
|
||||||
|
}
|
||||||
|
orderInfoDto.add(0, infoDto);
|
||||||
return orderInfoDto;
|
return orderInfoDto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN sys_dept sd1 ON sd1.dept_id = subquery.first_ancestor
|
LEFT JOIN sys_dept sd1 ON sd1.dept_id = subquery.first_ancestor
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getNoReadNum" resultType="com.bonus.material.basic.domain.BmMessage">
|
||||||
|
select count(*) as isNoRead from bm_message where to_company = #{toCompany} and is_read = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertBmMessage" parameterType="com.bonus.material.basic.domain.BmMessage" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertBmMessage" parameterType="com.bonus.material.basic.domain.BmMessage" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into bm_message
|
insert into bm_message
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_dept up on up.dept_id = mdi.own_co
|
left join sys_dept up on up.dept_id = mdi.own_co
|
||||||
WHERE
|
WHERE
|
||||||
mt.del_flag = '0'
|
mt.del_flag = '0'
|
||||||
|
<if test="keyWord!=null and keyWord!=''">
|
||||||
|
and moi.code like concat('%',#{keyWord},'%')
|
||||||
|
</if>
|
||||||
<if test="buyerCompany != null">
|
<if test="buyerCompany != null">
|
||||||
AND moi.buyer_company = #{buyerCompany}
|
AND moi.buyer_company = #{buyerCompany}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue