From 628951cf106e74f1879430a82e54356fdb0e9a18 Mon Sep 17 00:00:00 2001 From: ls <1793460677@qq.com> Date: Tue, 4 Mar 2025 16:22:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/boge/common/base/BaseDTO.java | 12 +- .../java/com/boge/common/query/BaseQuery.java | 6 +- .../main/java/com/boge/common/utils/R.java | 13 +- .../dept/controller/DeptController.java | 17 +- .../com/boge/modules/dept/dao/SysDept.java | 30 +- .../com/boge/modules/dept/dto/DeptTree.java | 8 +- .../dept/service/impl/SysDeptServiceImpl.java | 22 +- .../java/com/boge/modules/dept/vo/DeptVo.java | 26 +- .../dict/controller/SysDictController.java | 21 +- .../java/com/boge/modules/dict/dao/Dict.java | 21 +- .../dict/service/impl/SysDictServiceImpl.java | 61 ++-- .../flow/controller/FlwDeployController.java | 2 +- .../controller/FlwInstanceController.java | 4 +- .../service/impl/FlwDeployServiceImpl.java | 20 +- .../service/impl/FlwInstanceServiceImpl.java | 158 +++++++++- .../modules/sys/entity/SysUserEntity.java | 4 +- base-vue/package-lock.json | 274 +++++++++++------- 17 files changed, 459 insertions(+), 240 deletions(-) diff --git a/base-fast/src/main/java/com/boge/common/base/BaseDTO.java b/base-fast/src/main/java/com/boge/common/base/BaseDTO.java index 8e8d046..0502dcb 100644 --- a/base-fast/src/main/java/com/boge/common/base/BaseDTO.java +++ b/base-fast/src/main/java/com/boge/common/base/BaseDTO.java @@ -14,20 +14,20 @@ import java.util.Date; @Data public class BaseDTO implements Serializable { - private String create_name; + private String createName; - private String create_id; + private String createId; - private String update_name; + private String updateName; - private String update_id; + private String updateId; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JSONField(format = "yyyy-MM-dd HH:mm:ss") - private Date create_time; + private Date createTime; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JSONField(format = "yyyy-MM-dd HH:mm:ss") - private Date update_time; + private Date updateTime; } diff --git a/base-fast/src/main/java/com/boge/common/query/BaseQuery.java b/base-fast/src/main/java/com/boge/common/query/BaseQuery.java index df8c26f..59726d1 100644 --- a/base-fast/src/main/java/com/boge/common/query/BaseQuery.java +++ b/base-fast/src/main/java/com/boge/common/query/BaseQuery.java @@ -26,12 +26,12 @@ public class BaseQuery { /** * 是否启用 */ - private String is_used; + private String isUsed; /** * 创建时间范围查询 */ - private String start_time; - private String end_time; + private String startTime; + private String endTime; /** diff --git a/base-fast/src/main/java/com/boge/common/utils/R.java b/base-fast/src/main/java/com/boge/common/utils/R.java index 23da79c..8187a8e 100644 --- a/base-fast/src/main/java/com/boge/common/utils/R.java +++ b/base-fast/src/main/java/com/boge/common/utils/R.java @@ -20,20 +20,20 @@ import java.util.Map; */ public class R extends HashMap { private static final long serialVersionUID = 1L; - + public R() { put("code", 0); put("msg", "success"); } - + public static R error() { return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员"); } - + public static R error(String msg) { return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg); } - + public static R error(int code, String msg) { R r = new R(); r.put("code", code); @@ -44,15 +44,16 @@ public class R extends HashMap { public static R ok(String msg) { R r = new R(); r.put("msg", msg); + r.put("code", 200); return r; } - + public static R ok(Map map) { R r = new R(); r.putAll(map); return r; } - + public static R ok() { return new R(); } diff --git a/base-fast/src/main/java/com/boge/modules/dept/controller/DeptController.java b/base-fast/src/main/java/com/boge/modules/dept/controller/DeptController.java index ab4a7cc..c664af7 100644 --- a/base-fast/src/main/java/com/boge/modules/dept/controller/DeptController.java +++ b/base-fast/src/main/java/com/boge/modules/dept/controller/DeptController.java @@ -19,6 +19,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.boge.common.base.TableDataInfo; import com.boge.common.exception.RRException; import com.boge.common.query.PageQuery; +import com.boge.common.utils.R; import com.boge.modules.dept.dao.SysDept; import com.boge.modules.dept.dto.DeptQuery; import com.boge.modules.dept.service.ISysDeptService; @@ -77,28 +78,28 @@ public class DeptController { @PostMapping - public ResponseEntity create(@Validated @RequestBody SysDept resources){ + public R create(@Validated @RequestBody SysDept resources){ deptService.createDept(resources); - return new ResponseEntity<>(HttpStatus.CREATED); + return R.ok("新增成功"); } @PutMapping - public ResponseEntity update(@Validated @RequestBody SysDept dept){ - if (dept.getPid() != null && dept.getDept_id().equals(dept.getPid())) { + public R update(@Validated @RequestBody SysDept dept){ + if (dept.getPid() != null && dept.getDeptId().equals(dept.getPid())) { throw new RRException("ID不能为空"); } deptService.updateDept(dept); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); + return R.ok("修改成功"); } @DeleteMapping - public ResponseEntity delete(@RequestBody Set deptIds){ + public R delete(@RequestBody Set deptIds){ if (CollectionUtils.isEmpty(deptIds)){ - return ResponseEntity.noContent().build(); + return R.error("请选择需要删除的部门"); } deptService.delateDept(deptIds); - return new ResponseEntity<>(HttpStatus.OK); + return R.ok("删除成功"); } } diff --git a/base-fast/src/main/java/com/boge/modules/dept/dao/SysDept.java b/base-fast/src/main/java/com/boge/modules/dept/dao/SysDept.java index 2f798f6..ccfbee9 100644 --- a/base-fast/src/main/java/com/boge/modules/dept/dao/SysDept.java +++ b/base-fast/src/main/java/com/boge/modules/dept/dao/SysDept.java @@ -28,8 +28,8 @@ public class SysDept implements Serializable { /** * ID */ - @TableId(value = "dept_id", type = IdType.NONE) - private String dept_id; + @TableId( type = IdType.ASSIGN_ID) + private String deptId; /** * 上级部门 @@ -39,7 +39,7 @@ public class SysDept implements Serializable { /** * 子部门数目 */ - private Integer sub_count; + private Integer subCount; /** * 名称 @@ -49,59 +49,59 @@ public class SysDept implements Serializable { /** * 中文名称 */ - private String zh_name; + private String zhName; /** * 英文名称 */ - private String en_name; + private String enName; /** * 印尼名称 */ - private String in_name; + private String inName; /** * 排序 */ - private Integer dept_sort; + private Integer deptSort; /** * 状态 */ - private Boolean is_used; + private Boolean isUsed; - private String create_id; + private String createId; /** * 创建者 */ - private String create_name; + private String createName; - private String update_id; + private String updateId; /** * 更新者 */ - private String update_name; + private String updateName; /** * 创建日期 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date create_time; + private Date createTime; /** * 更新时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date update_time; + private Date updateTime; /** * 部门编号 */ private String code; - private String ext_id; + private String extId; } diff --git a/base-fast/src/main/java/com/boge/modules/dept/dto/DeptTree.java b/base-fast/src/main/java/com/boge/modules/dept/dto/DeptTree.java index ce1d628..814b111 100644 --- a/base-fast/src/main/java/com/boge/modules/dept/dto/DeptTree.java +++ b/base-fast/src/main/java/com/boge/modules/dept/dto/DeptTree.java @@ -30,14 +30,14 @@ import java.util.List; @Setter public class DeptTree implements Serializable { - private String dept_id; + private String deptId; private String pid; private String name; - private String in_name; - private String en_name; - private String zh_name; + private String inName; + private String enName; + private String zhName; @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children; diff --git a/base-fast/src/main/java/com/boge/modules/dept/service/impl/SysDeptServiceImpl.java b/base-fast/src/main/java/com/boge/modules/dept/service/impl/SysDeptServiceImpl.java index 20fba73..cc1be9b 100644 --- a/base-fast/src/main/java/com/boge/modules/dept/service/impl/SysDeptServiceImpl.java +++ b/base-fast/src/main/java/com/boge/modules/dept/service/impl/SysDeptServiceImpl.java @@ -62,7 +62,7 @@ public class SysDeptServiceImpl extends ServiceImpl impl trees.add(deptDTO); } for (DeptTree it : deptDtos) { - if (it.getPid() != null && deptDTO.getDept_id().equals(it.getPid())) { + if (it.getPid() != null && deptDTO.getDeptId().equals(it.getPid())) { isChild = true; if (deptDTO.getChildren() == null) { deptDTO.setChildren(new ArrayList<>()); @@ -88,14 +88,14 @@ public class SysDeptServiceImpl extends ServiceImpl impl if (query.getPid() == null){ query.setPid_is_null(true); } - if (StringUtils.isNotEmpty(query.getName()) || query.getIs_used()!=null){ + if (StringUtils.isNotEmpty(query.getName()) || query.getIsUsed()!=null){ query.setPid_is_null(null); } } Page page = this.page(pageQuery.build(SysDept.class), query.build()); page.setRecords(CopyUtil.copyList(page.getRecords(), DeptVo.class)); - if (StringUtils.isNotEmpty(query.getName()) || query.getIs_used()!=null){ - page.getRecords().forEach(a->((DeptVo)a).setHas_children(false) ); + if (StringUtils.isNotEmpty(query.getName()) || query.getIsUsed()!=null){ + page.getRecords().forEach(a->((DeptVo)a).setHasChildren(false) ); } return page; } @@ -117,12 +117,12 @@ public class SysDeptServiceImpl extends ServiceImpl impl @Override @Transactional(rollbackFor = Exception.class) public void updateDept(SysDept dept) { - if (dept == null ||StringUtils.isEmpty(dept.getDept_id())){ + if (dept == null ||StringUtils.isEmpty(dept.getDeptId())){ return; } this.updateById(dept); //删除节点信息 - sysDeptMapper.updateSubCount(dept.getDept_id()); + sysDeptMapper.updateSubCount(dept.getDeptId()); if (StringUtils.isNotEmpty(dept.getPid())){ sysDeptMapper.updateSubCount(dept.getPid()); } @@ -137,7 +137,7 @@ public class SysDeptServiceImpl extends ServiceImpl impl verification(deptIds); Set depts = new HashSet<>(); Set pids = new HashSet<>(); - List deptList = sysDeptMapper.selectList(new QueryWrapper().in("dept_id", deptIds)); + List deptList = sysDeptMapper.selectList(new QueryWrapper().in("deptId", deptIds)); for (String deptId : deptIds) { depts.add(deptId); String allChild = sysDeptMapper.findAllChild(deptId); @@ -146,7 +146,7 @@ public class SysDeptServiceImpl extends ServiceImpl impl depts.addAll(Arrays.asList(split)); } } - this.remove(new QueryWrapper().in("dept_id", depts)); + this.remove(new QueryWrapper().in("deptId", depts)); deptList.forEach(dept -> { if (StringUtils.isNotEmpty(dept.getPid())){sysDeptMapper.updateSubCount(dept.getPid());} }); @@ -167,9 +167,9 @@ public class SysDeptServiceImpl extends ServiceImpl impl public void createDept(SysDept dept) { SysUserEntity userEntity = ShiroUtils.getUserEntity(); - dept.setCreate_id(String.valueOf(userEntity.getUserId())); - dept.setCreate_name(userEntity.getUsername()); - dept.setCreate_time(new Date()); + dept.setCreateId(String.valueOf(userEntity.getUserId())); + dept.setCreateName(userEntity.getUsername()); + dept.setCreateTime(new Date()); this.save(dept); // 清理缓存 if (StringUtils.isNotEmpty(dept.getPid())){ diff --git a/base-fast/src/main/java/com/boge/modules/dept/vo/DeptVo.java b/base-fast/src/main/java/com/boge/modules/dept/vo/DeptVo.java index 6504b3e..42e2c16 100644 --- a/base-fast/src/main/java/com/boge/modules/dept/vo/DeptVo.java +++ b/base-fast/src/main/java/com/boge/modules/dept/vo/DeptVo.java @@ -34,15 +34,15 @@ import java.util.List; public class DeptVo extends BaseDTO implements Serializable { - private String dept_id; + private String deptId; private String code; - private String ext_id; + private String extId; - private Integer dept_sort; + private Integer deptSort; @NotBlank @@ -50,34 +50,34 @@ public class DeptVo extends BaseDTO implements Serializable { private String name; @NotBlank - private String zh_name; + private String zhName; @NotBlank - private String en_name; + private String enName; @NotBlank - private String in_name; + private String inName; @NotNull - private Boolean is_used; + private Boolean isUsed; private Long pid; - private Integer sub_count = 0; + private Integer subCount = 0; /** * 前端显示 */ - private Boolean has_children =Boolean.FALSE; + private Boolean hasChildren =Boolean.FALSE; private List children; - public void setSub_count(Integer sub_count) { - this.sub_count = sub_count; - if (sub_count >0){ - this.has_children =Boolean.TRUE; + public void setSubCount(Integer subCount) { + this.subCount = subCount; + if (subCount >0){ + this.hasChildren =Boolean.TRUE; } } } diff --git a/base-fast/src/main/java/com/boge/modules/dict/controller/SysDictController.java b/base-fast/src/main/java/com/boge/modules/dict/controller/SysDictController.java index 59f55cd..4e8269c 100644 --- a/base-fast/src/main/java/com/boge/modules/dict/controller/SysDictController.java +++ b/base-fast/src/main/java/com/boge/modules/dict/controller/SysDictController.java @@ -3,6 +3,7 @@ package com.boge.modules.dict.controller; import com.alibaba.fastjson.JSONObject; import com.boge.common.base.TableDataInfo; import com.boge.common.query.PageQuery; +import com.boge.common.utils.R; import com.boge.modules.dict.dao.Dict; import com.boge.modules.dict.dto.DictQuery; import com.boge.modules.dict.service.ISysDictService; @@ -46,21 +47,21 @@ public class SysDictController { } @PostMapping - public ResponseEntity create(@RequestBody Dict dict){ + public R create(@RequestBody Dict dict){ dictService.create(dict); - return new ResponseEntity<>(HttpStatus.CREATED); + return R.ok("添加成功"); } @PutMapping - public ResponseEntity updateDict(@Validated @RequestBody Dict dto){ + public R updateDict(@Validated @RequestBody Dict dto){ dictService.updateDict(dto); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); + return R.ok("修改成功"); } @DeleteMapping - public ResponseEntity delete(@RequestBody Set ids){ + public R delete(@RequestBody Set ids){ dictService.deleteBatchByIds(ids); - return new ResponseEntity<>(HttpStatus.OK); + return R.ok("删除成功"); } @GetMapping("/dictDetail") @@ -81,9 +82,9 @@ public class SysDictController { } @PostMapping("/dictDetail") - public ResponseEntity createDetail(@RequestBody Dict resources){ + public R createDetail(@RequestBody Dict resources){ dictService.createDetail(resources); - return new ResponseEntity<>(HttpStatus.CREATED); + return R.ok("新增成功"); } @PutMapping("/dictDetail") @@ -93,9 +94,9 @@ public class SysDictController { } @DeleteMapping(value = "/dictDetail/{id}") - public ResponseEntity deleteDetail(@PathVariable String id){ + public R deleteDetail(@PathVariable String id){ dictService.deleteDetail(id); - return new ResponseEntity<>(HttpStatus.OK); + return R.ok("删除成功"); } } diff --git a/base-fast/src/main/java/com/boge/modules/dict/dao/Dict.java b/base-fast/src/main/java/com/boge/modules/dict/dao/Dict.java index d22d2e5..cfe5d17 100644 --- a/base-fast/src/main/java/com/boge/modules/dict/dao/Dict.java +++ b/base-fast/src/main/java/com/boge/modules/dict/dao/Dict.java @@ -1,5 +1,6 @@ package com.boge.modules.dict.dao; +import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -26,8 +27,8 @@ public class Dict implements Serializable { /** * 字典标识 */ - @TableId(value = "dict_id") - private String dict_id; + @TableId( type = IdType.ASSIGN_ID) + private String dictId; /** * 编码 @@ -52,12 +53,12 @@ public class Dict implements Serializable { /** * 排序号 */ - private BigDecimal dict_sort; + private BigDecimal dictSort; /** * 字典类型 */ - private String dict_type; + private String dictType; /** * 参数1 @@ -77,31 +78,31 @@ public class Dict implements Serializable { /** * 创建人 */ - private String create_id; + private String createId; /** * 创建人 */ - private String create_name; + private String createName; /** * 创建时间 */ - private String create_time; + private String createTime; /** * 修改人 */ - private String update_id; + private String updateId; /** * 修改人 */ - private String update_name; + private String updateName; /** * 修改时间 */ - private String update_time; + private String updateTime; } diff --git a/base-fast/src/main/java/com/boge/modules/dict/service/impl/SysDictServiceImpl.java b/base-fast/src/main/java/com/boge/modules/dict/service/impl/SysDictServiceImpl.java index eccb2a5..450724e 100644 --- a/base-fast/src/main/java/com/boge/modules/dict/service/impl/SysDictServiceImpl.java +++ b/base-fast/src/main/java/com/boge/modules/dict/service/impl/SysDictServiceImpl.java @@ -24,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.UUID; /** *

@@ -60,15 +61,17 @@ public class SysDictServiceImpl extends ServiceImpl impleme String date = DateUtil.now(); List oldDict = sysDictMapper.selectList(new LambdaQueryWrapper() .eq(ObjectUtil.isNotNull(dict.getCode()), Dict::getCode, dict.getCode())); - if (ObjectUtil.isNotNull(oldDict)) - throw new RRException("无标签"); - dict.setDict_id(IdUtil.getSnowflake(1, 1).nextIdStr()); - dict.setCreate_id(String.valueOf(userEntity.getUserId())); - dict.setCreate_name(userEntity.getUsername()); - dict.setCreate_time(date); - dict.setUpdate_id(String.valueOf(userEntity.getUserId())); - dict.setUpdate_name(userEntity.getUsername()); - dict.setUpdate_time(date); + if (!oldDict.isEmpty()) { + throw new RRException("已存在标签"); + } + + dict.setCreateId(String.valueOf(userEntity.getUserId())); + dict.setCreateName(userEntity.getUsername()); + dict.setCreateTime(date); + dict.setUpdateId(String.valueOf(userEntity.getUserId())); + dict.setUpdateName(userEntity.getUsername()); + dict.setUpdateTime(date); + dict.setDictId(UUID.randomUUID().toString()); sysDictMapper.insert(dict); } @@ -76,13 +79,13 @@ public class SysDictServiceImpl extends ServiceImpl impleme @Transactional(rollbackFor = Exception.class) public void updateDict(Dict dto) { SysUserEntity userEntity = ShiroUtils.getUserEntity(); - Dict dict = sysDictMapper.selectById(dto.getDict_id()); + Dict dict = sysDictMapper.selectById(dto.getDictId()); if (ObjectUtil.isNull(dict)) { throw new RRException("无标签"); } List dictList = sysDictMapper.selectList(new LambdaQueryWrapper().eq(Dict::getCode, dto.getCode())); - if (ObjectUtil.isNotNull(dictList) && !dto.getCode().equals(dict.getCode())) - throw new RRException("无标签"); + if (!dictList.isEmpty() && !dto.getCode().equals(dict.getCode())) + throw new RRException("已存在同编码的标签"); String currentUserId = String.valueOf(userEntity.getUserId()); String currentNickName = userEntity.getNickname(); // 根据code获取所有字典 @@ -90,9 +93,9 @@ public class SysDictServiceImpl extends ServiceImpl impleme dicts.forEach(di -> { di.setCode(dto.getCode()); di.setName(dto.getName()); - di.setUpdate_id(currentUserId); - di.setUpdate_name(currentNickName); - di.setUpdate_time(DateUtil.now()); + di.setUpdateId(currentUserId); + di.setUpdateName(currentNickName); + di.setUpdateTime(DateUtil.now()); sysDictMapper.updateById(di); }); } @@ -113,7 +116,7 @@ public class SysDictServiceImpl extends ServiceImpl impleme lam.eq(Dict::getCode, criteria.getCode()) .isNotNull(Dict::getLabel) .ne(Dict::getLabel, "") - .orderBy(true, true, Dict::getDict_sort); + .orderBy(true, true, Dict::getDictSort); IPage pages = new Page<>(page.getPage() + 1, page.getSize()); sysDictMapper.selectPage(pages, lam); return pages; @@ -144,8 +147,8 @@ public class SysDictServiceImpl extends ServiceImpl impleme dic.setCode(dict.getCode()); dic.setLabel(dict.getLabel()); dic.setValue(dict.getValue()); - dic.setDict_sort(dict.getDict_sort()); - dic.setDict_type(dict.getDict_type()); + dic.setDictSort(dict.getDictSort()); + dic.setDictType(dict.getDictType()); dic.setPara1(dict.getPara1()); dic.setPara2(dict.getPara2()); dic.setPara3(dict.getPara3()); @@ -153,15 +156,15 @@ public class SysDictServiceImpl extends ServiceImpl impleme return; } // 插入新的数据 - dict.setDict_id(IdUtil.getSnowflake(1, 1).nextIdStr()); + dict.setDictId(IdUtil.getSnowflake(1, 1).nextIdStr()); dict.setCode(dic.getCode()); dict.setName(dic.getName()); - dict.setCreate_id(String.valueOf(userEntity.getUserId())); - dict.setCreate_name(userEntity.getUsername()); - dict.setCreate_time(DateUtil.now()); - dict.setUpdate_id(String.valueOf(userEntity.getUserId())); - dict.setUpdate_name(userEntity.getUsername()); - dict.setUpdate_time(DateUtil.now()); + dict.setCreateId(String.valueOf(userEntity.getUserId())); + dict.setCreateName(userEntity.getUsername()); + dict.setCreateTime(DateUtil.now()); + dict.setUpdateId(String.valueOf(userEntity.getUserId())); + dict.setUpdateName(userEntity.getUsername()); + dict.setUpdateTime(DateUtil.now()); sysDictMapper.insert(dict); } @@ -169,7 +172,7 @@ public class SysDictServiceImpl extends ServiceImpl impleme @Transactional(rollbackFor = Exception.class) public void updateDetail(Dict resources) { SysUserEntity userEntity = ShiroUtils.getUserEntity(); - Dict dict = sysDictMapper.selectById(resources.getDict_id()); + Dict dict = sysDictMapper.selectById(resources.getDictId()); if (ObjectUtil.isNull(dict)) { throw new RRException("无标签"); } @@ -179,9 +182,9 @@ public class SysDictServiceImpl extends ServiceImpl impleme if (ObjectUtil.isNotNull(dictList) && !resources.getLabel().equals(dict.getLabel())) { throw new RRException("无标签"); } - resources.setUpdate_id(String.valueOf(userEntity.getUserId())); - resources.setUpdate_name(userEntity.getUsername()); - resources.setUpdate_time(DateUtil.now()); + resources.setUpdateId(String.valueOf(userEntity.getUserId())); + resources.setUpdateName(userEntity.getUsername()); + resources.setUpdateTime(DateUtil.now()); sysDictMapper.updateById(resources); } diff --git a/base-fast/src/main/java/com/boge/modules/flow/controller/FlwDeployController.java b/base-fast/src/main/java/com/boge/modules/flow/controller/FlwDeployController.java index b67f900..99b92ec 100644 --- a/base-fast/src/main/java/com/boge/modules/flow/controller/FlwDeployController.java +++ b/base-fast/src/main/java/com/boge/modules/flow/controller/FlwDeployController.java @@ -63,7 +63,7 @@ public class FlwDeployController { /** - * 发起流程 + * 流程查询 * @param id * @return */ diff --git a/base-fast/src/main/java/com/boge/modules/flow/controller/FlwInstanceController.java b/base-fast/src/main/java/com/boge/modules/flow/controller/FlwInstanceController.java index 8e9389c..410cbff 100644 --- a/base-fast/src/main/java/com/boge/modules/flow/controller/FlwInstanceController.java +++ b/base-fast/src/main/java/com/boge/modules/flow/controller/FlwInstanceController.java @@ -22,7 +22,7 @@ public class FlwInstanceController { private FlwInstanceService instanceService; /** - * 保存 + * 发起流程 */ @RequestMapping("/startFlowInstance") public R startFlowInstance(@RequestParam Map params){ @@ -55,7 +55,7 @@ public class FlwInstanceController { } /** - * 我的发起 + * 我的完成 * @param params * @return */ diff --git a/base-fast/src/main/java/com/boge/modules/flow/service/impl/FlwDeployServiceImpl.java b/base-fast/src/main/java/com/boge/modules/flow/service/impl/FlwDeployServiceImpl.java index a47e5bf..b029232 100644 --- a/base-fast/src/main/java/com/boge/modules/flow/service/impl/FlwDeployServiceImpl.java +++ b/base-fast/src/main/java/com/boge/modules/flow/service/impl/FlwDeployServiceImpl.java @@ -182,6 +182,18 @@ public class FlwDeployServiceImpl extends FlowServiceNoFactory implements FlwDep // 从BpmnModel对象中获取相关的 userTask 信息 Process mainProcess = bpmnModel.getMainProcess(); Collection flowElements = mainProcess.getFlowElements(); + sendflow(flowElements, list); + // 获取所有的用户和所有的角色信息 + List users = userService.list(); + List roles = roleService.list(); + return R.ok("获取数据成功") + .put("data", list) + .put("users", users) + .put("roles", roles) + ; + } + + private void sendflow(Collection flowElements, List> list) { for (FlowElement flowElement : flowElements) { //System.out.println(flowElement.getName()+"" + flowElement); if (flowElement instanceof UserTask) { @@ -222,14 +234,6 @@ public class FlwDeployServiceImpl extends FlowServiceNoFactory implements FlwDep } } - // 获取所有的用户和所有的角色信息 - List users = userService.list(); - List roles = roleService.list(); - return R.ok("获取数据成功") - .put("data", list) - .put("users", users) - .put("roles", roles) - ; } public String findFlowDefUserOrGroup(String str) { diff --git a/base-fast/src/main/java/com/boge/modules/flow/service/impl/FlwInstanceServiceImpl.java b/base-fast/src/main/java/com/boge/modules/flow/service/impl/FlwInstanceServiceImpl.java index 2c36e58..d126900 100644 --- a/base-fast/src/main/java/com/boge/modules/flow/service/impl/FlwInstanceServiceImpl.java +++ b/base-fast/src/main/java/com/boge/modules/flow/service/impl/FlwInstanceServiceImpl.java @@ -1,6 +1,9 @@ package com.boge.modules.flow.service.impl; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.boge.common.exception.RRException; import com.boge.common.utils.Constant; import com.boge.common.utils.PageUtils; import com.boge.common.utils.R; @@ -14,6 +17,7 @@ import com.boge.modules.flow.service.FlwInstanceService; import com.boge.modules.sys.entity.SysUserEntity; import com.boge.modules.sys.service.SysRoleService; import com.boge.modules.sys.service.SysUserService; +import com.boge.modules.sys.service.impl.SysUserServiceImpl; import org.flowable.bpmn.model.BpmnModel; import org.flowable.bpmn.model.FlowElement; import org.flowable.bpmn.model.Process; @@ -35,6 +39,12 @@ import org.springframework.stereotype.Service; import java.io.IOException; import java.io.InputStream; +import java.io.OutputStream; +import java.io.UnsupportedEncodingException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.URL; import java.util.*; import java.util.stream.Collectors; @@ -46,14 +56,157 @@ public class FlwInstanceServiceImpl extends FlowServiceNoFactory implements FlwI @Autowired private SysRoleService roleService; + @Autowired + private SysUserServiceImpl sysUserService; + + //发送消息的类型 + private final static String MSGTYPE = "text"; + //将消息发送给所有成员 + private final static String TOPARTY = "@all"; + //获取企业微信的企业号,根据不同企业更改 + private final static String CORPID = "ww5aa8af6a525eae6e"; + //获取企业应用的密钥,根据不同应用更改 + private final static String CORPSECRET = "n6Vvnad69GxLfYlDS4hQaWuApwxFR36Wjq12eXNmi4M"; + //获取访问权限码URL + private final static String ACCESS_TOKEN_URL = "https://qyapi.weixin.qq.com/cgi-bin/gettoken"; + //创建会话请求URL + private final static String CREATE_SESSION_URL = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token="; + + @Override public void startFlowInstance(Map params) { + SysUserEntity loginUser = ShiroUtils.getUserEntity(); // 获取需要发起的流程信息 String defId = (String) params.get("id"); Map variable = new HashMap<>(); // 结合传递过来的数据动态的绑定流程变量 Set keys = params.keySet(); + packageData(params, keys, variable); + + // 记录流程的发起人 + identityService.setAuthenticatedUserId(ShiroUtils.getUserId().toString()); + // 启动流程 + runtimeService.startProcessInstanceById(defId, variable); + SysUserEntity user = sysUserService.getById(Long.valueOf((String) params.get("user1"))); + if (StrUtil.isEmpty(user.getWexinId())){ + throw new RRException("企业id为空,企业微信消息无法推送"); + } + + String accessToken = getAccessToken(); + sendWeChatMessage(user.getWexinId(),"工单已推送,请登入售后管理系统处理",accessToken); + + } + + + /** + * 获取access_token + */ + + public static String getAccessToken() { + //访问微信服务器 + String url = ACCESS_TOKEN_URL + "?corpid=" + CORPID + "&corpsecret=" + CORPSECRET; + try { + URL getUrl = new URL(url); + //开启连接,并返回一个URLConnection对象 + HttpURLConnection http = (HttpURLConnection) getUrl.openConnection(); + http.setRequestMethod("GET"); + http.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"); + //将URL连接用于输入和输出,一般输入默认为true,输出默认为false + http.setDoOutput(true); + http.setDoInput(true); + //进行连接,不返回对象 + http.connect(); + + //获得输入内容,并将其存储在缓存区 + InputStream inputStream = http.getInputStream(); + int size = inputStream.available(); + byte[] buffer = new byte[size]; + inputStream.read(buffer); + //将内容转化为JSON代码 + String message = new String(buffer, "UTF-8"); + JSONObject json = JSONObject.parseObject(message); + // token失效时间,需要避免频繁读取 + int timeOut = json.getInteger("expires_in"); + /* token.setAccess_token(json.getString("access_token")); + token.setExpires_in(new Integer(json.getString("expires_in")));*/ + return json.getString("access_token"); + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + //返回access_token码 + return null; + } + + + + public static void sendWeChatMessage(String toUser, String content, String ACCESS_TOKEN) { + //请求串 + String url = CREATE_SESSION_URL + ACCESS_TOKEN; + JSONObject jsonObject = new JSONObject(); + jsonObject.put("touser", toUser); + jsonObject.put("msgtype", "text"); + jsonObject.put("agentid", 1000006); + JSONObject contentJSon = new JSONObject(); + contentJSon.put("content", content); + jsonObject.put("text", contentJSon); + jsonObject.put("safe", 0); + + + + try { + URL postUrl = new URL(url); + HttpURLConnection http = (HttpURLConnection) postUrl.openConnection(); + http.setRequestMethod("POST"); + http.setRequestProperty("Content-Type", "application/json;charset=UTF-8"); + http.setDoOutput(true); + http.setDoInput(true); + // 连接超时30秒 + System.setProperty("sun.net.client.defaultConnectTimeout", "30000"); + // 读取超时30秒 + System.setProperty("sun.net.client.defaultReadTimeout", "30000"); + http.connect(); + + //写入内容 + OutputStream outputStream = http.getOutputStream(); + outputStream.write(jsonObject.toJSONString().getBytes("UTF-8")); + InputStream inputStream = http.getInputStream(); + int size = inputStream.available(); + byte[] jsonBytes = new byte[size]; + inputStream.read(jsonBytes); + String result = new String(jsonBytes, "UTF-8"); + JSONObject jsonObject1 = JSONObject.parseObject(result); + int errcode = jsonObject1.getInteger("errcode"); + if (Objects.equals(42001, errcode)) { + throw new RRException("发送企业微信 token 失效"); + } + if (Objects.equals(0, errcode)) { + System.out.println("消息发送成功"); + } + System.out.println("请求返回结果:" + jsonObject1); + + //清空输出流 + outputStream.flush(); + //关闭输出通道 + outputStream.close(); + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } catch (ProtocolException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + + + + private static void packageData(Map params, Set keys, Map variable) { if(keys != null){ for (String key : keys) { if("id".equals(key) || "t".equals(key)){ @@ -81,11 +234,6 @@ public class FlwInstanceServiceImpl extends FlowServiceNoFactory implements FlwI } } } - // 记录流程的发起人 - identityService.setAuthenticatedUserId(ShiroUtils.getUserId().toString()); - // 启动流程 - runtimeService.startProcessInstanceById(defId,variable); - } /** diff --git a/base-fast/src/main/java/com/boge/modules/sys/entity/SysUserEntity.java b/base-fast/src/main/java/com/boge/modules/sys/entity/SysUserEntity.java index 8be6b94..867ed8b 100644 --- a/base-fast/src/main/java/com/boge/modules/sys/entity/SysUserEntity.java +++ b/base-fast/src/main/java/com/boge/modules/sys/entity/SysUserEntity.java @@ -30,7 +30,7 @@ import java.util.List; @TableName("sys_user") public class SysUserEntity implements Serializable { private static final long serialVersionUID = 1L; - + /** * 用户ID */ @@ -94,4 +94,6 @@ public class SysUserEntity implements Serializable { private String nickname; + private String wexinId; + } diff --git a/base-vue/package-lock.json b/base-vue/package-lock.json index 1dc6dbd..9b87f39 100644 --- a/base-vue/package-lock.json +++ b/base-vue/package-lock.json @@ -19,6 +19,21 @@ "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==" }, + "@babel/runtime": { + "version": "7.26.9", + "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.26.9.tgz", + "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==", + "requires": { + "regenerator-runtime": "^0.14.0" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + } + } + }, "@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmmirror.com/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -51,6 +66,12 @@ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, "string-width": { "version": "5.1.2", "resolved": "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz", @@ -62,6 +83,40 @@ "strip-ansi": "^7.0.1" } }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, "strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -71,6 +126,23 @@ "ansi-regex": "^6.0.1" } }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + } + } + }, "wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz", @@ -81,6 +153,60 @@ "string-width": "^5.0.1", "strip-ansi": "^7.0.1" } + }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } + } } } }, @@ -97,6 +223,21 @@ "dev": true, "optional": true }, + "@riophae/vue-treeselect": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/@riophae/vue-treeselect/-/vue-treeselect-0.4.0.tgz", + "integrity": "sha512-J4atYmBqXQmiPFK/0B5sXKjtnGc21mBJEiyKIDZwk0Q9XuynVFX6IJ4EpaLmUgL5Tve7HAS7wkiGGSti6Uaxcg==", + "requires": { + "@babel/runtime": "^7.3.1", + "babel-helper-vue-jsx-merge-props": "^2.0.3", + "easings-css": "^1.0.0", + "fuzzysearch": "^1.0.3", + "is-promise": "^2.1.0", + "lodash": "^4.0.0", + "material-colors": "^1.2.6", + "watch-size": "^2.0.0" + } + }, "@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmmirror.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -4191,6 +4332,11 @@ "object.defaults": "^1.1.0" } }, + "easings-css": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/easings-css/-/easings-css-1.0.0.tgz", + "integrity": "sha512-7Uq7NdazNfVtr0RNmPAys8it0zKCuaqxJStYKEl72D3j4gbvXhhaM7iWNbqhA4C94ygCye6VuyhzBRQC4szeBg==" + }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -5924,6 +6070,11 @@ "resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" }, + "fuzzysearch": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/fuzzysearch/-/fuzzysearch-1.0.3.tgz", + "integrity": "sha512-s+kNWQuI3mo9OALw0HJ6YGmMbLqEufCh2nX/zzV5CrICQ/y4AwPxM+6TIiF9ItFCHXFCyM/BfCCmN57NTIJuPg==" + }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmmirror.com/gauge/-/gauge-2.7.4.tgz", @@ -7658,6 +7809,11 @@ "integrity": "sha512-N3w1tFaRfk3UrPfqeRyD+GYDASU3W5VinKhlORy8EWVf/sIdDL9GAcew85XmktCfH+ngG7SRXEVDoO18WMdB/Q==", "dev": true }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmmirror.com/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, "is-property": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/is-property/-/is-property-1.0.2.tgz", @@ -9946,6 +10102,11 @@ "resolved": "https://registry.npmmirror.com/matches-selector/-/matches-selector-1.2.0.tgz", "integrity": "sha512-c4vLwYWyl+Ji+U43eU/G5FwxWd4ZH0ePUsFs5y0uwD9HUEFBXUQ1zUUan+78IpRD+y4pUfG0nAzNM292K7ItvA==" }, + "material-colors": { + "version": "1.2.6", + "resolved": "https://registry.npmmirror.com/material-colors/-/material-colors-1.2.6.tgz", + "integrity": "sha512-6qE4B9deFBIa9YSpOc9O0Sgc43zTeVYbgDT5veRKSlB2+ZuHNoVVxA1L/ckMUayV9Ay9y7Z/SZCLcGteW9i7bg==" + }, "math-expression-evaluator": { "version": "1.4.0", "resolved": "https://registry.npmmirror.com/math-expression-evaluator/-/math-expression-evaluator-1.4.0.tgz", @@ -17947,46 +18108,6 @@ "strip-ansi": "^3.0.0" } }, - "string-width-cjs": { - "version": "npm:string-width@4.2.3", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } - } - }, "string.prototype.trim": { "version": "1.2.10", "resolved": "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", @@ -18038,23 +18159,6 @@ "ansi-regex": "^2.0.0" } }, - "strip-ansi-cjs": { - "version": "npm:strip-ansi@6.0.1", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - } - } - }, "strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-2.0.0.tgz", @@ -19552,6 +19656,11 @@ "minimist": "^1.2.0" } }, + "watch-size": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/watch-size/-/watch-size-2.0.0.tgz", + "integrity": "sha512-M92R89dNoTPWyCD+HuUEDdhaDnh9jxPGOwlDc0u51jAgmjUvzqaEMynXSr3BaWs+QdHYk4KzibPy1TFtjLmOZQ==" + }, "watchpack": { "version": "1.7.5", "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-1.7.5.tgz", @@ -20572,57 +20681,6 @@ "strip-ansi": "^3.0.1" } }, - "wrap-ansi-cjs": { - "version": "npm:wrap-ansi@7.0.0", - "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } - } - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz",