站内信,公告
parent
e8c1580de7
commit
5b01abe121
|
|
@ -11,10 +11,10 @@ import lombok.RequiredArgsConstructor;
|
|||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum ProcessStatus implements DictStr {
|
||||
DaiChuLi("DaiChuLi", "待处理"),
|
||||
YiChuLi("YiChuLi", "待处理"),
|
||||
HuLue("HuLue", "忽略");
|
||||
|
||||
PENDING("PENDING", "待处理"),
|
||||
PROCESSING("PROCESSING", "处理中"),
|
||||
PROCESSED("PROCESSED", "已处理"),
|
||||
IGNORED("IGNORED", "已忽略");
|
||||
private final String val;
|
||||
private final String txt;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -315,11 +315,11 @@ public class PaymentController {
|
|||
* 绑定微信账号信息
|
||||
*/
|
||||
@PostMapping("/wechat/bind")
|
||||
public R<?> bindWechatAccount(@RequestParam Long userId, @RequestParam String wxCode) {
|
||||
public R<?> bindWechatAccount(@RequestBody BindParam param) {
|
||||
// 通过userId查询用户账号信息
|
||||
UserAccountEntity userAccount = userAccountService.getOne(
|
||||
Wrappers.<UserAccountEntity>lambdaQuery()
|
||||
.eq(UserAccountEntity::getUserId, userId)
|
||||
.eq(UserAccountEntity::getUserId, param.getUserId())
|
||||
);
|
||||
|
||||
if (userAccount == null) {
|
||||
|
|
@ -327,7 +327,7 @@ public class PaymentController {
|
|||
}
|
||||
|
||||
// 调用微信API获取openId和unionId
|
||||
Code2SessionResult code2SessionResult = WechatUtil.code2Session(new Code2SessionParam().setJs_code(wxCode));
|
||||
Code2SessionResult code2SessionResult = WechatUtil.code2Session(new Code2SessionParam().setJs_code(param.getWxCode()));
|
||||
Integer errcode = code2SessionResult.getErrcode();
|
||||
if (errcode != null && errcode != 0) {
|
||||
log.error("微信登录失败, errcode: {}, errmsg: {}", errcode, code2SessionResult.getErrmsg());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
package com.njzscloud.supervisory.order.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BindParam {
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String wxCode;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package com.njzscloud.supervisory.sys.bulletin.controller;
|
||||
|
||||
import com.njzscloud.common.core.utils.R;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.supervisory.sys.bulletin.pojo.BulletinEntity;
|
||||
import com.njzscloud.supervisory.sys.bulletin.service.BulletinService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公告表
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/bulletin")
|
||||
@RequiredArgsConstructor
|
||||
public class BulletinController {
|
||||
|
||||
private final BulletinService bulletinService;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public R<?> add(@RequestBody BulletinEntity bulletinEntity) {
|
||||
bulletinService.add(bulletinEntity);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@PostMapping("/modify")
|
||||
public R<?> modify(@RequestBody BulletinEntity bulletinEntity) {
|
||||
bulletinService.modify(bulletinEntity);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@PostMapping("/del")
|
||||
public R<?> del(@RequestBody List<Long> ids) {
|
||||
bulletinService.del(ids);
|
||||
return R.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
public R<BulletinEntity> detail(@RequestParam Long id) {
|
||||
return R.success(bulletinService.detail(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
@GetMapping("/paging")
|
||||
public R<PageResult<BulletinEntity>> paging(PageParam pageParam, BulletinEntity bulletinEntity) {
|
||||
return R.success(bulletinService.paging(pageParam, bulletinEntity));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.njzscloud.supervisory.sys.bulletin.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njzscloud.supervisory.sys.bulletin.pojo.BulletinEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 公告表
|
||||
*/
|
||||
@Mapper
|
||||
public interface BulletinMapper extends BaseMapper<BulletinEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package com.njzscloud.supervisory.sys.bulletin.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 公告表
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@TableName("bulletin")
|
||||
public class BulletinEntity {
|
||||
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 封面
|
||||
*/
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 是否启用; 0-->未启用、1-->已启用
|
||||
*/
|
||||
private Boolean enabled;
|
||||
|
||||
/**
|
||||
* 创建人 Id; sys_user.id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Long creatorId;
|
||||
|
||||
/**
|
||||
* 修改人 Id; sys_user.id
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long modifierId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
/**
|
||||
* 是否删除; 0-->未删除、1-->已删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.njzscloud.supervisory.sys.bulletin.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.supervisory.sys.bulletin.pojo.BulletinEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公告表
|
||||
*/
|
||||
public interface BulletinService extends IService<BulletinEntity> {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
void add(BulletinEntity bulletinEntity);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
void modify(BulletinEntity bulletinEntity);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
void del(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
BulletinEntity detail(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
PageResult<BulletinEntity> paging(PageParam pageParam, BulletinEntity bulletinEntity);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.njzscloud.supervisory.sys.bulletin.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njzscloud.common.mp.support.PageParam;
|
||||
import com.njzscloud.common.mp.support.PageResult;
|
||||
import com.njzscloud.supervisory.sys.bulletin.mapper.BulletinMapper;
|
||||
import com.njzscloud.supervisory.sys.bulletin.pojo.BulletinEntity;
|
||||
import com.njzscloud.supervisory.sys.bulletin.service.BulletinService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公告表
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class BulletinServiceImpl extends ServiceImpl<BulletinMapper, BulletinEntity> implements BulletinService {
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@Override
|
||||
public void add(BulletinEntity bulletinEntity) {
|
||||
this.save(bulletinEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@Override
|
||||
public void modify(BulletinEntity bulletinEntity) {
|
||||
this.updateById(bulletinEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@Override
|
||||
public void del(List<Long> ids) {
|
||||
this.removeBatchByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@Override
|
||||
public BulletinEntity detail(Long id) {
|
||||
return this.getById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
@Override
|
||||
public PageResult<BulletinEntity> paging(PageParam pageParam, BulletinEntity bulletinEntity) {
|
||||
return PageResult.of(this.page(pageParam.toPage(), Wrappers.<BulletinEntity>lambdaQuery()
|
||||
.like(StrUtil.isNotBlank(bulletinEntity.getTitle()), BulletinEntity::getTitle, bulletinEntity.getTitle())
|
||||
.eq(bulletinEntity.getDeleted() != null, BulletinEntity::getDeleted, Boolean.FALSE)
|
||||
.eq(bulletinEntity.getEnabled() != null, BulletinEntity::getEnabled, bulletinEntity.getEnabled())
|
||||
.orderByDesc(BulletinEntity::getCreateTime)));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.njzscloud.supervisory.sys.stationletter.constant;
|
||||
|
||||
import com.njzscloud.common.core.ienum.DictStr;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 字典代码:warn_category
|
||||
* 字典名称:预警类型
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum WarnCategory implements DictStr {
|
||||
SAFETY("SAFETY", "订单超时预警"),
|
||||
SPEED("SPEED", "车辆超速预警"),
|
||||
ROUTE("ROUTE", "路线偏离预警"),
|
||||
EQUIPMENT("EQUIPMENT", "GPS异常预警"),
|
||||
;
|
||||
private final String val;
|
||||
private final String txt;
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.njzscloud.supervisory.sys.stationletter.controller;
|
||||
|
||||
import com.njzscloud.common.core.utils.R;
|
||||
import com.njzscloud.supervisory.sys.stationletter.pojo.StationLetterResult;
|
||||
import com.njzscloud.supervisory.sys.stationletter.service.StationLetterService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 站内信控制器
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/station")
|
||||
@RequiredArgsConstructor
|
||||
public class StationLetterController {
|
||||
|
||||
private final StationLetterService stationLetterService;
|
||||
|
||||
/**
|
||||
* 站内信
|
||||
*/
|
||||
@GetMapping("/letter")
|
||||
public R<StationLetterResult> letter() {
|
||||
StationLetterResult result = stationLetterService.getPendingWarnList();
|
||||
return R.success(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.njzscloud.supervisory.sys.stationletter.mapper;
|
||||
|
||||
import com.njzscloud.supervisory.sys.stationletter.pojo.StationLetterEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站内信Mapper接口
|
||||
*/
|
||||
@Mapper
|
||||
public interface StationLetterMapper {
|
||||
|
||||
/**
|
||||
* 查询待处理的预警数据(站内信)
|
||||
*/
|
||||
List<StationLetterEntity> selectPendingWarnList();
|
||||
|
||||
/**
|
||||
* 查询待审核的公司数量
|
||||
*/
|
||||
int selectPendingCompanyCount();
|
||||
|
||||
/**
|
||||
* 查询待审核的车辆数量
|
||||
*/
|
||||
int selectPendingTruckCount();
|
||||
|
||||
/**
|
||||
* 查询待审核的项目数量
|
||||
*/
|
||||
int selectPendingProjectCount();
|
||||
|
||||
/**
|
||||
* 查询待审核的司机数量
|
||||
*/
|
||||
int selectPendingDriverCount();
|
||||
|
||||
/**
|
||||
* 查询待审核的订单数量
|
||||
*/
|
||||
int selectPendingOrderCount();
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.njzscloud.supervisory.sys.stationletter.pojo;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 站内信实体类
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class AuditResult {
|
||||
|
||||
|
||||
/**
|
||||
* 模块类型: company/truck/project/driver/order
|
||||
*/
|
||||
private String moduleType;
|
||||
|
||||
/**
|
||||
* 待审核名称
|
||||
*/
|
||||
private String auditName;
|
||||
|
||||
/**
|
||||
* 待审核数量数量
|
||||
*/
|
||||
private Integer count;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.njzscloud.supervisory.sys.stationletter.pojo;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 站内信实体类
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class StationLetterEntity {
|
||||
|
||||
/**
|
||||
* 预警ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
private String warnCategory;
|
||||
|
||||
/**
|
||||
* 预警类型中文名称
|
||||
*/
|
||||
private String warnCategoryName;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String licensePlate;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.njzscloud.supervisory.sys.stationletter.pojo;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站内信实体类
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@Accessors(chain = true)
|
||||
public class StationLetterResult {
|
||||
|
||||
private List<StationLetterEntity> warnList;
|
||||
|
||||
private List<AuditResult> auditResultList;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.njzscloud.supervisory.sys.stationletter.service;
|
||||
|
||||
import com.njzscloud.supervisory.sys.stationletter.pojo.StationLetterResult;
|
||||
|
||||
/**
|
||||
* 站内信服务接口
|
||||
*/
|
||||
public interface StationLetterService {
|
||||
|
||||
/**
|
||||
* 获取待处理的预警数据(站内信)
|
||||
*/
|
||||
StationLetterResult getPendingWarnList();
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package com.njzscloud.supervisory.sys.stationletter.service.impl;
|
||||
|
||||
import com.njzscloud.supervisory.sys.stationletter.constant.WarnCategory;
|
||||
import com.njzscloud.supervisory.sys.stationletter.mapper.StationLetterMapper;
|
||||
import com.njzscloud.supervisory.sys.stationletter.pojo.AuditResult;
|
||||
import com.njzscloud.supervisory.sys.stationletter.pojo.StationLetterEntity;
|
||||
import com.njzscloud.supervisory.sys.stationletter.pojo.StationLetterResult;
|
||||
import com.njzscloud.supervisory.sys.stationletter.service.StationLetterService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站内信服务实现类
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class StationLetterServiceImpl implements StationLetterService {
|
||||
|
||||
private final StationLetterMapper stationLetterMapper;
|
||||
|
||||
@Override
|
||||
public StationLetterResult getPendingWarnList() {
|
||||
StationLetterResult result = new StationLetterResult();
|
||||
List<StationLetterEntity> entities = stationLetterMapper.selectPendingWarnList();
|
||||
for (StationLetterEntity entity : entities) {
|
||||
// 通过枚举类设置预警类型中文名称
|
||||
String warnCategoryName = getWarnCategoryName(entity.getWarnCategory());
|
||||
entity.setWarnCategoryName(warnCategoryName);
|
||||
}
|
||||
result.setWarnList(entities);
|
||||
List<AuditResult> auditResults = Lists.newArrayList();
|
||||
|
||||
// 1.查询未删除并且待审核的公司数量,表为biz_company
|
||||
int companyCount = stationLetterMapper.selectPendingCompanyCount();
|
||||
AuditResult companyAudit = new AuditResult();
|
||||
companyAudit.setModuleType("company");
|
||||
companyAudit.setAuditName("待审核公司");
|
||||
companyAudit.setCount(companyCount);
|
||||
auditResults.add(companyAudit);
|
||||
|
||||
// 2.查询未删除并且待审核的车辆数量,表为biz_truck
|
||||
int truckCount = stationLetterMapper.selectPendingTruckCount();
|
||||
AuditResult truckAudit = new AuditResult();
|
||||
truckAudit.setModuleType("truck");
|
||||
truckAudit.setAuditName("待审核车辆");
|
||||
truckAudit.setCount(truckCount);
|
||||
auditResults.add(truckAudit);
|
||||
|
||||
// 3.查询未删除并且待审核的项目数量,表为biz_project
|
||||
int projectCount = stationLetterMapper.selectPendingProjectCount();
|
||||
AuditResult projectAudit = new AuditResult();
|
||||
projectAudit.setModuleType("project");
|
||||
projectAudit.setAuditName("待审核项目");
|
||||
projectAudit.setCount(projectCount);
|
||||
auditResults.add(projectAudit);
|
||||
|
||||
// 4.查询未删除并且待审核的司机数量,表为biz_driver
|
||||
int driverCount = stationLetterMapper.selectPendingDriverCount();
|
||||
AuditResult driverAudit = new AuditResult();
|
||||
driverAudit.setModuleType("driver");
|
||||
driverAudit.setAuditName("待审核司机");
|
||||
driverAudit.setCount(driverCount);
|
||||
auditResults.add(driverAudit);
|
||||
|
||||
// 5.查询未删除并且待审核的订单数量,表为order_info
|
||||
int orderCount = stationLetterMapper.selectPendingOrderCount();
|
||||
AuditResult orderAudit = new AuditResult();
|
||||
orderAudit.setModuleType("order");
|
||||
orderAudit.setAuditName("待审核订单");
|
||||
orderAudit.setCount(orderCount);
|
||||
auditResults.add(orderAudit);
|
||||
|
||||
result.setAuditResultList(auditResults);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据预警类型代码获取中文名称
|
||||
*/
|
||||
private String getWarnCategoryName(String warnCategory) {
|
||||
if (warnCategory == null) {
|
||||
return "未知类型";
|
||||
}
|
||||
|
||||
for (WarnCategory category : WarnCategory.values()) {
|
||||
if (category.getVal().equals(warnCategory)) {
|
||||
return category.getTxt();
|
||||
}
|
||||
}
|
||||
return "未知类型";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njzscloud.supervisory.sys.bulletin.mapper.BulletinMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.njzscloud.supervisory.sys.bulletin.pojo.BulletinEntity">
|
||||
<id column="id" property="id" />
|
||||
<result column="title" property="title" />
|
||||
<result column="picture" property="picture" />
|
||||
<result column="enabled" property="enabled" />
|
||||
<result column="creator_id" property="creatorId" />
|
||||
<result column="modifier_id" property="modifierId" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
<result column="deleted" property="deleted" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, title, picture, enabled, creator_id, modifier_id, create_time, modify_time, deleted
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.njzscloud.supervisory.sys.stationletter.mapper.StationLetterMapper">
|
||||
|
||||
<resultMap id="StationLetterResultMap" type="com.njzscloud.supervisory.sys.stationletter.pojo.StationLetterEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="warnCategoryName" column="warn_category_name"/>
|
||||
<result property="warnCategory" column="warn_category"/>
|
||||
<result property="licensePlate" column="license_plate"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectPendingWarnList" resultMap="StationLetterResultMap">
|
||||
SELECT
|
||||
bw.id,
|
||||
bw.warn_category,
|
||||
bt.license_plate,
|
||||
bw.create_time
|
||||
FROM biz_warn bw
|
||||
LEFT JOIN order_info oi ON bw.order_id = oi.id AND oi.deleted = 0
|
||||
LEFT JOIN biz_truck bt ON oi.truck_id = bt.id AND bt.deleted = 0
|
||||
WHERE bw.process_status = 'PENDING'
|
||||
AND bw.deleted = 0
|
||||
ORDER BY bw.create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询待审核的公司数量 -->
|
||||
<select id="selectPendingCompanyCount" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM biz_company
|
||||
WHERE deleted = 0 AND audit_status = 'DaiShenHe'
|
||||
</select>
|
||||
|
||||
<!-- 查询待审核的车辆数量 -->
|
||||
<select id="selectPendingTruckCount" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM biz_truck
|
||||
WHERE deleted = 0 AND audit_status = 'DaiShenHe'
|
||||
</select>
|
||||
|
||||
<!-- 查询待审核的项目数量 -->
|
||||
<select id="selectPendingProjectCount" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM biz_project
|
||||
WHERE deleted = 0 AND audit_status = 'DaiShenHe'
|
||||
</select>
|
||||
|
||||
<!-- 查询待审核的司机数量 -->
|
||||
<select id="selectPendingDriverCount" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM biz_driver
|
||||
WHERE deleted = 0 AND audit_status = 'DaiShenHe'
|
||||
</select>
|
||||
|
||||
<!-- 查询待审核的订单数量 -->
|
||||
<select id="selectPendingOrderCount" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM order_info
|
||||
WHERE deleted = 0 AND audit_status = 'DaiShenHe'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue