完成表更改

master
ymnets 5 months ago
parent fbe732e042
commit 68404c252a

@ -5,8 +5,21 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="ef55dc1b-11d9-4203-81db-14a06469a368" name="更改" comment=""> <list default="true" id="ef55dc1b-11d9-4203-81db-14a06469a368" name="更改" comment="">
<change afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/.idea/easyCodeTableSetting.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/dto/ZccmQrAccessoryDto.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/mapper/ZccmQrAccessoryMapper.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/model/ZccmQrAccessory.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/ZccmQrAccessoryService.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-business/src/main/java/com/hc/business/service/impl/ZccmQrAccessoryServiceImpl.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-business/src/main/resources/mapper/ZccmQrAccessoryMapper.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-web/src/main/java/com/hc/web/controller/browser/app/AppQrAccessoryController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gp-business/src/main/resources/mapper/WebNewsMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/gp-business/src/main/resources/mapper/WebNewsMapper.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/gp-web/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/gp-web/src/main/resources/application.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-business/src/main/resources/mapper/ZccmUserInvoicesMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-business/src/main/resources/mapper/ZccmUserInvoicesMapper.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-business/src/main/resources/mapper/ZccmUserMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-business/src/main/resources/mapper/ZccmUserMapper.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-web/src/main/java/com/hc/web/aspect/AppUserAspect.java" beforeDir="false" afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-web/src/main/java/com/hc/web/aspect/AppUserAspect.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-web/src/main/resources/application-pro.yml" beforeDir="false" afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-web/src/main/resources/application-pro.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-web/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/../JAVA_MYSQL_ZC/jxjy-web/src/main/resources/application.yml" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -47,7 +60,7 @@
"RunOnceActivity.ShowReadmeOnStart": "true", "RunOnceActivity.ShowReadmeOnStart": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true", "SHARE_PROJECT_CONFIGURATION_FILES": "true",
"WebServerToolWindowFactoryState": "false", "WebServerToolWindowFactoryState": "false",
"last_opened_file_path": "F:/02.FNSProject/政采", "last_opened_file_path": "F:/02.FNSProject/政采/JAVA_MYSQL_WEBSITE",
"settings.editor.selected.configurable": "web.server", "settings.editor.selected.configurable": "web.server",
"spring.configuration.checksum": "420f802bde281311b05da23e05cddeda" "spring.configuration.checksum": "420f802bde281311b05da23e05cddeda"
}, },
@ -101,6 +114,7 @@
<workItem from="1730775057656" duration="322000" /> <workItem from="1730775057656" duration="322000" />
<workItem from="1730786878796" duration="2909000" /> <workItem from="1730786878796" duration="2909000" />
<workItem from="1730888299302" duration="12000" /> <workItem from="1730888299302" duration="12000" />
<workItem from="1731032769092" duration="927000" />
</task> </task>
<task id="LOCAL-00001" summary="更改表名字"> <task id="LOCAL-00001" summary="更改表名字">
<created>1730470371982</created> <created>1730470371982</created>

@ -5,7 +5,7 @@ spring:
resources: resources:
static-locations: classpath:/static/,classpath:/resources/ static-locations: classpath:/static/,classpath:/resources/
profiles: profiles:
active: dev active: pro
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EasyCodeTableSetting">
<option name="tableInfoMap">
<map>
<entry key="gp_union.zccm_qr_accessory">
<value>
<TableInfoDTO>
<option name="comment" value="二维码扫码附件表" />
<option name="fullColumn">
<list>
<ColumnInfoDTO>
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="qrId" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="课程ID" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="courseId" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="二维码索引" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="qrIndex" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="123表示文件视频音频" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="qrType" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="章节ID" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="chapterId" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="文件名" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="fileName" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="文件url地址" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="fileUrl" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="二维码地址" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="qrUrl" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
</list>
</option>
<option name="name" value="ZccmQrAccessory" />
<option name="preName" value="" />
<option name="saveModelName" value="jxjy-web" />
<option name="savePackageName" value="com.hc.web.controller.browser.back" />
<option name="savePath" value="./jxjy-web/src/main/java/com/hc/web/controller/browser/back" />
<option name="templateGroupName" value="Code-Jia" />
</TableInfoDTO>
</value>
</entry>
</map>
</option>
</component>
</project>

@ -0,0 +1,53 @@
package com.hc.business.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
/**
* @author 10696
* @since 2020/11/25 10:41
*/
@Getter
public class ZccmQrAccessoryDto {
private Integer qrId;
/**
* ID
*/
private Integer courseId;
private String courseName;
/**
*
*/
private Integer qrIndex;
/**
* 123
*/
private Integer qrType;
/**
* ID
*/
private Integer chapterId;
/**
*
*/
private String fileName;
/**
* url
*/
private String fileUrl;
/**
*
*/
private String qrUrl;
}

@ -0,0 +1,28 @@
package com.hc.business.mapper;
import com.hc.business.dto.ZccmQrAccessoryDto;
import com.hc.business.model.ZccmPaperQuestion;
import com.hc.business.model.ZccmQrAccessory;
import com.hc.core.utils.mapper.Mapper;
import io.swagger.annotations.ApiParam;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* (ZccmQrAccessory)访
*
* @author makejava
* @since 2024-11-08 09:39:45
*/
@Repository
public interface ZccmQrAccessoryMapper extends Mapper<ZccmQrAccessory> {
List<ZccmQrAccessoryDto> queryByAll( Integer courseId,
Integer qrIndex,
Integer qrType,
Integer chapterId,
String fileName);
}

@ -0,0 +1,66 @@
package com.hc.business.model;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@ApiModel(value = "二维码")
@Data
public class ZccmQrAccessory implements Serializable {
private static final long serialVersionUID = -18731097154567834L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@ApiModelProperty(value = "${column.comment}",required = true)
private Integer qrId;
/**
* ID
*/
@ApiModelProperty(value = "课程ID",required = true)
private Integer courseId;
/**
*
*/
@ApiModelProperty(value = "二维码索引",required = true)
private Integer qrIndex;
/**
* 123
*/
@ApiModelProperty(value = "123表示文件视频音频",required = true)
private Integer qrType;
/**
* ID
*/
@ApiModelProperty(value = "章节ID",required = true)
private Integer chapterId;
/**
*
*/
@ApiModelProperty(value = "文件名",required = true)
private String fileName;
/**
* url
*/
@ApiModelProperty(value = "文件url地址",required = true)
private String fileUrl;
/**
*
*/
@ApiModelProperty(value = "二维码地址",required = true)
private String qrUrl;
}

@ -0,0 +1,71 @@
package com.hc.business.service;
import com.github.pagehelper.PageInfo;
import com.hc.business.model.ZccmQrAccessory;
import org.springframework.stereotype.Component;
/**
* (ZccmQrAccessory)
*
* @author makejava
* @since 2024-11-08 09:45:36
*/
@Component
public interface ZccmQrAccessoryService {
/**
* ID
*
* @param qrId
* @return
*/
ZccmQrAccessory queryById(Integer qrId);
/**
*
*
* @param zccmQrAccessory
* @return
*/
ZccmQrAccessory insert(ZccmQrAccessory zccmQrAccessory);
/**
*
*
* @param zccmQrAccessory
* @return
*/
ZccmQrAccessory update(ZccmQrAccessory zccmQrAccessory);
/**
*
*
* @param qrId
* @return
*/
boolean deleteById(Integer qrId);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryAllByLimit(int page, int size);
/**
*
*
* @param page
* @param size
* @return
*/
PageInfo queryByAll(int page, int size,Integer courseId,
Integer qrIndex,
Integer qrType,
Integer chapterId,
String fileName);
}

@ -0,0 +1,94 @@
package com.hc.business.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hc.business.mapper.ZccmQrAccessoryMapper;
import com.hc.business.model.ZccmQrAccessory;
import com.hc.business.service.ZccmQrAccessoryService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* (ZccmQrAccessory)
*
* @author makejava
* @since 2024-11-08 09:46:39
*/
@Service("zccmQrAccessoryService")
public class ZccmQrAccessoryServiceImpl implements ZccmQrAccessoryService {
private final ZccmQrAccessoryMapper zccmQrAccessoryMapper;
public ZccmQrAccessoryServiceImpl(ZccmQrAccessoryMapper zccmQrAccessoryMapper) {
this.zccmQrAccessoryMapper = zccmQrAccessoryMapper;
}
/**
* ID
*
* @param qrId
* @return
*/
@Override
public ZccmQrAccessory queryById(Integer qrId) {
return this.zccmQrAccessoryMapper.selectByPrimaryKey(qrId);
}
/**
*
*
* @param zccmQrAccessory
* @return
*/
@Override
public ZccmQrAccessory insert(ZccmQrAccessory zccmQrAccessory) {
this.zccmQrAccessoryMapper.insert(zccmQrAccessory);
return zccmQrAccessory;
}
/**
*
*
* @param zccmQrAccessory
* @return
*/
@Override
public ZccmQrAccessory update(ZccmQrAccessory zccmQrAccessory) {
this.zccmQrAccessoryMapper.updateByPrimaryKeySelective(zccmQrAccessory);
return this.queryById(zccmQrAccessory.getQrId());
}
/**
*
*
* @param qrId
* @return
*/
@Override
public boolean deleteById(Integer qrId) {
return this.zccmQrAccessoryMapper.deleteByPrimaryKey(qrId) > 0;
}
/**
*
*
* @param page
* @param size
* @return
*/
@Override
public PageInfo queryAllByLimit(int page, int size) {
return PageHelper.startPage(page, size).doSelectPageInfo(this.zccmQrAccessoryMapper::selectAll);
}
@Override
public PageInfo queryByAll(int page, int size,Integer courseId,
Integer qrIndex,
Integer qrType,
Integer chapterId,
String fileName) {
return PageHelper.startPage(page, size).doSelectPageInfo(() -> this.zccmQrAccessoryMapper.queryByAll(courseId,qrIndex,qrType,chapterId,fileName));
}
}

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hc.business.mapper.ZccmQrAccessoryMapper">
<resultMap type="zccmQrAccessory" id="ZccmQrAccessoryMap">
<result property="qrId" column="qr_id" jdbcType="INTEGER"/>
<result property="courseId" column="course_id" jdbcType="INTEGER"/>
<result property="qrIndex" column="qr_index" jdbcType="INTEGER"/>
<result property="qrType" column="qr_type" jdbcType="INTEGER"/>
<result property="chapterId" column="chapter_id" jdbcType="INTEGER"/>
<result property="fileName" column="file_name" jdbcType="VARCHAR"/>
<result property="fileUrl" column="file_url" jdbcType="VARCHAR"/>
<result property="qrUrl" column="qr_url" jdbcType="VARCHAR"/>
</resultMap>
<sql id ="Base_Column_List">
qr_id,
course_id,
qr_index,
qr_type,
chapter_id,
file_name,
file_url,
qr_url,
</sql>
<select id="queryByAll" resultType="com.hc.business.dto.ZccmQrAccessoryDto">
SELECT cc.*,c.course_name as courseName
FROM zccm_qr_accessory as cc
Left JOIN zccm_course as c on cc.course_id = c.course_id
<where>
<if test="courseId!=null">
AND cc.course_id = #{courseId}
</if>
<if test="qrIndex!=null">
AND cc.qr_index = #{qrIndex}
</if>
<if test="chapterId!=null">
AND cc.chapter_id = #{chapterId}
</if>
<if test="qrType!=null">
AND cc.qr_type = #{qrType}
</if>
<if test="fileName!=null and fileName!=''">
AND cc.file_name LIKE "%"#{fileName}"%"
</if>
</where>
ORDER BY cc.qr_index
</select>
</mapper>

@ -57,7 +57,7 @@
<select id="queryByClassId" resultMap="UserInvoicesMap"> <select id="queryByClassId" resultMap="UserInvoicesMap">
SELECT SELECT
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
FROM zccm_ser_invoices FROM zccm_user_invoices
WHERE class_id = #{classId} WHERE class_id = #{classId}
</select> </select>

@ -124,7 +124,7 @@
) a ) a
left join ( left join (
SELECT date(FROM_UNIXTIME(create_time / 1000)) as datetime, count(*) as count SELECT date(FROM_UNIXTIME(create_time / 1000)) as datetime, count(*) as count
FROM `user` FROM `zccm_user`
GROUP BY date(FROM_UNIXTIME(create_time / 1000)) GROUP BY date(FROM_UNIXTIME(create_time / 1000))
) b on a.click_date = b.datetime; ) b on a.click_date = b.datetime;
</select> </select>

@ -37,6 +37,7 @@ public class AppUserAspect {
"&& ! execution (public * com.hc.web.controller.browser.app.AppClassConfigController.*(..))" + "&& ! execution (public * com.hc.web.controller.browser.app.AppClassConfigController.*(..))" +
"&& ! execution (public * com.hc.web.controller.browser.app.AppClassCourseController.*(..))" + "&& ! execution (public * com.hc.web.controller.browser.app.AppClassCourseController.*(..))" +
"&& ! execution (public * com.hc.web.controller.browser.app.AppBannerController.*(..))" + "&& ! execution (public * com.hc.web.controller.browser.app.AppBannerController.*(..))" +
"&& ! execution (public * com.hc.web.controller.browser.app.AppQrAccessoryController.*(..))" +
"&& ! execution (public * com.hc.web.controller.browser.app.AppUserController.*(..))" + "&& ! execution (public * com.hc.web.controller.browser.app.AppUserController.*(..))" +
"&& ! execution (public * com.hc.web.controller.browser.app.AppCourseController.*(..))" + "&& ! execution (public * com.hc.web.controller.browser.app.AppCourseController.*(..))" +
"&& ! execution (public * com.hc.web.controller.browser.app.AppCourseTypeController.*(..))" + "&& ! execution (public * com.hc.web.controller.browser.app.AppCourseTypeController.*(..))" +

@ -0,0 +1,46 @@
package com.hc.web.controller.browser.app;
import com.hc.business.model.ZccmQrAccessory;
import com.hc.business.service.ZccmQrAccessoryService;
import com.hc.core.utils.result.Result;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
* (ZccmQrAccessory)
*
* @author makejava
* @since 2024-11-08 09:58:21
*/
@RestController
@RequestMapping("/new/api/app/qrAccessory")
public class AppQrAccessoryController {
/**
*
*/
private final ZccmQrAccessoryService zccmQrAccessoryService;
public AppQrAccessoryController(ZccmQrAccessoryService zccmQrAccessoryService) {
this.zccmQrAccessoryService = zccmQrAccessoryService;
}
@GetMapping("/list")
@ApiOperation(value = "获取 ZccmQrAccessory列表(分页)", response = Result.class)
public Result listZccmQrAccessory(@RequestParam(defaultValue = "0") Integer page,
@RequestParam(defaultValue = "0") Integer size,
@ApiParam(value = "课程ID") @RequestParam(required = false) Integer courseId,
@ApiParam(value = "二维码索引") @RequestParam(required = false) Integer qrIndex,
@ApiParam(value = "123表示文件视频音频") @RequestParam(required = false) Integer qrType,
@ApiParam(value = "章节ID") @RequestParam(required = false) Integer chapterId,
@ApiParam(value = "文件名") @RequestParam(required = false) String fileName) {
return Result.success(zccmQrAccessoryService.queryByAll(page, size,courseId,qrIndex,qrType,chapterId,fileName));
}
}

@ -1,9 +1,9 @@
spring: spring:
profiles: pro profiles: pro
datasource: datasource:
url: jdbc:mysql://rm-m5e856330s821071w.mysql.rds.aliyuncs.com:3306/zcgp_cmtrain?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowMultiQueries=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true url: jdbc:mysql://rm-m5e856330s821071w.mysql.rds.aliyuncs.com:3306/gp_union?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowMultiQueries=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
username: zcgp_cmtrain username: gp_union
password: Cmtrain123# password: gpUnion!123
redis: redis:
host: r-bp1h7n8p0tcur9ilzy.redis.rds.aliyuncs.com host: r-bp1h7n8p0tcur9ilzy.redis.rds.aliyuncs.com
database: 3 database: 3

@ -4,7 +4,7 @@ spring:
resources: resources:
static-locations: classpath:/static/,classpath:/resources/ static-locations: classpath:/static/,classpath:/resources/
profiles: profiles:
active: dev active: pro
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver

Loading…
Cancel
Save