diff --git a/rc_autoplc_backend/.idea/workspace.xml b/rc_autoplc_backend/.idea/workspace.xml
index 590182f..636571d 100644
--- a/rc_autoplc_backend/.idea/workspace.xml
+++ b/rc_autoplc_backend/.idea/workspace.xml
@@ -4,81 +4,21 @@
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
@@ -121,29 +61,29 @@
- {
+ "keyToString": {
+ "RequestMappingsPanelOrder0": "0",
+ "RequestMappingsPanelOrder1": "1",
+ "RequestMappingsPanelWidth0": "75",
+ "RequestMappingsPanelWidth1": "75",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "WebServerToolWindowFactoryState": "false",
+ "last_opened_file_path": "D:/java-work/融创智能PLC后台系统/RCZN-bs-program/rc_autoplc_backend/rczn-autoplc/src/main/resources/com/rczn/rcznautoplc/mapper",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "project.structure.last.edited": "SDKs",
+ "project.structure.proportion": "0.0",
+ "project.structure.side.proportion": "0.2",
+ "settings.editor.selected.configurable": "ai.codegeex.plugin.settings.ApplicationConfigurable",
+ "spring.configuration.checksum": "23e183287596c71f060f4e02bc43279b",
+ "ts.external.directory.path": "D:\\JetBrains\\IntelliJ IDEA 2023.1.7\\plugins\\javascript-impl\\jsLanguageServicesImpl\\external",
+ "vue.rearranger.settings.migration": "true"
}
-}]]>
+}
@@ -280,7 +220,11 @@
-
+
+
+
+
+
@@ -354,7 +298,15 @@
1777533044176
-
+
+
+ 1777533903758
+
+
+
+ 1777533903758
+
+
@@ -409,7 +361,8 @@
-
+
+
diff --git a/rc_autoplc_backend/rczn-admin/src/main/java/com/rczn/controller/UserController.java b/rc_autoplc_backend/rczn-admin/src/main/java/com/rczn/controller/UserController.java
index 126a663..7a0ff11 100644
--- a/rc_autoplc_backend/rczn-admin/src/main/java/com/rczn/controller/UserController.java
+++ b/rc_autoplc_backend/rczn-admin/src/main/java/com/rczn/controller/UserController.java
@@ -8,7 +8,10 @@ import com.rczn.rcznautoplc.domain.RecordInfo;
import com.rczn.rcznautoplc.service.ManageLogService;
import com.rczn.rcznautoplc.service.RecordInfoService;
import com.rczn.system.domain.Permission;
+import com.rczn.system.domain.Role;
import com.rczn.system.domain.User;
+import com.rczn.system.domain.UserRole;
+import com.rczn.system.service.UserRoleService;
import com.rczn.system.service.UserService;
import com.rczn.utils.JwtUtil;
import com.rczn.utils.Md5Util;
@@ -17,6 +20,7 @@ import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.models.security.SecurityScheme;
import jakarta.validation.constraints.Pattern;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -174,6 +178,8 @@ public class UserController {
@Autowired
ManageLogService manageLogService;
+ @Autowired
+ UserRoleService userRoleService;
@PostMapping("/login")
@Operation(summary = "用户登录接口",description = "根据用户名和密码登录,返回JWT Token")
@@ -222,13 +228,23 @@ public class UserController {
Map claims = new HashMap<>();
claims.put("id", user.getId());
claims.put("username", user.getUserName());
+ //获取角色列表:
+ List roles = userRoleService.selectByRoleId(user.getId().intValue());
+ List roleIdList = roles.stream().map(UserRole::getRoleId).collect(Collectors.toList());
+
//获取权限列表:
List permissions = userService.findUserPermissions(user.getId());
List permissionList = permissions.stream().map(Permission::getPermissionCode).collect(Collectors.toList());
- claims.put("permissions", permissionList);
String jwtToken = JwtUtil.genToken(claims);
+
+ LoginRequest request = new LoginRequest();
+ request.setToken(jwtToken);
+ request.setPermissions(permissionList);
+ request.setRoles(roleIdList);
+ request.setUsername(username);
+
//密码正确,返回成功信息
- return Result.success(jwtToken);
+ return Result.success(request);
} else {
//密码错误,返回错误信息
return Result.error("密码错误!");
@@ -236,4 +252,59 @@ public class UserController {
}
}
+ class LoginRequest {
+ //用户名
+ private String username;
+ //token
+ private String token;
+
+ //角色列表
+ private List roles;
+ //权限列表
+ private List permissions;
+
+ public LoginRequest(String username, String token, List roles, List permissions) {
+ this.username = username;
+ this.token = token;
+ this.roles = roles;
+ this.permissions = permissions;
+ }
+
+ public LoginRequest() {
+
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ public List getRoles() {
+ return roles;
+ }
+
+ public void setRoles(List roles) {
+ this.roles = roles;
+ }
+
+ public List getPermissions() {
+ return permissions;
+ }
+
+ public void setPermissions(List permissions) {
+ this.permissions = permissions;
+ }
+ }
+
}
\ No newline at end of file
diff --git a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/controller/PlcController.java b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/controller/PlcController.java
index c0a91b2..81fa8cb 100644
--- a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/controller/PlcController.java
+++ b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/controller/PlcController.java
@@ -333,5 +333,4 @@ public class PlcController {
return Result.success(aBoolean);
}
-
}
\ No newline at end of file
diff --git a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/controller/RecordDealController.java b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/controller/RecordDealController.java
new file mode 100644
index 0000000..8d10b05
--- /dev/null
+++ b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/controller/RecordDealController.java
@@ -0,0 +1,89 @@
+package com.rczn.rcznautoplc.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.rczn.domain.Result;
+import com.rczn.rcznautoplc.domain.RecordDeal;
+import com.rczn.rcznautoplc.service.RecordDealService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/recordDeal")
+@Tag(name = "异常处理记录管理", description = "异常处理记录增删改查+分页接口")
+public class RecordDealController {
+
+ @Autowired
+ private RecordDealService recordDealService;
+
+ @GetMapping(value = "/listPage", produces = MediaType.APPLICATION_JSON_VALUE)
+ @Operation(summary = "分页查询异常处理记录", description = "支持异常名称、类型、关联异常ID查询")
+ @Parameters({
+ @Parameter(name = "pageNum", required = true, example = "1", in = ParameterIn.QUERY),
+ @Parameter(name = "pageSize", required = true, example = "10", in = ParameterIn.QUERY),
+ @Parameter(name = "recordId", description = "关联异常ID", required = false, in = ParameterIn.QUERY),
+ @Parameter(name = "recordName", description = "异常名称(模糊)", required = false, in = ParameterIn.QUERY),
+ @Parameter(name = "recordType", description = "类型 1设备2样品3操作", required = false, in = ParameterIn.QUERY)
+ })
+ public Result listPage(
+ @RequestParam Integer pageNum,
+ @RequestParam Integer pageSize,
+ @RequestParam(required = false) Integer recordId,
+ @RequestParam(required = false) String recordName,
+ @RequestParam(required = false) Integer recordType) {
+ RecordDeal param = new RecordDeal();
+ param.setRecordId(recordId);
+ param.setRecordName(recordName);
+ param.setRecordType(recordType);
+ PageInfo page = recordDealService.selectPage(pageNum, pageSize, param);
+ return Result.success(page);
+ }
+
+ @GetMapping("/listByRecordId/{recordId}")
+ @Operation(summary = "根据异常ID查询处理记录")
+ public Result listByRecordId(@PathVariable Integer recordId) {
+ return Result.success(recordDealService.selectByRecordId(recordId));
+ }
+
+ @GetMapping("/getById/{id}")
+ @Operation(summary = "根据ID查询详情")
+ public Result getById(@PathVariable Long id) {
+ RecordDeal deal = recordDealService.selectById(id);
+ return deal != null ? Result.success(deal) : Result.error("记录不存在");
+ }
+
+ @PostMapping("/add")
+ @Operation(summary = "新增异常处理记录")
+ public Result add(@RequestBody RecordDeal recordDeal) {
+ try {
+ return Result.success(recordDealService.insert(recordDeal));
+ } catch (IllegalArgumentException e) {
+ return Result.error(e.getMessage());
+ }
+ }
+
+ @PutMapping("/update")
+ @Operation(summary = "修改异常处理记录")
+ public Result update(@RequestBody RecordDeal recordDeal) {
+ try {
+ return Result.success(recordDealService.update(recordDeal));
+ } catch (IllegalArgumentException e) {
+ return Result.error(e.getMessage());
+ }
+ }
+
+ @DeleteMapping("/del/{id}")
+ @Operation(summary = "删除处理记录(逻辑删除)")
+ public Result delete(@PathVariable Long id) {
+ try {
+ return Result.success(recordDealService.deleteById(id));
+ } catch (IllegalArgumentException e) {
+ return Result.error(e.getMessage());
+ }
+ }
+}
\ No newline at end of file
diff --git a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/DevInfo.java b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/DevInfo.java
index bd1a36a..e252b4d 100644
--- a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/DevInfo.java
+++ b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/DevInfo.java
@@ -29,7 +29,7 @@ public class DevInfo extends BaseBean {
private String company;
- private Integer status; // 0-空闲,1-运行,4-故障
+ private Integer status; //1:在线空闲 0:离线 2:忙碌 5:故障
private Integer runModel;//0-手动模式,1-自动模式
diff --git a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/IslandInfo.java b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/IslandInfo.java
index 3c965dc..b6d1f57 100644
--- a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/IslandInfo.java
+++ b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/IslandInfo.java
@@ -15,6 +15,9 @@ public class IslandInfo extends BaseBean {
private String islandLogo;
+ //1:在线空闲 0:离线 2:忙碌 5:故障
+ private Integer status;
+
private String desc;
public IslandInfo() {
diff --git a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/RecordDeal.java b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/RecordDeal.java
new file mode 100644
index 0000000..857446a
--- /dev/null
+++ b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/RecordDeal.java
@@ -0,0 +1,60 @@
+package com.rczn.rcznautoplc.domain;
+
+import com.rczn.domain.BaseBean;
+import java.time.LocalDateTime;
+
+/**
+ * 异常处理记录表
+ */
+public class RecordDeal extends BaseBean {
+
+ private Integer recordId; // 异常记录表ID
+ private String dealContent; // 处理内容
+ private String recordName; // 异常名称
+ private Integer recordType; // 异常类型 1-设备异常 2-样品异常 3-操作异常
+
+ public RecordDeal() {
+ }
+
+ public RecordDeal(Long id, Long createId, LocalDateTime createTime, Long updateId, LocalDateTime updateTime,
+ boolean delSign, String remark, Integer recordId, String dealContent,
+ String recordName, Integer recordType) {
+ super(id, createId, createTime, updateId, updateTime, delSign, remark);
+ this.recordId = recordId;
+ this.dealContent = dealContent;
+ this.recordName = recordName;
+ this.recordType = recordType;
+ }
+
+ public Integer getRecordId() {
+ return recordId;
+ }
+
+ public void setRecordId(Integer recordId) {
+ this.recordId = recordId;
+ }
+
+ public String getDealContent() {
+ return dealContent;
+ }
+
+ public void setDealContent(String dealContent) {
+ this.dealContent = dealContent;
+ }
+
+ public String getRecordName() {
+ return recordName;
+ }
+
+ public void setRecordName(String recordName) {
+ this.recordName = recordName;
+ }
+
+ public Integer getRecordType() {
+ return recordType;
+ }
+
+ public void setRecordType(Integer recordType) {
+ this.recordType = recordType;
+ }
+}
\ No newline at end of file
diff --git a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/RecordInfo.java b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/RecordInfo.java
index 043e333..81dca27 100644
--- a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/RecordInfo.java
+++ b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/domain/RecordInfo.java
@@ -5,6 +5,11 @@ import com.rczn.domain.BaseBean;
import java.time.LocalDateTime;
public class RecordInfo extends BaseBean {
+
+ private Integer islandId;//关联对应功能岛ID
+
+ private Integer devId;//关联对应设备ID
+
private String recordName;
private Integer recordType; // 1-设备异常,2-样品异常,3-操作异常
@@ -16,8 +21,31 @@ public class RecordInfo extends BaseBean {
public RecordInfo() {
}
- public RecordInfo(Long id, Long createId, LocalDateTime createTime, Long updateId, LocalDateTime updateTime, boolean delSign, String remark) {
+ public RecordInfo(Long id, Long createId, LocalDateTime createTime, Long updateId, LocalDateTime updateTime, boolean delSign, String remark, Integer islandId, Integer devId,
+ String recordName, Integer recordType, Boolean recordStatus, String recordContent) {
super(id, createId, createTime, updateId, updateTime, delSign, remark);
+ this.islandId = islandId;
+ this.devId = devId;
+ this.recordName = recordName;
+ this.recordType = recordType;
+ this.recordStatus = recordStatus;
+ this.recordContent = recordContent;
+ }
+
+ public Integer getIslandId() {
+ return islandId;
+ }
+
+ public void setIslandId(Integer islandId) {
+ this.islandId = islandId;
+ }
+
+ public Integer getDevId() {
+ return devId;
+ }
+
+ public void setDevId(Integer devId) {
+ this.devId = devId;
}
public String getRecordName() {
diff --git a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/mapper/RecordDealMapper.java b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/mapper/RecordDealMapper.java
new file mode 100644
index 0000000..d10011d
--- /dev/null
+++ b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/mapper/RecordDealMapper.java
@@ -0,0 +1,40 @@
+package com.rczn.rcznautoplc.mapper;
+
+import com.rczn.rcznautoplc.domain.RecordDeal;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import java.util.List;
+
+@Mapper
+public interface RecordDealMapper {
+
+ /**
+ * 新增
+ */
+ Long insert(RecordDeal recordDeal);
+
+ /**
+ * 修改
+ */
+ Boolean update(RecordDeal recordDeal);
+
+ /**
+ * 逻辑删除
+ */
+ Boolean deleteById(@Param("id") Long id);
+
+ /**
+ * 根据ID查询
+ */
+ RecordDeal selectById(@Param("id") Long id);
+
+ /**
+ * 分页条件查询
+ */
+ List selectPage(RecordDeal recordDeal);
+
+ /**
+ * 根据异常记录ID查询
+ */
+ List selectByRecordId(@Param("recordId") Integer recordId);
+}
\ No newline at end of file
diff --git a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/service/RecordDealService.java b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/service/RecordDealService.java
new file mode 100644
index 0000000..ee22cb2
--- /dev/null
+++ b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/service/RecordDealService.java
@@ -0,0 +1,20 @@
+package com.rczn.rcznautoplc.service;
+
+import com.github.pagehelper.PageInfo;
+import com.rczn.rcznautoplc.domain.RecordDeal;
+import java.util.List;
+
+public interface RecordDealService {
+
+ PageInfo selectPage(Integer pageNum, Integer pageSize, RecordDeal recordDeal);
+
+ RecordDeal selectById(Long id);
+
+ List selectByRecordId(Integer recordId);
+
+ Long insert(RecordDeal recordDeal);
+
+ Boolean update(RecordDeal recordDeal);
+
+ Boolean deleteById(Long id);
+}
\ No newline at end of file
diff --git a/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/service/impl/RecordDealServiceImpl.java b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/service/impl/RecordDealServiceImpl.java
new file mode 100644
index 0000000..277dcad
--- /dev/null
+++ b/rc_autoplc_backend/rczn-autoplc/src/main/java/com/rczn/rcznautoplc/service/impl/RecordDealServiceImpl.java
@@ -0,0 +1,67 @@
+package com.rczn.rcznautoplc.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.rczn.rcznautoplc.domain.RecordDeal;
+import com.rczn.rcznautoplc.mapper.RecordDealMapper;
+import com.rczn.rcznautoplc.service.RecordDealService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.List;
+
+@Service
+public class RecordDealServiceImpl implements RecordDealService {
+
+ @Autowired
+ private RecordDealMapper recordDealMapper;
+
+ @Override
+ public PageInfo selectPage(Integer pageNum, Integer pageSize, RecordDeal recordDeal) {
+ PageHelper.startPage(pageNum, pageSize);
+ List list = recordDealMapper.selectPage(recordDeal);
+ return new PageInfo<>(list);
+ }
+
+ @Override
+ public RecordDeal selectById(Long id) {
+ if (id == null) {
+ throw new IllegalArgumentException("ID不能为空");
+ }
+ return recordDealMapper.selectById(id);
+ }
+
+ @Override
+ public List selectByRecordId(Integer recordId) {
+ if (recordId == null) {
+ throw new IllegalArgumentException("异常记录ID不能为空");
+ }
+ return recordDealMapper.selectByRecordId(recordId);
+ }
+
+ @Override
+ public Long insert(RecordDeal recordDeal) {
+ if (recordDeal.getRecordId() == null) {
+ throw new IllegalArgumentException("异常记录ID不能为空");
+ }
+ if (recordDeal.getDealContent() == null || recordDeal.getDealContent().trim().isEmpty()) {
+ throw new IllegalArgumentException("处理内容不能为空");
+ }
+ return recordDealMapper.insert(recordDeal);
+ }
+
+ @Override
+ public Boolean update(RecordDeal recordDeal) {
+ if (recordDeal.getId() == null) {
+ throw new IllegalArgumentException("ID不能为空");
+ }
+ return recordDealMapper.update(recordDeal);
+ }
+
+ @Override
+ public Boolean deleteById(Long id) {
+ if (id == null) {
+ throw new IllegalArgumentException("ID不能为空");
+ }
+ return recordDealMapper.deleteById(id);
+ }
+}
\ No newline at end of file
diff --git a/rc_autoplc_backend/rczn-autoplc/src/main/resources/com/rczn/rcznautoplc/mapper/RecordDealMapper.xml b/rc_autoplc_backend/rczn-autoplc/src/main/resources/com/rczn/rcznautoplc/mapper/RecordDealMapper.xml
new file mode 100644
index 0000000..02754fa
--- /dev/null
+++ b/rc_autoplc_backend/rczn-autoplc/src/main/resources/com/rczn/rcznautoplc/mapper/RecordDealMapper.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+ id, create_id, create_time, update_id, update_time, del_sign, remark
+
+
+
+
+ record_id, deal_content, record_name, record_type
+
+
+
+
+ INSERT INTO tb_record_deal (
+ ,
+ create_id, create_time, update_id, update_time, del_sign
+ ) VALUES (
+ #{recordId}, #{dealContent}, #{recordName}, #{recordType},
+ #{createId}, NOW(), #{updateId}, NOW(), 0
+ )
+
+
+
+
+ UPDATE tb_record_deal
+
+ record_id = #{recordId},
+ deal_content = #{dealContent},
+ record_name = #{recordName},
+ record_type = #{recordType},
+ update_id = #{updateId},
+ update_time = NOW()
+
+ WHERE id = #{id} AND del_sign = 0
+
+
+
+
+ UPDATE tb_record_deal
+ SET del_sign = 1, update_time = NOW()
+ WHERE id = #{id} AND del_sign = 0
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/rc_autoplc_backend/rczn-autoplc/src/main/resources/com/rczn/rcznautoplc/mapper/RecordInfoMapper.xml b/rc_autoplc_backend/rczn-autoplc/src/main/resources/com/rczn/rcznautoplc/mapper/RecordInfoMapper.xml
index 827f0c1..cd40ffd 100644
--- a/rc_autoplc_backend/rczn-autoplc/src/main/resources/com/rczn/rcznautoplc/mapper/RecordInfoMapper.xml
+++ b/rc_autoplc_backend/rczn-autoplc/src/main/resources/com/rczn/rcznautoplc/mapper/RecordInfoMapper.xml
@@ -6,14 +6,14 @@
- record_name, record_type, record_status, record_content
+ island_id, dev_id, record_name, record_type, record_status, record_content
INSERT INTO tb_record_info (
,
create_id, create_time, update_id, update_time, del_sign
- ) VALUES (
+ ) VALUES (#{islandId}, #{devId},
#{recordName}, #{recordType}, #{recordStatus}, #{recordContent},
#{createId}, NOW(), #{updateId}, NOW(), 0
)
@@ -22,6 +22,8 @@
UPDATE tb_record_info
+ island_id = #{islandId},
+ dev_id = #{devId},
record_name = #{recordName},
record_type = #{recordType},
record_status = #{recordStatus},
diff --git a/rc_autoplc_backend/rczn-common/src/main/java/com/rczn/utils/JwtUtil.java b/rc_autoplc_backend/rczn-common/src/main/java/com/rczn/utils/JwtUtil.java
index 082a819..fc57887 100644
--- a/rc_autoplc_backend/rczn-common/src/main/java/com/rczn/utils/JwtUtil.java
+++ b/rc_autoplc_backend/rczn-common/src/main/java/com/rczn/utils/JwtUtil.java
@@ -28,7 +28,7 @@ public class JwtUtil {
}
public static void main(String[] args) {
- String token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGFpbXMiOnsicGVybWlzc2lvbnMiOlsiMTExMSIsIjIyMiIsIjU1NSJdLCJpZCI6MywidXNlcm5hbWUiOiJzdHJpbmcifSwiZXhwIjoxNzc2NzE2NzAyfQ.ynjs9Ys0CxoZjRstjz3mjr3c6NYMFiV3MmTGQYpJmKQ";//genToken(null);
+ String token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGFpbXMiOnsicGVybWlzc2lvbnMiOlsic3lzIiwiZGF0YSIsInRiIiwic3lzOnVzZXIiLCJzeXM6cm9sZSIsInN5czpwZXJtaXNzaW9uIiwic3lzOmRlcGFydG1lbnQiLCJzeXM6bWFuYWdlbG9nIiwiZGF0YTpwbGMiLCJkYXRhOmRldnBhcmFtIiwiZGF0YTpkZXYiLCJkYXRhOmlzbGFuZCIsImRhdGE6c29wIiwidGI6Z29vZGNvbnRyb2wiLCJ0Yjpnb29kcmVjb3JkIiwic3lzOnVzZXI6YWRkIiwic3lzOnVzZXI6dXBkIiwic3lzOnVzZXI6ZGVsIiwic3lzOnVzZXI6dXNlcnJvbGUiLCJzeXM6cm9sZTphZGQiLCJzeXM6cm9sZTp1cGQiLCJzeXM6cm9sZTpkZWwiLCJzeXM6cm9sZTpyb2xlcGVybWlzc2lvbiIsInN5czpwZXJtaXNzaW9uOmFkZCIsInN5czpwZXJtaXNzaW9uOnVwZCIsInN5czpwZXJtaXNzaW9uOmRlbCIsInN5czpkZXBhcnRtZW50OmFkZCIsInN5czpkZXBhcnRtZW50OnVwZCIsInN5czpkZXBhcnRtZW50OmRlbCIsInN5czptYW5hZ2Vsb2c6ZGV0YWlsIiwiZGF0YTpwbGM6YWRkIiwiZGF0YTpwbGM6dXBkIiwiZGF0YTpwbGM6ZGVsIiwiZGF0YTpkZXZwYXJhbTphZGQiLCJkYXRhOmRldnBhcmFtOnVwZCIsImRhdGE6ZGV2cGFyYW06ZGVsIiwiZGF0YTpkZXZwYXJhbTpyYW5nZSIsImRhdGE6ZGV2cGFyYW06c2VsZWN0IiwiZGF0YTpkZXY6YWRkIiwiZGF0YTpkZXY6dXBkIiwiZGF0YTpkZXY6ZGVsIiwiZGF0YTpkZXY6c2V0cGFyYW1ldGVycyIsImRhdGE6aXNsYW5kOmFkZCIsImRhdGE6aXNsYW5kOnVwZCIsImRhdGE6aXNsYW5kOmRlbCIsImRhdGE6c29wOmFkZCIsImRhdGE6c29wOmNsZWFyIiwiZGF0YTpzb3A6c2F2ZSIsInRiOmdvb2Rjb250cm9sOmNob29zZVNPUCIsInRiOmdvb2Rjb250cm9sOnVwZFNPUCIsInRiOmdvb2Rjb250cm9sOnZpZXdTT1AiLCJ0Yjpnb29kY29udHJvbDp1cGQiLCJ0Yjpnb29kY29udHJvbDpkZWwiLCJ0Yjpnb29kY29udHJvbDptb2RlbCIsInRiOmdvb2Rjb250cm9sOmNvbm5lY3Rpb24iLCJ0Yjpnb29kY29udHJvbDpleGVjdXRlIiwidGI6Z29vZGNvbnRyb2w6c3RvcCIsInRiOmdvb2Rjb250cm9sOnJlc2V0IiwidGI6Z29vZHJlY29yZDpkZXRhaWwiXSwiaWQiOjEsInVzZXJuYW1lIjoiYWRtaW4ifSwiZXhwIjoxNzc4MDc5OTM0fQ.L1SbAL7Vjzjrl7WjggVQXHlNuaYDXWgvvK3H5a0D5bY";//genToken(null);
System.out.println(token);
Map claims = parseToken(token);
System.out.println(claims);