Просмотр исходного кода

平台服务商+服务商模块

ZhangWenQiang 6 лет назад
Родитель
Сommit
5c2b5d860e

+ 1 - 1
happy-boot-module-powerjob/src/main/java/org/jeecg/modules/hlgplatform/controller/HlgPlatformSubcontractorController.java

@@ -77,7 +77,7 @@ public class HlgPlatformSubcontractorController {
 	public Result<HlgPlatformSubcontractor> add(@RequestBody HlgPlatformSubcontractor hlgPlatformSubcontractor) {
 	public Result<HlgPlatformSubcontractor> add(@RequestBody HlgPlatformSubcontractor hlgPlatformSubcontractor) {
 		Result<HlgPlatformSubcontractor> result = new Result<HlgPlatformSubcontractor>();
 		Result<HlgPlatformSubcontractor> result = new Result<HlgPlatformSubcontractor>();
 		try {
 		try {
-			hlgPlatformSubcontractorService.save(hlgPlatformSubcontractor);
+			hlgPlatformSubcontractorService.savePlatformSubcontractor(hlgPlatformSubcontractor);
 			result.success("添加成功!");
 			result.success("添加成功!");
 		} catch (Exception e) {
 		} catch (Exception e) {
 			log.error(e.getMessage(),e);
 			log.error(e.getMessage(),e);

+ 2 - 1
happy-boot-module-powerjob/src/main/java/org/jeecg/modules/hlgplatform/entity/HlgPlatformSubcontractor.java

@@ -25,7 +25,7 @@ public class HlgPlatformSubcontractor implements Serializable {
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
     
     
 	/**主键*/
 	/**主键*/
-	@TableId(type = IdType.ID_WORKER_STR)
+	@TableId(type = IdType.AUTO)
 	private java.lang.Integer id;
 	private java.lang.Integer id;
 	/**所属平台*/
 	/**所属平台*/
 	@Excel(name = "所属平台", width = 15)
 	@Excel(name = "所属平台", width = 15)
@@ -38,6 +38,7 @@ public class HlgPlatformSubcontractor implements Serializable {
 	private java.lang.String sysOrgCode;
 	private java.lang.String sysOrgCode;
 	/**停用/启用(0:停用 1:启用)*/
 	/**停用/启用(0:停用 1:启用)*/
 	@Excel(name = "停用/启用(0:停用 1:启用)", width = 15)
 	@Excel(name = "停用/启用(0:停用 1:启用)", width = 15)
+	@Dict(dicCode = "is_on")
 	private java.lang.String isOn;
 	private java.lang.String isOn;
 
 
 	/**
 	/**

+ 2 - 0
happy-boot-module-powerjob/src/main/java/org/jeecg/modules/hlgplatform/service/IHlgPlatformSubcontractorService.java

@@ -15,4 +15,6 @@ import org.jeecg.modules.hlgplatform.entity.HlgPlatformSubcontractor;
 public interface IHlgPlatformSubcontractorService extends IService<HlgPlatformSubcontractor> {
 public interface IHlgPlatformSubcontractorService extends IService<HlgPlatformSubcontractor> {
 
 
     Page<HlgPlatformSubcontractor> pageList(Page<HlgPlatformSubcontractor> page, HlgPlatformSubcontractor hlgPlatformSubcontractor, QueryWrapper<HlgPlatformSubcontractor> queryWrapper);
     Page<HlgPlatformSubcontractor> pageList(Page<HlgPlatformSubcontractor> page, HlgPlatformSubcontractor hlgPlatformSubcontractor, QueryWrapper<HlgPlatformSubcontractor> queryWrapper);
+
+    void savePlatformSubcontractor(HlgPlatformSubcontractor hlgPlatformSubcontractor);
 }
 }

+ 8 - 0
happy-boot-module-powerjob/src/main/java/org/jeecg/modules/hlgplatform/service/impl/HlgPlatformSubcontractorServiceImpl.java

@@ -8,6 +8,7 @@ import org.jeecg.modules.hlgplatform.service.IHlgPlatformSubcontractorService;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.transaction.annotation.Transactional;
 
 
 /**
 /**
  * @Description: 平台服务商表
  * @Description: 平台服务商表
@@ -22,4 +23,11 @@ public class HlgPlatformSubcontractorServiceImpl extends ServiceImpl<HlgPlatform
     public Page<HlgPlatformSubcontractor> pageList(Page<HlgPlatformSubcontractor> pageList, HlgPlatformSubcontractor hlgPlatformSubcontractor, QueryWrapper<HlgPlatformSubcontractor> queryWrapper) {
     public Page<HlgPlatformSubcontractor> pageList(Page<HlgPlatformSubcontractor> pageList, HlgPlatformSubcontractor hlgPlatformSubcontractor, QueryWrapper<HlgPlatformSubcontractor> queryWrapper) {
         return pageList.setRecords(baseMapper.findList(pageList, hlgPlatformSubcontractor, queryWrapper));
         return pageList.setRecords(baseMapper.findList(pageList, hlgPlatformSubcontractor, queryWrapper));
     }
     }
+
+    @Override
+    @Transactional
+    public void savePlatformSubcontractor(HlgPlatformSubcontractor hlgPlatformSubcontractor) {
+        hlgPlatformSubcontractor.setIsOn("1");
+        save(hlgPlatformSubcontractor);
+    }
 }
 }

+ 1 - 1
happy-boot-module-powerjob/src/main/java/org/jeecg/modules/hlgsubcontractor/entity/HlgSubcontractor.java

@@ -24,7 +24,7 @@ public class HlgSubcontractor implements Serializable {
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
     
     
 	/**主键*/
 	/**主键*/
-	@TableId(type = IdType.ID_WORKER_STR)
+	@TableId(type = IdType.AUTO)
 	private java.lang.Integer id;
 	private java.lang.Integer id;
 	/**名称*/
 	/**名称*/
 	@Excel(name = "名称", width = 15)
 	@Excel(name = "名称", width = 15)