openid去重
parent
22dd3330dc
commit
9b4cbe5d8a
|
|
@ -41,11 +41,6 @@ public class BizPatrolReportEntity {
|
||||||
*/
|
*/
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
/**
|
|
||||||
* 车牌
|
|
||||||
*/
|
|
||||||
private String licensePlate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上报时间
|
* 上报时间
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,4 @@ public class SearchBizPatrolReportParam {
|
||||||
*/
|
*/
|
||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
/**
|
|
||||||
* 车牌
|
|
||||||
*/
|
|
||||||
private String licensePlate;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 巡查上报
|
* 巡查上报
|
||||||
|
*
|
||||||
* @author ljw
|
* @author ljw
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
@ -83,12 +84,10 @@ public class BizPatrolReportService extends ServiceImpl<BizPatrolReportMapper, B
|
||||||
public PageResult<BizPatrolReportEntity> paging(PageParam pageParam, SearchBizPatrolReportParam searchParam) {
|
public PageResult<BizPatrolReportEntity> paging(PageParam pageParam, SearchBizPatrolReportParam searchParam) {
|
||||||
String contact = searchParam.getContact();
|
String contact = searchParam.getContact();
|
||||||
String phone = searchParam.getPhone();
|
String phone = searchParam.getPhone();
|
||||||
String licensePlate = searchParam.getLicensePlate();
|
|
||||||
|
|
||||||
Page<BizPatrolReportEntity> page = this.page(pageParam.toPage(), Wrappers.<BizPatrolReportEntity>lambdaQuery()
|
Page<BizPatrolReportEntity> page = this.page(pageParam.toPage(), Wrappers.<BizPatrolReportEntity>lambdaQuery()
|
||||||
.like(StrUtil.isNotBlank(contact), BizPatrolReportEntity::getContact, contact)
|
.like(StrUtil.isNotBlank(contact), BizPatrolReportEntity::getContact, contact)
|
||||||
.like(StrUtil.isNotBlank(phone), BizPatrolReportEntity::getPhone, phone)
|
.like(StrUtil.isNotBlank(phone), BizPatrolReportEntity::getPhone, phone)
|
||||||
.like(StrUtil.isNotBlank(licensePlate), BizPatrolReportEntity::getLicensePlate, licensePlate)
|
|
||||||
.orderByDesc(BizPatrolReportEntity::getCreateTime));
|
.orderByDesc(BizPatrolReportEntity::getCreateTime));
|
||||||
return PageResult.of(page);
|
return PageResult.of(page);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import cn.hutool.core.thread.ThreadUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.extra.qrcode.QrCodeUtil;
|
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||||
import cn.hutool.extra.qrcode.QrConfig;
|
import cn.hutool.extra.qrcode.QrConfig;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
|
@ -877,14 +876,19 @@ public class OrderInfoService extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
|
||||||
param.setGoodsName(entity.getGoodsName());
|
param.setGoodsName(entity.getGoodsName());
|
||||||
BizTruckEntity truckEntity = bizTruckService.getById(truckId);
|
BizTruckEntity truckEntity = bizTruckService.getById(truckId);
|
||||||
param.setLicensePlate(truckEntity.getLicensePlate());
|
param.setLicensePlate(truckEntity.getLicensePlate());
|
||||||
|
Set<String> openId = new HashSet<>();
|
||||||
|
UserEntity orderUserEntity = userService.getById(orderInfo.getUserId());
|
||||||
|
param.setCfCompanyName(orderUserEntity.getNickname());
|
||||||
for (SysUserRoleEntity userRoleEntity : userIds) {
|
for (SysUserRoleEntity userRoleEntity : userIds) {
|
||||||
UserEntity userEntity = userService.getById(orderInfo.getUserId());
|
UserEntity userEntity = userService.getById(userRoleEntity.getUserId());
|
||||||
if (null != userEntity) {
|
if (null != userEntity && !Strings.isNullOrEmpty(userEntity.getOpenid())) {
|
||||||
|
if (openId.add(userEntity.getOpenid())) {
|
||||||
param.setUserId(userRoleEntity.getUserId());
|
param.setUserId(userRoleEntity.getUserId());
|
||||||
param.setCfCompanyName(userEntity.getNickname());
|
log.info("发送审核通知模板消息,参数:{}", param);
|
||||||
wechatTemplateMessageService.sendTemplateMessage(param);
|
wechatTemplateMessageService.sendTemplateMessage(param);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.info("未查到用户信息:" + userRoleEntity.getUserId());
|
log.info("未查到用户信息:{}", userRoleEntity.getUserId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue