Browse Source

查询固有维保项所属公司id修改

wanghaicheng 5 năm trước cách đây
mục cha
commit
828c0ff174

+ 7 - 7
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/option/controller/MaintenanceOptionController.java

@@ -41,8 +41,8 @@ public class MaintenanceOptionController {
     public RestResponse list(@RequestBody OptionReq req) {
         IPage<MaintenanceOption> page = optionService.page(
                 new Page<>(req.getPageNum(), req.getPageSize()), new QueryWrapper<MaintenanceOption>()
-                        //10086是平台的团队id
-                        .in("mt_company_id", 10086L, req.getMtCompanyId())
+                        //0L是固定数据的公司id
+                        .in("mt_company_id", 0L, req.getMtCompanyId())
                         //留1是为了兼容以前数据,2.0使用的status版本1 ,    3.0使用的status版本2
                         .eq("status", 2)
                         .in(req.getType() != null, "type", type(req))
@@ -70,8 +70,8 @@ public class MaintenanceOptionController {
         }
         List<MaintenanceOption> options = optionService.list(
                 new QueryWrapper<MaintenanceOption>()
-                        //10086是平台的团队id
-                        .in("mt_company_id", 10086L, req.getMtCompanyId())
+                        //0L是固定数据的公司id
+                        .in("mt_company_id", 0L, req.getMtCompanyId())
                         //留1是为了兼容以前数据,2.0使用的status版本1 ,    3.0使用的status版本2
                         .eq("status", 2)
                         .in(req.getType() != null, "type", type(req))
@@ -108,8 +108,8 @@ public class MaintenanceOptionController {
      */
     @PostMapping("/modify")
     public RestResponse modify(@RequestBody MaintenanceOption option) {
-        //10086是平台的团队id
-        if (option.getMtCompanyId().equals(10086L)) {
+        //0L是固定数据的公司id
+        if (option.getMtCompanyId().equals(0L)) {
             return RestResponse.fail("默认维保项无法编辑");
         }
         if (optionService.updateById(option)) {
@@ -127,7 +127,7 @@ public class MaintenanceOptionController {
     @PostMapping("/delete")
     public RestResponse delete(@RequestBody MaintenanceOption option) {
         //10086是平台的团队id
-        if (option.getMtCompanyId().equals(10086L)) {
+        if (option.getMtCompanyId().equals(0L)) {
             return RestResponse.fail("默认维保项无法删除");
         }
         if (optionService.removeById(option.getId())) {