wangpeng hai 1 ano
pai
achega
a259d334b6

+ 24 - 0
db/update/menu/gkpartyvideo_menu.sql

@@ -0,0 +1,24 @@
+-- 该脚本不要直接执行, 注意维护菜单的父节点ID 默认 父节点-1 , 默认租户 1
+
+    -- 菜单SQL
+    insert into `sys_menu` ( `menu_id`,`parent_id`, `path`, `permission`, `menu_type`, `icon`, `del_flag`, `create_time`, `sort_order`, `update_time`, `name`, `tenant_id`)
+    values (1680934000016, '-1', '/gk/gkpartyvideo/index', '', '0', 'icon-bangzhushouji', '0', null , '8', null , '高科党建表管理', 1);
+
+-- 按钮父菜单ID
+    set @parentId = @@identity;
+
+-- 菜单对应按钮SQL
+    insert into `sys_menu` ( `menu_id`,`parent_id`, `permission`, `menu_type`, `path`, `icon`, `del_flag`, `create_time`, `sort_order`, `update_time`, `name`, `tenant_id`)
+    values (1680934000017,1680934000016, 'gk_gkpartyvideo_view', '1', null, '1',  '0', null, '0', null, '高科党建表查看', 1);
+
+    insert into `sys_menu` ( `menu_id`,`parent_id`, `permission`, `menu_type`, `path`, `icon`, `del_flag`, `create_time`, `sort_order`, `update_time`, `name`, `tenant_id`)
+    values (1680934000018,1680934000016, 'gk_gkpartyvideo_add', '1', null, '1',  '0', null, '1', null, '高科党建表新增', 1);
+
+    insert into `sys_menu` (`menu_id`, `parent_id`, `permission`, `menu_type`, `path`, `icon`,  `del_flag`, `create_time`, `sort_order`, `update_time`, `name`, `tenant_id`)
+    values (1680934000019,1680934000016, 'gk_gkpartyvideo_edit', '1', null, '1',  '0', null, '2', null, '高科党建表修改', 1);
+
+    insert into `sys_menu` (`menu_id`, `parent_id`, `permission`, `menu_type`, `path`, `icon`, `del_flag`, `create_time`, `sort_order`, `update_time`, `name`, `tenant_id`)
+    values (1680934000020,1680934000016, 'gk_gkpartyvideo_del', '1', null, '1',  '0', null, '3', null, '高科党建表删除', 1);
+
+    insert into `sys_menu` ( `menu_id`,`parent_id`, `permission`, `menu_type`, `path`, `icon`, `del_flag`, `create_time`, `sort_order`, `update_time`, `name`, `tenant_id`)
+    values (1680934000021,1680934000016, 'gk_gkpartyvideo_export', '1', null, '1',  '0', null, '3', null, '导入导出', 1);

+ 3 - 3
pigx-codegen/src/main/resources/application-dev.yml

@@ -1,15 +1,15 @@
 # 数据源
 spring:
   redis:
-    host: pigx-redis
+    host: 127.0.0.1
     database: 9  #避免和微服务 PIGX 冲突
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       username: root
-      password: root
-      url: jdbc:mysql://pigx-mysql:3306/pigxx_boot_codegen?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true
+      password: 123456
+      url: jdbc:mysql://localhost:3306/pigxx_boot_codegen?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true
   web:
     resources:
       static-locations: classpath:/static/,classpath:/views/

+ 129 - 0
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/gk/controller/GkPartyVideoController.java

@@ -0,0 +1,129 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.gk.controller;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.pig4cloud.pigx.common.core.util.R;
+import com.pig4cloud.pigx.common.log.annotation.SysLog;
+import com.pig4cloud.pigx.gk.entity.GkPartyVideo;
+import com.pig4cloud.pigx.gk.service.GkPartyVideoService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import com.pig4cloud.pigx.common.excel.annotation.ResponseExcel;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import org.springframework.http.HttpHeaders;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 高科党建表
+ *
+ * @author pigx code generator
+ * @date 2023-04-08 14:06:39
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/gk/gkpartyvideo" )
+@Tag(description = "gkpartyvideo" , name = "高科党建表管理" )
+@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
+public class GkPartyVideoController {
+
+    private final  GkPartyVideoService gkPartyVideoService;
+
+    /**
+     * 分页查询
+     * @param page 分页对象
+     * @param gkPartyVideo 高科党建表
+     * @return
+     */
+    @Operation(summary = "分页查询" , description = "分页查询" )
+    @GetMapping("/page" )
+    @PreAuthorize("@pms.hasPermission('gk_gkpartyvideo_view')" )
+    public R getGkPartyVideoPage(Page page, GkPartyVideo gkPartyVideo) {
+        return R.ok(gkPartyVideoService.page(page, Wrappers.query(gkPartyVideo)));
+    }
+
+
+    /**
+     * 通过id查询高科党建表
+     * @param id id
+     * @return R
+     */
+    @Operation(summary = "通过id查询" , description = "通过id查询" )
+    @GetMapping("/{id}" )
+    @PreAuthorize("@pms.hasPermission('gk_gkpartyvideo_view')" )
+    public R getById(@PathVariable("id" ) String id) {
+        return R.ok(gkPartyVideoService.getById(id));
+    }
+
+    /**
+     * 新增高科党建表
+     * @param gkPartyVideo 高科党建表
+     * @return R
+     */
+    @Operation(summary = "新增高科党建表" , description = "新增高科党建表" )
+    @SysLog("新增高科党建表" )
+    @PostMapping
+    @PreAuthorize("@pms.hasPermission('gk_gkpartyvideo_add')" )
+    public R save(@RequestBody GkPartyVideo gkPartyVideo) {
+        return R.ok(gkPartyVideoService.save(gkPartyVideo));
+    }
+
+    /**
+     * 修改高科党建表
+     * @param gkPartyVideo 高科党建表
+     * @return R
+     */
+    @Operation(summary = "修改高科党建表" , description = "修改高科党建表" )
+    @SysLog("修改高科党建表" )
+    @PutMapping
+    @PreAuthorize("@pms.hasPermission('gk_gkpartyvideo_edit')" )
+    public R updateById(@RequestBody GkPartyVideo gkPartyVideo) {
+        return R.ok(gkPartyVideoService.updateById(gkPartyVideo));
+    }
+
+    /**
+     * 通过id删除高科党建表
+     * @param id id
+     * @return R
+     */
+    @Operation(summary = "通过id删除高科党建表" , description = "通过id删除高科党建表" )
+    @SysLog("通过id删除高科党建表" )
+    @DeleteMapping("/{id}" )
+    @PreAuthorize("@pms.hasPermission('gk_gkpartyvideo_del')" )
+    public R removeById(@PathVariable String id) {
+        return R.ok(gkPartyVideoService.removeById(id));
+    }
+
+
+    /**
+     * 导出excel 表格
+     * @param gkPartyVideo 查询条件
+     * @return excel 文件流
+     */
+    @ResponseExcel
+    @GetMapping("/export")
+    @PreAuthorize("@pms.hasPermission('gk_gkpartyvideo_export')" )
+    public List<GkPartyVideo> export(GkPartyVideo gkPartyVideo) {
+        return gkPartyVideoService.list(Wrappers.query(gkPartyVideo));
+    }
+}

+ 92 - 0
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/gk/entity/GkPartyVideo.java

@@ -0,0 +1,92 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.gk.entity;
+
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 高科党建表
+ *
+ * @author pigx code generator
+ * @date 2023-04-08 14:06:39
+ */
+@Data
+@TableName("gk_party_video")
+@EqualsAndHashCode(callSuper = true)
+@Schema(description = "高科党建表")
+public class GkPartyVideo extends Model<GkPartyVideo> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.ASSIGN_ID)
+    @Schema(description="id")
+    private String id;
+
+    /**
+     * 标题
+     */
+    @Schema(description="标题")
+    private String title;
+
+    /**
+     * 封面图
+     */
+    @Schema(description="封面图")
+    private String coverImage;
+
+    /**
+     * 视频地址
+     */
+    @Schema(description="视频地址")
+    private String videoUrl;
+
+    /**
+     * 排序,默认0,越大越靠前
+     */
+    @Schema(description="排序,默认0,越大越靠前")
+    private Integer sort;
+
+    /**
+     * 1为normal,2为disabled
+     */
+    @Schema(description="1为normal,2为disabled")
+    private Integer status;
+
+    /**
+     * 创建时间
+     */
+    @Schema(description="创建时间")
+    private LocalDateTime createTime;
+
+    /**
+     * 更新时间
+     */
+    @Schema(description="更新时间")
+    private LocalDateTime updateTime;
+
+}

+ 33 - 0
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/gk/mapper/GkPartyVideoMapper.java

@@ -0,0 +1,33 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.gk.mapper;
+
+import com.pig4cloud.pigx.common.data.datascope.PigxBaseMapper;
+import com.pig4cloud.pigx.gk.entity.GkPartyVideo;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 高科党建表
+ *
+ * @author pigx code generator
+ * @date 2023-04-08 14:06:39
+ */
+@Mapper
+public interface GkPartyVideoMapper extends PigxBaseMapper<GkPartyVideo> {
+
+}

+ 31 - 0
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/gk/service/GkPartyVideoService.java

@@ -0,0 +1,31 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+
+package com.pig4cloud.pigx.gk.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.pig4cloud.pigx.gk.entity.GkPartyVideo;
+
+/**
+ * 高科党建表
+ *
+ * @author pigx code generator
+ * @date 2023-04-08 14:06:39
+ */
+public interface GkPartyVideoService extends IService<GkPartyVideo> {
+
+}

+ 34 - 0
pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/gk/service/impl/GkPartyVideoServiceImpl.java

@@ -0,0 +1,34 @@
+/*
+ *    Copyright (c) 2018-2025, lengleng All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the pig4cloud.com developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: lengleng (wangiegie@gmail.com)
+ */
+package com.pig4cloud.pigx.gk.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.pig4cloud.pigx.gk.entity.GkPartyVideo;
+import com.pig4cloud.pigx.gk.mapper.GkPartyVideoMapper;
+import com.pig4cloud.pigx.gk.service.GkPartyVideoService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 高科党建表
+ *
+ * @author pigx code generator
+ * @date 2023-04-08 14:06:39
+ */
+@Service
+public class GkPartyVideoServiceImpl extends ServiceImpl<GkPartyVideoMapper, GkPartyVideo> implements GkPartyVideoService {
+
+}

+ 3 - 3
pigx-upms/pigx-upms-biz/src/main/resources/application-dev.yml

@@ -20,15 +20,15 @@ gateway:
 # 数据源
 spring:
   redis:
-    host: pigx-redis
+    host: 127.0.0.1
     database: 9  #避免和微服务 PIGX 冲突
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       username: root
-      password: root
-      url: jdbc:mysql://pigx-mysql:3306/pigxx_boot?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true
+      password: 123456
+      url: jdbc:mysql://localhost:3306/pigxx_boot?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true
       stat-view-servlet:
         enabled: true
         allow: ""

+ 36 - 0
pigx-upms/pigx-upms-biz/src/main/resources/mapper/GkPartyVideoMapper.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~
+  ~      Copyright (c) 2018-2025, lengleng All rights reserved.
+  ~
+  ~  Redistribution and use in source and binary forms, with or without
+  ~  modification, are permitted provided that the following conditions are met:
+  ~
+  ~ Redistributions of source code must retain the above copyright notice,
+  ~  this list of conditions and the following disclaimer.
+  ~  Redistributions in binary form must reproduce the above copyright
+  ~  notice, this list of conditions and the following disclaimer in the
+  ~  documentation and/or other materials provided with the distribution.
+  ~  Neither the name of the pig4cloud.com developer nor the names of its
+  ~  contributors may be used to endorse or promote products derived from
+  ~  this software without specific prior written permission.
+  ~  Author: lengleng (wangiegie@gmail.com)
+  ~
+  -->
+
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="com.pig4cloud.pigx.gk.mapper.GkPartyVideoMapper">
+
+  <resultMap id="gkPartyVideoMap" type="com.pig4cloud.pigx.gk.entity.GkPartyVideo">
+        <id property="id" column="id"/>
+        <result property="title" column="title"/>
+        <result property="coverImage" column="cover_image"/>
+        <result property="videoUrl" column="video_url"/>
+        <result property="sort" column="sort"/>
+        <result property="status" column="status"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+  </resultMap>
+</mapper>