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