docker-compose/mysql/initdb/se_cloud_20241204.sql
@@ -13,12 +13,15 @@ drop table if exists sys_task_ctrl; create table sys_task_ctrl ( task_id bigint(20) not null auto_increment comment 'ä»»å¡ID', prj_id varchar(50) comment 'ä»»å¡ID', prj_name varchar(200) comment 'ä»»å¡åç§°', task_name varchar(200) comment 'ä»»å¡åç§°', prj_id varchar(50) comment 'æ¹æ¡ID', prj_name varchar(200) comment 'æ¹æ¡åç§°', think_id varchar(50) comment 'æ³å®ID', think_name varchar(200) comment 'æ³å®åç§°', begin_time varchar(50) comment 'å¼å§æ¶é´', end_time varchar(50) comment 'ç»ææ¶é´', calc_node varchar(2000) comment '计ç®èç¹', is_save char(1) default 0 comment 'æ¯å¦ä¿åï¼0æ£å¸¸ 1åç¨ï¼', node varchar(2000) comment 'èç¹', status char(1) default 0 comment 'ç¶æï¼0æ£å¸¸ 1åç¨ï¼', create_by varchar(64) default '' comment 'å建è ', create_time datetime comment 'å建æ¶é´', se-modules/se-docker/src/main/java/com/se/docker/service/SysDockerService.java
@@ -1,8 +1,8 @@ package com.se.docker.service; import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.CreateContainerResponse; import com.github.dockerjava.api.command.InspectContainerResponse; import com.github.dockerjava.api.command.*; import com.github.dockerjava.api.model.PullResponseItem; import com.github.dockerjava.core.DockerClientBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -51,4 +51,49 @@ log.error(ex.getMessage(), ex); } } public void s() throws Exception { // è·åé»è®¤ç Docker Client DockerClient dockerClient = DockerClientBuilder.getInstance().build(); // æåéå String image = "openjdk:8-alpine"; PullImageCmd pullImageCmd = dockerClient.pullImageCmd(image); PullImageResultCallback pullImageResultCallback = new PullImageResultCallback() { @Override public void onNext(PullResponseItem item) { System.out.println("ä¸è½½éåï¼" + item.getStatus()); super.onNext(item); } }; pullImageCmd .exec(pullImageResultCallback) .awaitCompletion(); System.out.println("ä¸è½½å®æ"); // åå»ºå®¹å¨ CreateContainerCmd containerCmd = dockerClient.createContainerCmd(image); CreateContainerResponse createContainerResponse = containerCmd .withCmd("echo", "Hello Docker") .exec(); System.out.println(createContainerResponse); // å¯å¨å®¹å¨ String containerId = ""; dockerClient.startContainerCmd(containerId).exec(); // æå»ºåæ¢å®¹å¨çå½ä»¤ StopContainerCmd stopContainerCmd = dockerClient.stopContainerCmd(containerId); // æ§è¡å½ä»¤ stopContainerCmd.exec(); // å é¤å®¹å¨ dockerClient.removeContainerCmd(containerId).withForce(true).exec(); // å é¤éå dockerClient.removeImageCmd(image).exec(); // éå¯å®¹å¨ dockerClient.restartContainerCmd(containerId).exec(); } } se-modules/se-system/src/main/java/com/se/system/domain/SysTaskCtrl.java
@@ -9,113 +9,161 @@ * åç³»ç»ä»»å¡æ§å¶å¯¹è±¡ sys_task_ctrl * * @author se * @date 2024-12-07 * @date 2024-12-09 */ public class SysTaskCtrl extends BaseEntity { public class SysTaskCtrl extends BaseEntity { private static final long serialVersionUID = 1L; /** ä»»å¡ID */ /** * ä»»å¡ID */ private Long taskId; /** ä»»å¡ID */ @Excel(name = "ä»»å¡ID") /** * ä»»å¡åç§° */ @Excel(name = "ä»»å¡åç§°") private String taskName; /** * æ¹æ¡ID */ @Excel(name = "æ¹æ¡ID") private String prjId; /** ä»»å¡åç§° */ @Excel(name = "ä»»å¡åç§°") /** * æ¹æ¡åç§° */ @Excel(name = "æ¹æ¡åç§°") private String prjName; /** æ³å®ID */ /** * æ³å®ID */ @Excel(name = "æ³å®ID") private String thinkId; /** æ³å®åç§° */ /** * æ³å®åç§° */ @Excel(name = "æ³å®åç§°") private String thinkName; /** æ¯å¦ä¿åï¼0æ£å¸¸ 1åç¨ï¼ */ /** * å¼å§æ¶é´ */ @Excel(name = "å¼å§æ¶é´") private String beginTime; /** * ç»ææ¶é´ */ @Excel(name = "ç»ææ¶é´") private String endTime; /** * 计ç®èç¹ */ @Excel(name = "计ç®èç¹") private String calcNode; /** * æ¯å¦ä¿åï¼0æ£å¸¸ 1åç¨ï¼ */ @Excel(name = "æ¯å¦ä¿å", readConverterExp = "0=æ£å¸¸,1=åç¨") private String isSave; /** èç¹ */ @Excel(name = "èç¹") private String node; /** ç¶æï¼0æ£å¸¸ 1åç¨ï¼ */ /** * ç¶æï¼0æ£å¸¸ 1åç¨ï¼ */ @Excel(name = "ç¶æ", readConverterExp = "0=æ£å¸¸,1=åç¨") private String status; public void setTaskId(Long taskId) { public void setTaskId(Long taskId) { this.taskId = taskId; } public Long getTaskId() { public Long getTaskId() { return taskId; } public void setPrjId(String prjId) { public void setTaskName(String taskName) { this.taskName = taskName; } public String getTaskName() { return taskName; } public void setPrjId(String prjId) { this.prjId = prjId; } public String getPrjId() { public String getPrjId() { return prjId; } public void setPrjName(String prjName) { public void setPrjName(String prjName) { this.prjName = prjName; } public String getPrjName() { public String getPrjName() { return prjName; } public void setThinkId(String thinkId) { public void setThinkId(String thinkId) { this.thinkId = thinkId; } public String getThinkId() { public String getThinkId() { return thinkId; } public void setThinkName(String thinkName) { public void setThinkName(String thinkName) { this.thinkName = thinkName; } public String getThinkName() { public String getThinkName() { return thinkName; } public void setIsSave(String isSave) { public void setBeginTime(String beginTime) { this.beginTime = beginTime; } public String getBeginTime() { return beginTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public String getEndTime() { return endTime; } public void setCalcNode(String calcNode) { this.calcNode = calcNode; } public String getCalcNode() { return calcNode; } public void setIsSave(String isSave) { this.isSave = isSave; } public String getIsSave() { public String getIsSave() { return isSave; } public void setNode(String node) { this.node = node; } public String getNode() { return node; } public void setStatus(String status) { public void setStatus(String status) { this.status = status; } public String getStatus() { public String getStatus() { return status; } @@ -123,12 +171,15 @@ public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) .append("taskId", getTaskId()) .append("taskName", getTaskName()) .append("prjId", getPrjId()) .append("prjName", getPrjName()) .append("thinkId", getThinkId()) .append("thinkName", getThinkName()) .append("beginTime", getBeginTime()) .append("endTime", getEndTime()) .append("calcNode", getCalcNode()) .append("isSave", getIsSave()) .append("node", getNode()) .append("status", getStatus()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) se-modules/se-system/src/main/java/com/se/system/mapper/SysTaskCtrlMapper.java
@@ -7,7 +7,7 @@ * åç³»ç»ä»»å¡æ§å¶Mapperæ¥å£ * * @author se * @date 2024-12-07 * @date 2024-12-09 */ public interface SysTaskCtrlMapper { se-modules/se-system/src/main/java/com/se/system/service/impl/SysTaskCtrlServiceImpl.java
@@ -2,10 +2,10 @@ import java.util.List; import com.se.common.core.utils.DateUtils; import com.se.system.service.inte.ISysTaskCtrlService; import org.springframework.stereotype.Service; import com.se.system.mapper.SysTaskCtrlMapper; import com.se.system.domain.SysTaskCtrl; import com.se.system.service.inte.ISysTaskCtrlService; import javax.annotation.Resource; @@ -13,7 +13,7 @@ * åç³»ç»ä»»å¡æ§å¶Serviceä¸å¡å±å¤ç * * @author se * @date 2024-12-07 * @date 2024-12-09 */ @Service public class SysTaskCtrlServiceImpl implements ISysTaskCtrlService se-modules/se-system/src/main/java/com/se/system/service/inte/ISysTaskCtrlService.java
@@ -7,7 +7,7 @@ * åç³»ç»ä»»å¡æ§å¶Serviceæ¥å£ * * @author se * @date 2024-12-07 * @date 2024-12-09 */ public interface ISysTaskCtrlService { se-modules/se-system/src/main/resources/mapper/system/SysTaskCtrlMapper.xml
@@ -6,12 +6,15 @@ <resultMap type="SysTaskCtrl" id="SysTaskCtrlResult"> <result property="taskId" column="task_id" /> <result property="taskName" column="task_name" /> <result property="prjId" column="prj_id" /> <result property="prjName" column="prj_name" /> <result property="thinkId" column="think_id" /> <result property="thinkName" column="think_name" /> <result property="beginTime" column="begin_time" /> <result property="endTime" column="end_time" /> <result property="calcNode" column="calc_node" /> <result property="isSave" column="is_save" /> <result property="node" column="node" /> <result property="status" column="status" /> <result property="createBy" column="create_by" /> <result property="createTime" column="create_time" /> @@ -21,18 +24,21 @@ </resultMap> <sql id="selectSysTaskCtrlVo"> select task_id, prj_id, prj_name, think_id, think_name, is_save, node, status, create_by, create_time, update_by, update_time, remark from sys_task_ctrl select task_id, task_name, prj_id, prj_name, think_id, think_name, begin_time, end_time, calc_node, is_save, status, create_by, create_time, update_by, update_time, remark from sys_task_ctrl </sql> <select id="selectSysTaskCtrlList" parameterType="SysTaskCtrl" resultMap="SysTaskCtrlResult"> <include refid="selectSysTaskCtrlVo"/> <where> <if test="taskName != null and taskName != ''"> and task_name like concat('%', #{taskName}, '%')</if> <if test="prjId != null and prjId != ''"> and prj_id = #{prjId}</if> <if test="prjName != null and prjName != ''"> and prj_name like concat('%', #{prjName}, '%')</if> <if test="thinkId != null and thinkId != ''"> and think_id = #{thinkId}</if> <if test="thinkName != null and thinkName != ''"> and think_name like concat('%', #{thinkName}, '%')</if> <if test="beginTime != null and beginTime != ''"> and begin_time = #{beginTime}</if> <if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if> <if test="calcNode != null and calcNode != ''"> and calc_node = #{calcNode}</if> <if test="isSave != null and isSave != ''"> and is_save = #{isSave}</if> <if test="node != null and node != ''"> and node = #{node}</if> <if test="status != null and status != ''"> and status = #{status}</if> </where> </select> @@ -45,12 +51,15 @@ <insert id="insertSysTaskCtrl" parameterType="SysTaskCtrl" useGeneratedKeys="true" keyProperty="taskId"> insert into sys_task_ctrl <trim prefix="(" suffix=")" suffixOverrides=","> <if test="taskName != null">task_name,</if> <if test="prjId != null">prj_id,</if> <if test="prjName != null">prj_name,</if> <if test="thinkId != null">think_id,</if> <if test="thinkName != null">think_name,</if> <if test="beginTime != null">begin_time,</if> <if test="endTime != null">end_time,</if> <if test="calcNode != null">calc_node,</if> <if test="isSave != null">is_save,</if> <if test="node != null">node,</if> <if test="status != null">status,</if> <if test="createBy != null">create_by,</if> <if test="createTime != null">create_time,</if> @@ -59,12 +68,15 @@ <if test="remark != null">remark,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="taskName != null">#{taskName},</if> <if test="prjId != null">#{prjId},</if> <if test="prjName != null">#{prjName},</if> <if test="thinkId != null">#{thinkId},</if> <if test="thinkName != null">#{thinkName},</if> <if test="beginTime != null">#{beginTime},</if> <if test="endTime != null">#{endTime},</if> <if test="calcNode != null">#{calcNode},</if> <if test="isSave != null">#{isSave},</if> <if test="node != null">#{node},</if> <if test="status != null">#{status},</if> <if test="createBy != null">#{createBy},</if> <if test="createTime != null">#{createTime},</if> @@ -77,12 +89,15 @@ <update id="updateSysTaskCtrl" parameterType="SysTaskCtrl"> update sys_task_ctrl <trim prefix="SET" suffixOverrides=","> <if test="taskName != null">task_name = #{taskName},</if> <if test="prjId != null">prj_id = #{prjId},</if> <if test="prjName != null">prj_name = #{prjName},</if> <if test="thinkId != null">think_id = #{thinkId},</if> <if test="thinkName != null">think_name = #{thinkName},</if> <if test="beginTime != null">begin_time = #{beginTime},</if> <if test="endTime != null">end_time = #{endTime},</if> <if test="calcNode != null">calc_node = #{calcNode},</if> <if test="isSave != null">is_save = #{isSave},</if> <if test="node != null">node = #{node},</if> <if test="status != null">status = #{status},</if> <if test="createBy != null">create_by = #{createBy},</if> <if test="createTime != null">create_time = #{createTime},</if> ˵Ã÷.txt
@@ -64,7 +64,9 @@ # 䏿 ¡éªç½åå ignore: whites: - /system/index/* # - /system/index/* - /system/reg/* - /system/taskCtrl/* -------------------------------------------------------- se-system-dev.ymlï¼æ·»å ï¼