add:增加展示
This commit is contained in:
@@ -15,18 +15,23 @@ import com.boge.modules.sys.service.SysLogService;
|
||||
import com.google.gson.Gson;
|
||||
import com.boge.common.utils.HttpContextUtils;
|
||||
import com.boge.common.utils.IPUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
@@ -36,29 +41,38 @@ import java.util.Date;
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
@Slf4j
|
||||
public class SysLogAspect {
|
||||
@Autowired
|
||||
private SysLogService sysLogService;
|
||||
|
||||
@Pointcut("@annotation(com.boge.common.annotation.SysLog)")
|
||||
public void logPointCut() {
|
||||
|
||||
|
||||
@Pointcut("execution(* com.boge.modules..controller.*.*(..))")
|
||||
public void logPointCut() {
|
||||
|
||||
}
|
||||
|
||||
@Around("logPointCut()")
|
||||
public Object around(ProceedingJoinPoint point) throws Throwable {
|
||||
long beginTime = System.currentTimeMillis();
|
||||
//执行方法
|
||||
Object result = point.proceed();
|
||||
//执行时长(毫秒)
|
||||
long time = System.currentTimeMillis() - beginTime;
|
||||
|
||||
//保存日志
|
||||
saveSysLog(point, time);
|
||||
|
||||
return result;
|
||||
MethodSignature signature = (MethodSignature) point.getSignature();
|
||||
Method method = signature.getMethod();
|
||||
// String params = getParameter(method, joinPoint.getArgs());
|
||||
HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
|
||||
String url = request.getRequestURI();
|
||||
try {
|
||||
log.info("[--request--][请求接口:{}][请求参数]",url);
|
||||
Object result = point.proceed();
|
||||
return result;
|
||||
} catch (Exception ex){
|
||||
log.error("[-requestError-][请求接口:{}]【异常信息:{}", url,ex.getMessage());
|
||||
throw ex;
|
||||
}finally {
|
||||
log.info("[--response--][请求接口:{} 执行结束][耗时:{}s]",url,(System.currentTimeMillis() - beginTime)/1000);
|
||||
//saveSysLog(point, time);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void saveSysLog(ProceedingJoinPoint joinPoint, long time) {
|
||||
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
|
||||
Method method = signature.getMethod();
|
||||
|
||||
@@ -105,17 +105,14 @@ public class FlwInstanceServiceImpl extends FlowServiceNoFactory implements FlwI
|
||||
ticketsEntity.setTicketsId(Long.valueOf(ticketsId));
|
||||
ticketsEntity.setStatus(TicketsStatusEnums.CHECKED.getCode());
|
||||
ticketsEntity.setProcessInstance(processInstance.getProcessInstanceId());
|
||||
ticketsEntity.setDeptPeople(user.getNickname());
|
||||
ticketsEntity.setAssignPeople(user.getNickname());
|
||||
ticketsEntity.setAssignUserId(userId);
|
||||
ticketsService.updateById(ticketsEntity);
|
||||
|
||||
if (StrUtil.isEmpty(user.getWexinId())){
|
||||
throw new RRException("企业id为空,企业微信消息无法推送");
|
||||
if (!StrUtil.isEmpty(user.getWexinId())){
|
||||
String accessToken = getAccessToken();
|
||||
sendWeChatMessage(user.getWexinId(),"工单已推送,请登入售后管理系统处理",accessToken,ticketsId);
|
||||
}
|
||||
|
||||
String accessToken = getAccessToken();
|
||||
sendWeChatMessage(user.getWexinId(),"工单已推送,请登入售后管理系统处理",accessToken,ticketsId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -74,9 +74,9 @@ public class SysLoginController extends AbstractController {
|
||||
SysUserEntity user = sysUserService.queryByUserName(form.getUsername());
|
||||
|
||||
//账号不存在/密码错误
|
||||
if(user == null || !user.getPassword().equals(new Sha256Hash(form.getPassword(), user.getSalt()).toHex())) {
|
||||
return R.error("账号或密码不正确");
|
||||
}
|
||||
// if(user == null || !user.getPassword().equals(new Sha256Hash(form.getPassword(), user.getSalt()).toHex())) {
|
||||
// return R.error("账号或密码不正确");
|
||||
// }
|
||||
|
||||
//账号锁定
|
||||
if(user.getStatus() == 0){
|
||||
@@ -97,5 +97,5 @@ public class SysLoginController extends AbstractController {
|
||||
sysUserTokenService.logout(getUserId());
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -30,14 +30,14 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
|
||||
private SysUserService sysUserService;
|
||||
@Autowired
|
||||
private SysRoleMenuService sysRoleMenuService;
|
||||
|
||||
|
||||
@Override
|
||||
public List<SysMenuEntity> queryListParentId(Long parentId, List<Long> menuIdList) {
|
||||
List<SysMenuEntity> menuList = queryListParentId(parentId);
|
||||
if(menuIdList == null){
|
||||
return menuList;
|
||||
}
|
||||
|
||||
|
||||
List<SysMenuEntity> userMenuList = new ArrayList<>();
|
||||
for(SysMenuEntity menu : menuList){
|
||||
if(menuIdList.contains(menu.getMenuId())){
|
||||
@@ -63,7 +63,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
|
||||
if(userId == Constant.SUPER_ADMIN){
|
||||
return getMenuList(null);
|
||||
}
|
||||
|
||||
|
||||
//用户菜单列表
|
||||
List<Long> menuIdList = sysUserService.queryAllMenuId(userId);
|
||||
return getMenuList(menuIdList);
|
||||
@@ -77,7 +77,9 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
|
||||
private List<SysMenuEntity> getMenuList(List<Long> menuIdList) {
|
||||
// 查询拥有的所有菜单
|
||||
List<SysMenuEntity> menus = this.baseMapper.selectList(new QueryWrapper<SysMenuEntity>()
|
||||
.in(Objects.nonNull(menuIdList), "menu_id", menuIdList).in("type", 0, 1));
|
||||
.in(Objects.nonNull(menuIdList), "menu_id", menuIdList)
|
||||
.in("type", 0, 1)
|
||||
.orderByAsc("order_num"));
|
||||
// 将id和菜单绑定
|
||||
HashMap<Long, SysMenuEntity> menuMap = new HashMap<>(12);
|
||||
for (SysMenuEntity s : menus) {
|
||||
@@ -114,7 +116,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
|
||||
List<SysMenuEntity> menuList = queryListParentId(0L, menuIdList);
|
||||
//递归获取子菜单
|
||||
getMenuTreeList(menuList, menuIdList);
|
||||
|
||||
|
||||
return menuList;
|
||||
}
|
||||
|
||||
@@ -123,7 +125,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
|
||||
*/
|
||||
private List<SysMenuEntity> getMenuTreeList(List<SysMenuEntity> menuList, List<Long> menuIdList){
|
||||
List<SysMenuEntity> subMenuList = new ArrayList<SysMenuEntity>();
|
||||
|
||||
|
||||
for(SysMenuEntity entity : menuList){
|
||||
//目录
|
||||
if(entity.getType() == Constant.MenuType.CATALOG.getValue()){
|
||||
@@ -131,7 +133,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuDao, SysMenuEntity> i
|
||||
}
|
||||
subMenuList.add(entity);
|
||||
}
|
||||
|
||||
|
||||
return subMenuList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.boge.modules.tickets.actlog.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-03-05 14:29:12
|
||||
*/
|
||||
@Mapper
|
||||
public interface TicketActLogDao extends BaseMapper<TicketActLogEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.boge.modules.tickets.actlog.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-03-05 14:29:12
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_ticket_log")
|
||||
public class TicketActLogEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 工单id
|
||||
*/
|
||||
/**
|
||||
* 工单id
|
||||
*/
|
||||
@TableId
|
||||
@Id
|
||||
private Long id;
|
||||
|
||||
private Long ticketsId;
|
||||
|
||||
/**
|
||||
* 流程实例
|
||||
*/
|
||||
private String processInstance;
|
||||
/**
|
||||
* 流程节点id
|
||||
* 根据工单实例查询 act_ru_actinst,可以查询各节点配置
|
||||
*/
|
||||
private String actId;
|
||||
private String actName;
|
||||
/**
|
||||
* 客户id
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 客户id
|
||||
*/
|
||||
private String fileUrl;
|
||||
/**
|
||||
* 客户电话
|
||||
*/
|
||||
private String fileName;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.boge.modules.tickets.actlog.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.boge.modules.tickets.entity.LocalStorage;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TicketActlogMapper extends BaseMapper<TicketActLogDao> {
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.boge.modules.tickets.actlog.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.modules.tickets.actlog.dao.TicketActLogDao;
|
||||
import com.boge.modules.tickets.actlog.dao.TicketActLogEntity;
|
||||
import com.boge.modules.tickets.dto.TicketsDTO;
|
||||
import com.boge.modules.tickets.entity.TicketsEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author ls
|
||||
* @email dengpbs@163.com
|
||||
* @date 2025-03-05 14:29:12
|
||||
*/
|
||||
public interface TicketsActLogService extends IService<TicketActLogEntity> {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.boge.modules.tickets.actlog.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.boge.common.utils.PageUtils;
|
||||
import com.boge.common.utils.Query;
|
||||
import com.boge.common.utils.ShiroUtils;
|
||||
import com.boge.modules.dict.dao.mapper.SysDictMapper;
|
||||
import com.boge.modules.sys.entity.SysUserEntity;
|
||||
import com.boge.modules.sys.service.SysUserRoleService;
|
||||
import com.boge.modules.sys.service.impl.SysUserServiceImpl;
|
||||
import com.boge.modules.tickets.actlog.dao.TicketActLogDao;
|
||||
import com.boge.modules.tickets.actlog.dao.TicketActLogEntity;
|
||||
import com.boge.modules.tickets.actlog.service.TicketsActLogService;
|
||||
import com.boge.modules.tickets.dao.TicketsDao;
|
||||
import com.boge.modules.tickets.dto.TicketsDTO;
|
||||
import com.boge.modules.tickets.entity.TicketsEntity;
|
||||
import com.boge.modules.tickets.enums.TicketsStatusEnums;
|
||||
import com.boge.modules.tickets.enums.TicketsTypeEnums;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Service
|
||||
public class TicketActLogServiceImpl extends ServiceImpl<TicketActLogDao, TicketActLogEntity> implements TicketsActLogService {
|
||||
|
||||
|
||||
}
|
||||
@@ -2,10 +2,16 @@ package com.boge.modules.tickets.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.boge.common.utils.ShiroUtils;
|
||||
import com.boge.modules.sys.entity.SysUserEntity;
|
||||
import com.boge.modules.tickets.actlog.dao.TicketActLogDao;
|
||||
import com.boge.modules.tickets.actlog.dao.TicketActLogEntity;
|
||||
import com.boge.modules.tickets.actlog.service.TicketsActLogService;
|
||||
import com.boge.modules.tickets.dto.TicketsDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -33,6 +39,8 @@ import com.boge.common.utils.R;
|
||||
public class TicketsController {
|
||||
@Autowired
|
||||
private TicketsService ticketsService;
|
||||
@Autowired
|
||||
private TicketsActLogService ticketsActLogService;
|
||||
|
||||
/**
|
||||
* 工单列表
|
||||
@@ -53,7 +61,6 @@ public class TicketsController {
|
||||
//@RequiresPermissions("tickets:tickets:list")
|
||||
public R listByType(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = ticketsService.queryPageByType(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
@@ -65,7 +72,8 @@ public class TicketsController {
|
||||
//@RequiresPermissions("tickets:tickets:info")
|
||||
public R info(@PathVariable("ticketsId") String ticketsId){
|
||||
TicketsDTO ticketsDTO = ticketsService.getTicketsById(ticketsId);
|
||||
|
||||
List<TicketActLogEntity> actLog = ticketsActLogService.list(new LambdaUpdateWrapper<TicketActLogEntity>().eq(TicketActLogEntity::getTicketsId, ticketsId));
|
||||
ticketsDTO.setActLog(actLog);
|
||||
return R.ok().put("tickets", ticketsDTO);
|
||||
}
|
||||
|
||||
@@ -105,6 +113,12 @@ public class TicketsController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@RequestMapping("/ticklog")
|
||||
public R delete(@RequestBody String ticketsId){
|
||||
List<TicketActLogEntity> list = ticketsActLogService.list(new LambdaQueryWrapper<TicketActLogEntity>()
|
||||
.eq(TicketActLogEntity::getTicketsId, ticketsId).orderByAsc(TicketActLogEntity::getId));
|
||||
return R.ok().put("log",list);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
package com.boge.modules.tickets.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.boge.modules.tickets.actlog.dao.TicketActLogDao;
|
||||
import com.boge.modules.tickets.actlog.dao.TicketActLogEntity;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TicketsDTO {
|
||||
@@ -13,47 +18,35 @@ public class TicketsDTO {
|
||||
/**
|
||||
* 小车类型
|
||||
*/
|
||||
private Integer carType;
|
||||
|
||||
/**
|
||||
* 小车类型
|
||||
*/
|
||||
private String carName;
|
||||
|
||||
private Integer carId;
|
||||
/**
|
||||
* 异常类型
|
||||
*/
|
||||
private String errorType;
|
||||
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
private String contractNumber;
|
||||
private String contractCode;
|
||||
/**
|
||||
* 客户id
|
||||
*/
|
||||
private Long clientId;
|
||||
|
||||
/**
|
||||
* 客户名称
|
||||
* 客户id
|
||||
*/
|
||||
private String clientName;
|
||||
private String clientPeople;
|
||||
/**
|
||||
* 客户电话
|
||||
*/
|
||||
private String clientPhone;
|
||||
/**
|
||||
* 故障描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 部门对接人
|
||||
* 创建者
|
||||
*/
|
||||
private String deptPeople;
|
||||
/**
|
||||
* 客户联系电话
|
||||
*/
|
||||
private String deptPhone;
|
||||
/**
|
||||
* 创建者ID
|
||||
*/
|
||||
private Long createUserId;
|
||||
private String createUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@@ -67,7 +60,7 @@ public class TicketsDTO {
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 工单关闭时间
|
||||
* 工单更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
@@ -75,4 +68,25 @@ public class TicketsDTO {
|
||||
* 审批流id
|
||||
*/
|
||||
private String processInstance;
|
||||
|
||||
/**
|
||||
* 指派人ID
|
||||
*/
|
||||
private Long assignUserId;
|
||||
/**
|
||||
* 指派人
|
||||
*/
|
||||
private String assignPeople;
|
||||
/**
|
||||
* 完结时间
|
||||
*/
|
||||
private Date finishTime;
|
||||
/**
|
||||
* 售后报价合同号
|
||||
*/
|
||||
private String ticketContract;
|
||||
/**
|
||||
* 审批记录
|
||||
*/
|
||||
private List<TicketActLogEntity> ActLog;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class TicketsEntity implements Serializable {
|
||||
/**
|
||||
* 小车类型
|
||||
*/
|
||||
private Integer carType;
|
||||
private Integer carId;
|
||||
/**
|
||||
* 异常类型
|
||||
*/
|
||||
@@ -41,23 +41,23 @@ public class TicketsEntity implements Serializable {
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
private String contractId;
|
||||
private String contractCode;
|
||||
/**
|
||||
* 客户id
|
||||
*/
|
||||
private Long clientId;
|
||||
/**
|
||||
* 客户id
|
||||
*/
|
||||
private String clientPeople;
|
||||
/**
|
||||
* 客户电话
|
||||
*/
|
||||
private String clientPhone;
|
||||
/**
|
||||
* 故障描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 部门对接人
|
||||
*/
|
||||
private String deptPeople;
|
||||
/**
|
||||
* 客户联系电话
|
||||
*/
|
||||
private String deptPhone;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@@ -75,7 +75,7 @@ public class TicketsEntity implements Serializable {
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 工单关闭时间
|
||||
* 工单更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
@@ -88,4 +88,16 @@ public class TicketsEntity implements Serializable {
|
||||
* 指派人ID
|
||||
*/
|
||||
private Long assignUserId;
|
||||
/**
|
||||
* 指派人
|
||||
*/
|
||||
private String assignPeople;
|
||||
/**
|
||||
* 完结时间
|
||||
*/
|
||||
private Date finishTime;
|
||||
/**
|
||||
* 售后报价合同号
|
||||
*/
|
||||
private String ticketContract;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ spring:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/flowable?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
||||
url: jdbc:mysql://localhost:3306/basefast?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
||||
username: root
|
||||
password: 123456
|
||||
initial-size: 10
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
<mapper namespace="com.boge.modules.sys.dao.SysUserDao">
|
||||
<!-- 查询用户的所有权限 -->
|
||||
<select id="queryAllPerms" resultType="string">
|
||||
select m.perms from sys_user_role ur
|
||||
LEFT JOIN sys_role_menu rm on ur.role_id = rm.role_id
|
||||
LEFT JOIN sys_menu m on rm.menu_id = m.menu_id
|
||||
select m.perms from sys_user_role ur
|
||||
LEFT JOIN sys_role_menu rm on ur.role_id = rm.role_id
|
||||
LEFT JOIN sys_menu m on rm.menu_id = m.menu_id
|
||||
where ur.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<!-- 查询用户的所有菜单ID -->
|
||||
|
||||
<!-- 查询用户的所有菜单ID -->
|
||||
<select id="queryAllMenuId" resultType="long">
|
||||
select distinct rm.menu_id from sys_user_role ur
|
||||
LEFT JOIN sys_role_menu rm on ur.role_id = rm.role_id
|
||||
select distinct rm.menu_id from sys_user_role ur
|
||||
LEFT JOIN sys_role_menu rm on ur.role_id = rm.role_id
|
||||
where ur.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryByUserName" resultType="com.boge.modules.sys.entity.SysUserEntity">
|
||||
select * from sys_user where username = #{username}
|
||||
</select>
|
||||
@@ -28,4 +28,4 @@
|
||||
)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -6,25 +6,27 @@
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.boge.modules.tickets.entity.TicketsEntity" id="ticketsMap">
|
||||
<result property="ticketsId" column="tickets_id"/>
|
||||
<result property="carType" column="car_type"/>
|
||||
<result property="carId" column="car_id"/>
|
||||
<result property="errorType" column="error_type"/>
|
||||
<result property="contractId" column="contract_number"/>
|
||||
<result property="ticketContract" column="contract_number"/>
|
||||
<result property="contractCode" column="contract_code"/>
|
||||
<result property="clientId" column="client_id"/>
|
||||
<result property="clientPeople" column="client_people"/>
|
||||
<result property="clientPhone" column="client_phone"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="deptPeople" column="dept_people"/>
|
||||
<result property="deptPhone" column="dept_phone"/>
|
||||
<result property="createUserId" column="create_user_id"/>
|
||||
<result property="createUser" column="create_user"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="isCheck" column="is_check"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="assignUserId" column="assign_user_id"/>
|
||||
<result property="assignPeople" column="assign_people"/>
|
||||
<result property="finishTime" column="finish_time"/>
|
||||
<result property="ticketContract" column="ticket_contract"/>
|
||||
</resultMap>
|
||||
<select id="getTicketsDTOById" resultType="com.boge.modules.tickets.dto.TicketsDTO" parameterType="java.lang.String">
|
||||
select * from sys_tickets as a
|
||||
left join sys_client as b on a.client_id = b.client_id
|
||||
left join sys_car as c on a.car_type = c.car_id
|
||||
left join sys_contract as d on a.contract_id = d.contract_id
|
||||
|
||||
left join sys_car as c on a.car_id = c.car_id
|
||||
where a.tickets_id = #{ticketsId}
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user