浏览代码

Merge branch 'dev'

change 4 年之前
父节点
当前提交
49b63a5afc

+ 1 - 3
.drone-dev.yml

@@ -1,11 +1,9 @@
 kind: pipeline # 定义对象类型,还有secret和signature两种类型
 type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
 name: zz_backend # 定义流水线名称
-
 trigger:
   branch:
     - dev
-
 steps: # 定义流水线执行步骤,这些步骤将顺序执行
   - name: package # 流水线名称
     image: maven:3-jdk-8 # 定义创建容器的Docker镜像
@@ -26,7 +24,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
   - name: build-start
     image: appleboy/drone-ssh:latest # SSH工具镜像
     settings:
-      host: 192.168.0.222 # 远程连接地址
+      host: 192.168.1.222 # 远程连接地址
       username: root # 远程连接账号
       password:
         from_secret: ssh_password # 从Secret中读取SSH密码

+ 2 - 2
zhongzheng-admin/src/main/resources/application-dev.yml

@@ -6,7 +6,7 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://192.168.0.222:3306/zz_edu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
+                url: jdbc:mysql://192.168.1.222:3306/zz_edu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
                 username: root
                 password:  zhongzheng2021
             # 从库数据源
@@ -58,7 +58,7 @@ spring:
     # redis 配置
     redis:
         # 地址
-        host: 192.168.0.222
+        host: 192.168.1.222
         # 端口,默认为6379
         port: 6379
         # 数据库索引

+ 2 - 2
zhongzheng-api/src/main/resources/application-dev.yml

@@ -6,7 +6,7 @@ spring:
         druid:
             # 主库数据源
             master:
-                url: jdbc:mysql://192.168.0.222:3306/zz_edu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
+                url: jdbc:mysql://192.168.1.222:3306/zz_edu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
                 username: root
                 password: zhongzheng2021
             # 从库数据源
@@ -58,7 +58,7 @@ spring:
     # redis 配置
     redis:
         # 地址
-        host: 192.168.0.222
+        host: 192.168.1.222
         # 端口,默认为6379
         port: 6379
         # 数据库索引

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserPlanAddBo.java

@@ -46,7 +46,7 @@ public class UserPlanAddBo {
     @ApiModelProperty("$column.columnComment")
     private Long updateTime;
     /** 0 失效 1启用 */
-    @ApiModelProperty("0 失效 1启用")
+    @ApiModelProperty("0 失效 1启用 2修改计划")
     private Integer status;
     /** 总结数 */
     @ApiModelProperty("总结数")

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserPlanServiceImpl.java

@@ -291,7 +291,7 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
                     UserPlan userPlan = new UserPlan();
                     String s = JSON.toJSONString(userPlanVo.getCalendarStudyVo());
                     String s1 = JSON.toJSONString(userPlanVo.getStudyCount());
-
+                    userPlan.setUpdateTime(DateUtils.getNowTime());
                     userPlan.setStudyDay(bo.getStudyDay());
                     userPlan.setStudyCount(s1);
                     userPlan.setUserId(bo.getUserId());
@@ -329,7 +329,7 @@ public class UserPlanServiceImpl extends ServiceImpl<UserPlanMapper, UserPlan> i
                     UserPlan userPlan = new UserPlan();
                     String s = JSON.toJSONString(userPlanVo.getCalendarStudyVo());
                     String s1 = JSON.toJSONString(userPlanVo.getStudyCount());
-
+                    userPlan.setUpdateTime(DateUtils.getNowTime());
                     userPlan.setStudyDay(bo.getStudyDay());
                     userPlan.setStudyCount(s1);
                     userPlan.setUserId(bo.getUserId());

+ 4 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserPlanMapper.xml

@@ -122,6 +122,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectByUserPlan" parameterType="com.zhongzheng.modules.user.bo.UserPlanQueryBo"  resultMap="UserPlanResult">
         SELECT * FROM user_plan where 1=1 AND `status` =1
                                   AND user_id = #{userId}
+        <if test="planId != null and planId !=''">
+            and plan_id = #{planId}
+
+        </if>
     </select>
 
     <insert id="insertSource" parameterType="map" useGeneratedKeys="true" keyProperty="id" >