新的接口编写
This commit is contained in:
parent
8a2f08e44e
commit
b7409820d2
|
|
@ -14,6 +14,9 @@
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.rzyc</groupId>
|
<groupId>com.rzyc</groupId>
|
||||||
<artifactId>utils</artifactId>
|
<artifactId>utils</artifactId>
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,18 @@ public class AddEducationResourceDto {
|
||||||
@TableField("content")
|
@TableField("content")
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图片")
|
||||||
|
@TableField("img")
|
||||||
|
private String img;
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,22 @@ public class AddEducationStudyDto {
|
||||||
@NotBlank(message = "不能为空")
|
@NotBlank(message = "不能为空")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "成员id多个‘,’分割")
|
||||||
|
private String memberId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "培训的学习时间")
|
@ApiModelProperty(value = "培训的学习时间")
|
||||||
private String studyDate;
|
private String studyDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "培训的学习单位")
|
@ApiModelProperty(value = "培训的学习单位")
|
||||||
private String studyUnit;
|
private String studyUnit;
|
||||||
|
|
||||||
|
public String getMemberId() {
|
||||||
|
return memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(String memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ public class EducationResourceVo {
|
||||||
@ApiModelProperty(value = "上传人id")
|
@ApiModelProperty(value = "上传人id")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图片")
|
||||||
|
private String img;
|
||||||
|
|
||||||
@ApiModelProperty(value = "资料名")
|
@ApiModelProperty(value = "资料名")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
@ -56,6 +59,14 @@ public class EducationResourceVo {
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,10 @@ public class EducationStudyListVo {
|
||||||
@TableField("user_id")
|
@TableField("user_id")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "成员名字(,分割)")
|
||||||
|
@TableField("member_id")
|
||||||
|
private String memberId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "培训的学习时间")
|
@ApiModelProperty(value = "培训的学习时间")
|
||||||
@TableField("study_date")
|
@TableField("study_date")
|
||||||
private String studyDate;
|
private String studyDate;
|
||||||
|
|
@ -40,6 +44,14 @@ public class EducationStudyListVo {
|
||||||
@TableField("study_unit")
|
@TableField("study_unit")
|
||||||
private String studyUnit;
|
private String studyUnit;
|
||||||
|
|
||||||
|
public String getMemberId() {
|
||||||
|
return memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(String memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,124 @@
|
||||||
|
package com.rzyc.bean.pojo.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: inventory-api
|
||||||
|
* @BelongsPackage: com.rzyc.bean.pojo.vo
|
||||||
|
* @Author: SYZ
|
||||||
|
* @CreateTime: 2023-03-30 13:08
|
||||||
|
* @Version: 1.0
|
||||||
|
*/
|
||||||
|
public class EducationStudyVo {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
@TableId("id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业id")
|
||||||
|
@TableField("enterprise_id")
|
||||||
|
private String enterpriseId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "摘要")
|
||||||
|
@TableField("title")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "内容")
|
||||||
|
@TableField("content")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上传人id")
|
||||||
|
@TableField("user_id")
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "成员名字(,分割)")
|
||||||
|
@TableField("member_id")
|
||||||
|
private String memberNames;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "培训的学习时间")
|
||||||
|
@TableField("study_date")
|
||||||
|
private String studyDate;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "培训的学习单位")
|
||||||
|
@TableField("study_unit")
|
||||||
|
private String studyUnit;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@TableField("create_time")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnterpriseId() {
|
||||||
|
return enterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnterpriseId(String enterpriseId) {
|
||||||
|
this.enterpriseId = enterpriseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMemberNames() {
|
||||||
|
return memberNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberNames(String memberNames) {
|
||||||
|
this.memberNames = memberNames;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStudyDate() {
|
||||||
|
return studyDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStudyDate(String studyDate) {
|
||||||
|
this.studyDate = studyDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStudyUnit() {
|
||||||
|
return studyUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStudyUnit(String studyUnit) {
|
||||||
|
this.studyUnit = studyUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -22,6 +22,7 @@ public interface EducationStudyMapper extends BaseMapper<EducationStudy> {
|
||||||
List<EducationStudyListVo> selectEducationStudyList(@Param("startTime") String startTime,
|
List<EducationStudyListVo> selectEducationStudyList(@Param("startTime") String startTime,
|
||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
@Param("enterpriseId") String enterpriseId,
|
@Param("enterpriseId") String enterpriseId,
|
||||||
|
@Param("memberId") String memberId,
|
||||||
@Param("queryWord") String queryWord);
|
@Param("queryWord") String queryWord);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,8 @@ import java.util.List;
|
||||||
@Repository
|
@Repository
|
||||||
public interface EntUserMapper extends BaseMapper<EntUser> {
|
public interface EntUserMapper extends BaseMapper<EntUser> {
|
||||||
|
|
||||||
|
List<String> selectUsernamesByIds(@Param("ids") List<String> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询企业用户by名字
|
* 查询企业用户by名字
|
||||||
* @param name 用户名
|
* @param name 用户名
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author
|
* @author
|
||||||
* @since 2023-03-29
|
* @since 2023-03-30
|
||||||
*/
|
*/
|
||||||
@TableName("education_resource")
|
@TableName("education_resource")
|
||||||
@ApiModel(value="EducationResource对象", description="")
|
@ApiModel(value="EducationResource对象", description="")
|
||||||
|
|
@ -42,6 +42,14 @@ public class EducationResource implements Serializable {
|
||||||
@TableField("content")
|
@TableField("content")
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图片")
|
||||||
|
@TableField("img")
|
||||||
|
private String img;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "培训时间")
|
||||||
|
@TableField("study_date")
|
||||||
|
private Date studyDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
@TableField("create_time")
|
@TableField("create_time")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
@ -85,6 +93,20 @@ public class EducationResource implements Serializable {
|
||||||
public void setContent(String content) {
|
public void setContent(String content) {
|
||||||
this.content = content;
|
this.content = content;
|
||||||
}
|
}
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
public Date getStudyDate() {
|
||||||
|
return studyDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStudyDate(Date studyDate) {
|
||||||
|
this.studyDate = studyDate;
|
||||||
|
}
|
||||||
public Date getCreateTime() {
|
public Date getCreateTime() {
|
||||||
return createTime;
|
return createTime;
|
||||||
}
|
}
|
||||||
|
|
@ -108,6 +130,8 @@ public class EducationResource implements Serializable {
|
||||||
", userId=" + userId +
|
", userId=" + userId +
|
||||||
", name=" + name +
|
", name=" + name +
|
||||||
", content=" + content +
|
", content=" + content +
|
||||||
|
", img=" + img +
|
||||||
|
", studyDate=" + studyDate +
|
||||||
", createTime=" + createTime +
|
", createTime=" + createTime +
|
||||||
", modifyTime=" + modifyTime +
|
", modifyTime=" + modifyTime +
|
||||||
"}";
|
"}";
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author
|
* @author
|
||||||
* @since 2023-03-27
|
* @since 2023-03-30
|
||||||
*/
|
*/
|
||||||
@TableName("education_study")
|
@TableName("education_study")
|
||||||
@ApiModel(value="EducationStudy对象", description="教育培训表")
|
@ApiModel(value="EducationStudy对象", description="教育培训表")
|
||||||
|
|
@ -42,6 +42,10 @@ public class EducationStudy implements Serializable {
|
||||||
@TableField("user_id")
|
@TableField("user_id")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "成员名字(,分割)")
|
||||||
|
@TableField("member_id")
|
||||||
|
private String memberId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "培训的学习时间")
|
@ApiModelProperty(value = "培训的学习时间")
|
||||||
@TableField("study_date")
|
@TableField("study_date")
|
||||||
private Date studyDate;
|
private Date studyDate;
|
||||||
|
|
@ -89,6 +93,13 @@ public class EducationStudy implements Serializable {
|
||||||
public void setUserId(String userId) {
|
public void setUserId(String userId) {
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
public String getMemberId() {
|
||||||
|
return memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(String memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
public Date getStudyDate() {
|
public Date getStudyDate() {
|
||||||
return studyDate;
|
return studyDate;
|
||||||
}
|
}
|
||||||
|
|
@ -119,6 +130,7 @@ public class EducationStudy implements Serializable {
|
||||||
", title=" + title +
|
", title=" + title +
|
||||||
", content=" + content +
|
", content=" + content +
|
||||||
", userId=" + userId +
|
", userId=" + userId +
|
||||||
|
", memberId=" + memberId +
|
||||||
", studyDate=" + studyDate +
|
", studyDate=" + studyDate +
|
||||||
", studyUnit=" + studyUnit +
|
", studyUnit=" + studyUnit +
|
||||||
", createTime=" + createTime +
|
", createTime=" + createTime +
|
||||||
|
|
|
||||||
|
|
@ -9,17 +9,18 @@
|
||||||
<result column="user_id" property="userId" />
|
<result column="user_id" property="userId" />
|
||||||
<result column="name" property="name" />
|
<result column="name" property="name" />
|
||||||
<result column="content" property="content" />
|
<result column="content" property="content" />
|
||||||
|
<result column="img" property="img" />
|
||||||
|
<result column="study_date" property="studyDate" />
|
||||||
<result column="create_time" property="createTime" />
|
<result column="create_time" property="createTime" />
|
||||||
<result column="modify_time" property="modifyTime" />
|
<result column="modify_time" property="modifyTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id
|
id, industry_id, user_id, name, content, img, study_date, create_time, modify_time
|
||||||
, industry_id, user_id, name, content, create_time, modify_time
|
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectEducationResourceList" resultType="com.rzyc.bean.pojo.vo.EducationResourceVo">
|
<select id="selectEducationResourceList" resultType="com.rzyc.bean.pojo.vo.EducationResourceVo">
|
||||||
SELECT id,industry_id,user_id,`name`,content,DATE_FORMAT(create_time,'%Y-%m-%d')create_time
|
SELECT id,industry_id,user_id,img,`name`,DATE_FORMAT(create_time,'%Y-%m-%d')create_time
|
||||||
FROM `education_resource`
|
FROM `education_resource`
|
||||||
WHERE industry_id = #{industryId}
|
WHERE industry_id = #{industryId}
|
||||||
<if test="queryWord!=null and queryWord!=''">
|
<if test="queryWord!=null and queryWord!=''">
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
<result column="title" property="title" />
|
<result column="title" property="title" />
|
||||||
<result column="content" property="content" />
|
<result column="content" property="content" />
|
||||||
<result column="user_id" property="userId" />
|
<result column="user_id" property="userId" />
|
||||||
|
<result column="member_id" property="memberId" />
|
||||||
<result column="study_date" property="studyDate" />
|
<result column="study_date" property="studyDate" />
|
||||||
<result column="study_unit" property="studyUnit" />
|
<result column="study_unit" property="studyUnit" />
|
||||||
<result column="create_time" property="createTime" />
|
<result column="create_time" property="createTime" />
|
||||||
|
|
@ -17,12 +18,15 @@
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, enterprise_id, title, content, user_id, study_date, study_unit, create_time
|
id, enterprise_id, title, content, user_id, member_id, study_date, study_unit, create_time
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectEducationStudyList" resultType="com.rzyc.bean.pojo.vo.EducationStudyListVo">
|
<select id="selectEducationStudyList" resultType="com.rzyc.bean.pojo.vo.EducationStudyListVo">
|
||||||
SELECT id,enterprise_id,title,content,user_id,DATE_FORMAT(study_date,'%Y-%m-%d')'study_date',study_unit
|
SELECT id,enterprise_id,title,content,user_id,member_id,DATE_FORMAT(study_date,'%Y-%m-%d')'study_date',study_unit
|
||||||
FROM `education_study`
|
FROM `education_study`
|
||||||
WHERE enterprise_id = #{enterpriseId}
|
WHERE enterprise_id = #{enterpriseId}
|
||||||
|
<if test="memberId!=null and memberId!=''">
|
||||||
|
and find_in_set(#{memberId}, member_id)
|
||||||
|
</if>
|
||||||
<if test="queryWord!=null and queryWord!=''">
|
<if test="queryWord!=null and queryWord!=''">
|
||||||
and title like concat('%',#{queryWord},'%')
|
and title like concat('%',#{queryWord},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -33,4 +37,7 @@
|
||||||
Order By create_time DESC
|
Order By create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,16 @@
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
ent_user_id, post_id, enterprise_id, name, mobile, user_type, age, work_time, password, post_path, post_path_name, create_time, create_by, modify_time, modify_by
|
ent_user_id
|
||||||
|
, post_id, enterprise_id, name, mobile, user_type, age, work_time, password, post_path, post_path_name, create_time, create_by, modify_time, modify_by
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectByName" resultMap="BaseResultMap">
|
<select id="selectByName" resultMap="BaseResultMap">
|
||||||
select * from ent_user where name = #{name} and use_state = 1
|
select *
|
||||||
|
from ent_user
|
||||||
|
where name = #{name}
|
||||||
|
and use_state = 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<resultMap id="entUserListStatistic" type="com.rzyc.model.ent.EntUser">
|
<resultMap id="entUserListStatistic" type="com.rzyc.model.ent.EntUser">
|
||||||
|
|
@ -59,7 +63,8 @@
|
||||||
select t1.*,sum(case when task_state = 1 then 1 else 0 end) as ongoingTask,
|
select t1.*,sum(case when task_state = 1 then 1 else 0 end) as ongoingTask,
|
||||||
sum(case when task_state = 2 then 1 else 0 end) as finishTask,
|
sum(case when task_state = 2 then 1 else 0 end) as finishTask,
|
||||||
sum(case when task_state = 3 then 1 else 0 end) as overTimeTask
|
sum(case when task_state = 3 then 1 else 0 end) as overTimeTask
|
||||||
from (select eu.ent_user_id,eu.post_id,eu.enterprise_id,eu.name,eu.mobile,eu.user_type,eu.age,eu.work_time,eu.password,eu.post_path,eu.post_path_name,eu.create_by,eu.modify_by,eu.job_number,
|
from (select
|
||||||
|
eu.ent_user_id,eu.post_id,eu.enterprise_id,eu.name,eu.mobile,eu.user_type,eu.age,eu.work_time,eu.password,eu.post_path,eu.post_path_name,eu.create_by,eu.modify_by,eu.job_number,
|
||||||
ep.name postName,eut.name userTypeName,
|
ep.name postName,eut.name userTypeName,
|
||||||
sum(case when credential_state = 1 then 1 else 0 end)as noTimeout,
|
sum(case when credential_state = 1 then 1 else 0 end)as noTimeout,
|
||||||
sum(case when credential_state = 2 then 1 else 0 end)as overtime
|
sum(case when credential_state = 2 then 1 else 0 end)as overtime
|
||||||
|
|
@ -98,7 +103,8 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateEntUser" parameterType="com.rzyc.model.ent.EntUser">
|
<update id="updateEntUser" parameterType="com.rzyc.model.ent.EntUser">
|
||||||
update ent_user set post_id = #{entUser.postId},
|
update ent_user
|
||||||
|
set post_id = #{entUser.postId},
|
||||||
enterprise_id = #{entUser.enterpriseId},
|
enterprise_id = #{entUser.enterpriseId},
|
||||||
name = #{entUser.name},
|
name = #{entUser.name},
|
||||||
mobile = #{entUser.mobile},
|
mobile = #{entUser.mobile},
|
||||||
|
|
@ -114,7 +120,9 @@
|
||||||
where ent_user_id = #{entUser.entUserId}
|
where ent_user_id = #{entUser.entUserId}
|
||||||
</update>
|
</update>
|
||||||
<update id="stopUseEntUser">
|
<update id="stopUseEntUser">
|
||||||
update ent_user set use_state = #{useState} where ent_user_id = #{entUserId}
|
update ent_user
|
||||||
|
set use_state = #{useState}
|
||||||
|
where ent_user_id = #{entUserId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="validMobile" resultMap="BaseResultMap">
|
<select id="validMobile" resultMap="BaseResultMap">
|
||||||
|
|
@ -132,14 +140,32 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="validName" resultMap="BaseResultMap">
|
<select id="validName" resultMap="BaseResultMap">
|
||||||
select ent_user_id,name,mobile from ent_user where name = #{name}
|
select ent_user_id, name, mobile
|
||||||
|
from ent_user
|
||||||
|
where name = #{name}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<delete id="deleteLegalPerson">
|
<delete id="deleteLegalPerson">
|
||||||
delete from ent_user where post_path_name = #{legalPerson} and enterprise_id = #{enterpriseId}
|
delete
|
||||||
|
from ent_user
|
||||||
|
where post_path_name = #{legalPerson}
|
||||||
|
and enterprise_id = #{enterpriseId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectNoEntPostListUser" resultMap="BaseResultMap">
|
<select id="selectNoEntPostListUser" resultMap="BaseResultMap">
|
||||||
select eu.* from ent_user eu left join ent_post_list epl on eu.ent_user_id = epl.ent_user_id and epl.post_list_id is null
|
select eu.*
|
||||||
|
from ent_user eu
|
||||||
|
left join ent_post_list epl on eu.ent_user_id = epl.ent_user_id and epl.post_list_id is null
|
||||||
|
</select>
|
||||||
|
<select id="selectUsernamesByIds" resultType="java.lang.String" parameterType="java.util.List">
|
||||||
|
select name
|
||||||
|
FROM ent_user
|
||||||
|
where
|
||||||
|
<if test="ids != null and ids.size() > 0">
|
||||||
|
ent_user_id in
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -227,6 +227,12 @@
|
||||||
<artifactId>easyexcel</artifactId>
|
<artifactId>easyexcel</artifactId>
|
||||||
<version>3.1.3</version>
|
<version>3.1.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.testng</groupId>
|
||||||
|
<artifactId>testng</artifactId>
|
||||||
|
<version>RELEASE</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<!-- easyExcel -->
|
<!-- easyExcel -->
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
||||||
|
|
@ -7,18 +7,21 @@ import com.common.utils.model.Code;
|
||||||
import com.common.utils.model.SingleResult;
|
import com.common.utils.model.SingleResult;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.rzyc.bean.pojo.dto.AddEducationResourceDto;
|
|
||||||
import com.rzyc.bean.pojo.dto.AddEducationStudyDto;
|
import com.rzyc.bean.pojo.dto.AddEducationStudyDto;
|
||||||
import com.rzyc.bean.pojo.vo.EducationResourceVo;
|
import com.rzyc.bean.pojo.vo.EducationResourceVo;
|
||||||
import com.rzyc.bean.pojo.vo.EducationStudyListVo;
|
import com.rzyc.bean.pojo.vo.EducationStudyListVo;
|
||||||
|
import com.rzyc.bean.pojo.vo.EducationStudyVo;
|
||||||
import com.rzyc.bean.pojo.vo.ListPageVo;
|
import com.rzyc.bean.pojo.vo.ListPageVo;
|
||||||
import com.rzyc.bean.task.dto.PageDto;
|
import com.rzyc.bean.task.dto.PageDto;
|
||||||
import com.rzyc.model.EducationResource;
|
import com.rzyc.model.EducationResource;
|
||||||
import com.rzyc.model.EducationStudy;
|
import com.rzyc.model.EducationStudy;
|
||||||
|
import com.rzyc.model.ent.SysEnterprise;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
@ -26,7 +29,8 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
@ -46,6 +50,9 @@ import java.util.stream.Collectors;
|
||||||
@Validated
|
@Validated
|
||||||
public class EducationStudyController extends BaseController {
|
public class EducationStudyController extends BaseController {
|
||||||
|
|
||||||
|
protected final static Logger logger = LoggerFactory.getLogger(EducationStudyController.class);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description:获取培训学习列表
|
* @description:获取培训学习列表
|
||||||
* @author: SYZ
|
* @author: SYZ
|
||||||
|
|
@ -56,11 +63,12 @@ public class EducationStudyController extends BaseController {
|
||||||
@ApiOperation(value = "获取培训学习列表")
|
@ApiOperation(value = "获取培训学习列表")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "year", value = "年份", dataType = "int", paramType = "query"),
|
@ApiImplicitParam(name = "year", value = "年份", dataType = "int", paramType = "query"),
|
||||||
@ApiImplicitParam(name = "enterpriseId", value = "企业id", dataType = "string", paramType = "query", required = true)
|
@ApiImplicitParam(name = "enterpriseId", value = "企业id", dataType = "string", paramType = "query", required = true),
|
||||||
|
@ApiImplicitParam(name = "memberId", value = "成员id", dataType = "string", paramType = "query")
|
||||||
})
|
})
|
||||||
@GetMapping("/getList")
|
@GetMapping("/getList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public SingleResult<ListPageVo<EducationStudyListVo>> getList(@Valid PageDto dto, Integer year, String enterpriseId) throws Exception {
|
public SingleResult<ListPageVo<EducationStudyListVo>> getList(@Valid PageDto dto, Integer year, String enterpriseId,String memberId) {
|
||||||
SingleResult<ListPageVo<EducationStudyListVo>> result = new SingleResult<>();
|
SingleResult<ListPageVo<EducationStudyListVo>> result = new SingleResult<>();
|
||||||
String startDate = "";
|
String startDate = "";
|
||||||
String endDate = "";
|
String endDate = "";
|
||||||
|
|
@ -69,7 +77,7 @@ public class EducationStudyController extends BaseController {
|
||||||
endDate = DateUtils.parseDate2String(DateUtils.getLastDayOfMonth(year, 12), "yyyy-MM-dd HH:mm:ss");
|
endDate = DateUtils.parseDate2String(DateUtils.getLastDayOfMonth(year, 12), "yyyy-MM-dd HH:mm:ss");
|
||||||
}
|
}
|
||||||
PageHelper.startPage(dto.getPage(), dto.getPageSize());
|
PageHelper.startPage(dto.getPage(), dto.getPageSize());
|
||||||
Page<EducationStudyListVo> list = (Page<EducationStudyListVo>) educationStudyMapper.selectEducationStudyList(startDate, endDate, enterpriseId, dto.getCondition());
|
Page<EducationStudyListVo> list = (Page<EducationStudyListVo>) educationStudyMapper.selectEducationStudyList(startDate, endDate, enterpriseId,memberId, dto.getCondition());;
|
||||||
ListPageVo<EducationStudyListVo> pageVo = new ListPageVo<>();
|
ListPageVo<EducationStudyListVo> pageVo = new ListPageVo<>();
|
||||||
pageVo.setRows(list);
|
pageVo.setRows(list);
|
||||||
pageVo.setTotal(list.getTotal());
|
pageVo.setTotal(list.getTotal());
|
||||||
|
|
@ -79,6 +87,8 @@ public class EducationStudyController extends BaseController {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description:添加培训学习
|
* @description:添加培训学习
|
||||||
* @author: SYZ
|
* @author: SYZ
|
||||||
|
|
@ -89,7 +99,7 @@ public class EducationStudyController extends BaseController {
|
||||||
@ApiOperation(value = "添加培训学习")
|
@ApiOperation(value = "添加培训学习")
|
||||||
@PostMapping("/addOne")
|
@PostMapping("/addOne")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public SingleResult addOne(@Valid AddEducationStudyDto dto) {
|
public SingleResult addOne(@RequestBody @Valid AddEducationStudyDto dto) {
|
||||||
SingleResult<Object> result = new SingleResult<>();
|
SingleResult<Object> result = new SingleResult<>();
|
||||||
Integer count = educationStudyMapper.selectCount(
|
Integer count = educationStudyMapper.selectCount(
|
||||||
new QueryWrapper<EducationStudy>().select("1").eq("id", dto.getId())
|
new QueryWrapper<EducationStudy>().select("1").eq("id", dto.getId())
|
||||||
|
|
@ -100,6 +110,7 @@ public class EducationStudyController extends BaseController {
|
||||||
educationStudy.setTitle(StringUtils.isBlank(dto.getTitle()) ? "" : dto.getTitle());
|
educationStudy.setTitle(StringUtils.isBlank(dto.getTitle()) ? "" : dto.getTitle());
|
||||||
educationStudy.setContent(StringUtils.isBlank(dto.getContent()) ? "" : dto.getContent());
|
educationStudy.setContent(StringUtils.isBlank(dto.getContent()) ? "" : dto.getContent());
|
||||||
educationStudy.setUserId(StringUtils.isBlank(dto.getUserId()) ? "" : dto.getUserId());
|
educationStudy.setUserId(StringUtils.isBlank(dto.getUserId()) ? "" : dto.getUserId());
|
||||||
|
educationStudy.setMemberId(StringUtils.isBlank(dto.getMemberId()) ? "" : dto.getMemberId());
|
||||||
educationStudy.setStudyDate(DateUtils.parseString2Date(dto.getStudyDate(), "yyyy-MM-dd"));
|
educationStudy.setStudyDate(DateUtils.parseString2Date(dto.getStudyDate(), "yyyy-MM-dd"));
|
||||||
educationStudy.setStudyUnit(StringUtils.isBlank(dto.getStudyUnit()) ? "" : dto.getStudyUnit());
|
educationStudy.setStudyUnit(StringUtils.isBlank(dto.getStudyUnit()) ? "" : dto.getStudyUnit());
|
||||||
educationStudy.setCreateTime(new Date());
|
educationStudy.setCreateTime(new Date());
|
||||||
|
|
@ -129,6 +140,97 @@ public class EducationStudyController extends BaseController {
|
||||||
return (0 == delRow) ? result.setCodeMessageChain(Code.ERROR.getCode(), "失败") : result.setCodeMessageChain(Code.SUCCESS.getCode(), "成功");
|
return (0 == delRow) ? result.setCodeMessageChain(Code.ERROR.getCode(), "失败") : result.setCodeMessageChain(Code.SUCCESS.getCode(), "成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:获取培训学习详情
|
||||||
|
* @author: SYZ
|
||||||
|
* @date: 2023/3/30 14:36
|
||||||
|
* @param: [id]
|
||||||
|
* @return: com.common.utils.model.SingleResult<com.rzyc.bean.pojo.vo.EducationStudyVo>
|
||||||
|
**/
|
||||||
|
@ApiOperation(value = "获取培训学习详情")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "id", value = "主键", dataType = "string", paramType = "query", required = true)
|
||||||
|
})
|
||||||
|
@GetMapping("/getDetails")
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult<EducationStudyVo> getDetails(@NotBlank(message = "id不能为空") String id){
|
||||||
|
SingleResult<EducationStudyVo> result = new SingleResult<>();
|
||||||
|
EducationStudy educationStudy = educationStudyMapper.selectById(id);
|
||||||
|
List<String> memberIds = Arrays.asList(educationStudy.getMemberId().split(","));
|
||||||
|
logger.info("memberIds: => {}",memberIds);
|
||||||
|
List<String> strings = entUserMapper.selectUsernamesByIds(memberIds);
|
||||||
|
logger.info("memberNames: => {}",strings);
|
||||||
|
StringBuilder strb = new StringBuilder();
|
||||||
|
for (int i=0;i<strings.size();i++){
|
||||||
|
if (i == strings.size() -1){
|
||||||
|
strb.append(strings.get(i));
|
||||||
|
}else {
|
||||||
|
strb.append(strings.get(i)+",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EducationStudyVo educationStudyVo = new EducationStudyVo();
|
||||||
|
BeanUtils.copyProperties(educationStudy,educationStudyVo);
|
||||||
|
educationStudyVo.setMemberNames(strb.toString());
|
||||||
|
educationStudyVo.setStudyDate(DateUtils.parseDate2String(educationStudy.getStudyDate(),"yyyy-MM-dd"));
|
||||||
|
educationStudyVo.setCreateTime(DateUtils.parseDate2String(educationStudy.getCreateTime(),"yyyy-MM-dd"));
|
||||||
|
result.setData(educationStudyVo);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:获取培训资料列表
|
||||||
|
* @author: SYZ
|
||||||
|
* @date: 2023/3/29 20:18
|
||||||
|
* @param: [dto]
|
||||||
|
* @return: com.common.utils.model.SingleResult<com.rzyc.bean.pojo.vo.ListPageVo<com.rzyc.bean.pojo.vo.EducationResourceVo>>
|
||||||
|
**/
|
||||||
|
@ApiOperation(value = "获取培训资料列表")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "entId",value = "企业id",dataType = "string",paramType = "query",required = true)
|
||||||
|
})
|
||||||
|
@GetMapping("/getEducationResourceList")
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult<ListPageVo<EducationResourceVo>> getEducationResourceList(@Valid PageDto dto,String entId){
|
||||||
|
SingleResult<ListPageVo<EducationResourceVo>> result = new SingleResult<>();
|
||||||
|
SysEnterprise sysEnterprise = sysEnterpriseMapper.selectOne(
|
||||||
|
new QueryWrapper<SysEnterprise>().select("*").eq("SysEnterpriseId",entId)
|
||||||
|
);
|
||||||
|
if (null == sysEnterprise){
|
||||||
|
return result.setCodeMessageChain(Code.ERROR.getCode(), "企业id错误");
|
||||||
|
}
|
||||||
|
PageHelper.startPage(dto.getPage(), dto.getPageSize());
|
||||||
|
Page<EducationResourceVo> page = (Page<EducationResourceVo>) educationResourceMapper.selectEducationResourceList(dto.getCondition(),sysEnterprise.getWorkClassId());
|
||||||
|
ListPageVo<EducationResourceVo> pageVo = new ListPageVo<>();
|
||||||
|
pageVo.setRows(page);
|
||||||
|
pageVo.setTotal(page.getTotal());
|
||||||
|
pageVo.setPage(page.getPageNum());
|
||||||
|
pageVo.setPageSize(page.getPageSize());
|
||||||
|
result.setData(pageVo);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:获取培训资料详情
|
||||||
|
* @author: SYZ
|
||||||
|
* @date: 2023/3/30 14:37
|
||||||
|
* @param: [id]
|
||||||
|
* @return: com.common.utils.model.SingleResult<com.rzyc.model.EducationResource>
|
||||||
|
**/
|
||||||
|
@ApiOperation(value = "获取培训资料详情")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "id",value = "主键",dataType = "string",paramType = "query",required = true)
|
||||||
|
})
|
||||||
|
@GetMapping("/getEducationResourceDetails")
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult<EducationResource> getEducationResourceDetails(@NotBlank(message = "id不能为空") String id){
|
||||||
|
SingleResult<EducationResource> result = new SingleResult<>();
|
||||||
|
EducationResource educationResource = educationResourceMapper.selectById(id);
|
||||||
|
result.setData(educationResource);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ package com.rzyc.service;
|
||||||
import com.common.utils.DateUtils;
|
import com.common.utils.DateUtils;
|
||||||
import com.common.utils.RandomNumber;
|
import com.common.utils.RandomNumber;
|
||||||
import com.common.utils.encryption.MD5;
|
import com.common.utils.encryption.MD5;
|
||||||
import com.common.utils.model.SingleResult;
|
|
||||||
import com.rzyc.bean.check.CheckPerform;
|
import com.rzyc.bean.check.CheckPerform;
|
||||||
import com.rzyc.controller.BaseController;
|
import com.rzyc.controller.BaseController;
|
||||||
import com.rzyc.model.*;
|
import com.rzyc.model.*;
|
||||||
|
|
@ -11,11 +10,8 @@ import com.rzyc.model.check.BookEntHT;
|
||||||
import com.rzyc.model.check.BookenthtCompany;
|
import com.rzyc.model.check.BookenthtCompany;
|
||||||
import com.rzyc.model.ent.SysEnterprise;
|
import com.rzyc.model.ent.SysEnterprise;
|
||||||
import com.rzyc.model.user.SysUser;
|
import com.rzyc.model.user.SysUser;
|
||||||
import org.junit.Test;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.text.DateFormat;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,10 @@ package com.rzyc.utils;
|
||||||
|
|
||||||
|
|
||||||
import com.rzyc.controller.BaseController;
|
import com.rzyc.controller.BaseController;
|
||||||
import com.rzyc.model.EntDeviceInsCycle;
|
|
||||||
import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
|
import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
|
||||||
import org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig;
|
import org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.text.DateFormat;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置类脱敏加密工具
|
* 配置类脱敏加密工具
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ import com.rzyc.mapper.ent.BaseInClassMapper;
|
||||||
import com.rzyc.mapper.ent.InListItemMapper;
|
import com.rzyc.mapper.ent.InListItemMapper;
|
||||||
import com.rzyc.mapper.ent.InListMapper;
|
import com.rzyc.mapper.ent.InListMapper;
|
||||||
import com.rzyc.model.EasyExcel.EasyExcelInList;
|
import com.rzyc.model.EasyExcel.EasyExcelInList;
|
||||||
|
import jdk.nashorn.internal.ir.annotations.Ignore;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ spring:
|
||||||
#数据库
|
#数据库
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://121.40.106.103:3306/inventory_copy?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&
|
url: jdbc:mysql://121.40.106.103:3306/inventory_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&
|
||||||
username: rzyc
|
username: rzyc
|
||||||
password: ENC(FDlRK2MAcJBMF7UBHBJPLGzRkpWQ4T6dgYP2bDnTodQ=)
|
password: ENC(FDlRK2MAcJBMF7UBHBJPLGzRkpWQ4T6dgYP2bDnTodQ=)
|
||||||
tomcat:
|
tomcat:
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,4 @@ spring:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -421,6 +421,7 @@ public class IndustryListController extends BaseController{
|
||||||
BeanUtils.copyProperties(dto,educationResource);
|
BeanUtils.copyProperties(dto,educationResource);
|
||||||
educationResource.setName(StringUtils.isBlank(dto.getName()) ? "" : dto.getName());
|
educationResource.setName(StringUtils.isBlank(dto.getName()) ? "" : dto.getName());
|
||||||
educationResource.setContent(StringUtils.isBlank(dto.getContent()) ? "" : dto.getContent());
|
educationResource.setContent(StringUtils.isBlank(dto.getContent()) ? "" : dto.getContent());
|
||||||
|
educationResource.setImg(StringUtils.isBlank(dto.getImg()) ? "" : dto.getImg());
|
||||||
if (0 == count){
|
if (0 == count){
|
||||||
educationResource.setCreateTime(new Date());
|
educationResource.setCreateTime(new Date());
|
||||||
educationResource.setModifyTime(new Date());
|
educationResource.setModifyTime(new Date());
|
||||||
|
|
@ -450,8 +451,25 @@ public class IndustryListController extends BaseController{
|
||||||
return (0 == delRow) ? result.setCodeMessageChain(Code.ERROR.getCode(), "失败") : result.setCodeMessageChain(Code.SUCCESS.getCode(), "成功");
|
return (0 == delRow) ? result.setCodeMessageChain(Code.ERROR.getCode(), "失败") : result.setCodeMessageChain(Code.SUCCESS.getCode(), "成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description:获取培训资料详情
|
||||||
|
* @author: SYZ
|
||||||
|
* @date: 2023/3/30 14:37
|
||||||
|
* @param: [id]
|
||||||
|
* @return: com.common.utils.model.SingleResult<com.rzyc.model.EducationResource>
|
||||||
|
**/
|
||||||
|
@ApiOperation(value = "获取培训资料详情")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "id",value = "主键",dataType = "string",paramType = "query",required = true)
|
||||||
|
})
|
||||||
|
@GetMapping("/getEducationResourceDetails")
|
||||||
|
@ResponseBody
|
||||||
|
public SingleResult<EducationResource> getEducationResourceDetails(@NotBlank(message = "id不能为空") String id){
|
||||||
|
SingleResult<EducationResource> result = new SingleResult<>();
|
||||||
|
EducationResource educationResource = educationResourceMapper.selectById(id);
|
||||||
|
result.setData(educationResource);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ spring:
|
||||||
#数据库
|
#数据库
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://121.40.106.103:3306/inventory_copy?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
|
url: jdbc:mysql://121.40.106.103:3306/inventory_db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
|
||||||
username: rzyc
|
username: rzyc
|
||||||
password: ENC(FDlRK2MAcJBMF7UBHBJPLGzRkpWQ4T6dgYP2bDnTodQ=)
|
password: ENC(FDlRK2MAcJBMF7UBHBJPLGzRkpWQ4T6dgYP2bDnTodQ=)
|
||||||
tomcat:
|
tomcat:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user