Commit 9b8af942 by wenyang

电子报聘邀请链接1

parent c16400a5
...@@ -18,6 +18,7 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -18,6 +18,7 @@ import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
...@@ -44,6 +45,9 @@ public class AgmsPractitionerServiceImpl implements AgmsPractitionerService { ...@@ -44,6 +45,9 @@ public class AgmsPractitionerServiceImpl implements AgmsPractitionerService {
AclPractitionerFileSharing fileSharing = new AclPractitionerFileSharing(); AclPractitionerFileSharing fileSharing = new AclPractitionerFileSharing();
BeanUtils.copyProperties(requestVO, fileSharing); BeanUtils.copyProperties(requestVO, fileSharing);
fileSharing.setUpdatedBy(requestVO.getLoginId()); fileSharing.setUpdatedBy(requestVO.getLoginId());
if(StringUtils.isEmpty(fileSharing.getItemType())){
fileSharing.setItemType("1");
}
Long id = aclPractitionerFileSharingDalService.saveOrUpdate(fileSharing); Long id = aclPractitionerFileSharingDalService.saveOrUpdate(fileSharing);
responseVO.setId(id); responseVO.setId(id);
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000"))); responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
...@@ -66,8 +70,13 @@ public class AgmsPractitionerServiceImpl implements AgmsPractitionerService { ...@@ -66,8 +70,13 @@ public class AgmsPractitionerServiceImpl implements AgmsPractitionerService {
} }
} }
if(StringUtils.isEmpty(requestVO.getItemType())){
requestVO.setItemType("1");
}
PageInfo<PractitionerFileSharing> practitionerFileShares = agmsPractitionerDALService.practitionerFileSharingList(requestVO.getId(), PageInfo<PractitionerFileSharing> practitionerFileShares = agmsPractitionerDALService.practitionerFileSharingList(requestVO.getId(),
requestVO.getPractitionerId(), requestVO.getPractitionerId(),
requestVO.getItemType(),
requestVO.getShareCode(), requestVO.getShareCode(),
mdDropOptionIds, mdDropOptionIds,
requestVO.getIsActive(), requestVO.getIsActive(),
......
package com.yd.api.agms.vo.practitioner; package com.yd.api.agms.vo.practitioner;
import java.util.Date;
/** /**
* @author xxy * @author xxy
*/ */
...@@ -11,6 +9,8 @@ public class PractitionerFileSharing { ...@@ -11,6 +9,8 @@ public class PractitionerFileSharing {
*/ */
private Long id; private Long id;
private String itemType;
/** /**
* FK ag_md_drop_options_id文章分类 * FK ag_md_drop_options_id文章分类
*/ */
...@@ -88,6 +88,20 @@ public class PractitionerFileSharing { ...@@ -88,6 +88,20 @@ public class PractitionerFileSharing {
} }
/** /**
* @return the itemType
*/
public String getItemType() {
return itemType;
}
/**
* @param itemType the itemType to set
*/
public void setItemType(String itemType) {
this.itemType = itemType;
}
/**
* 获取 FK ag_md_drop_options_id文章分类 * 获取 FK ag_md_drop_options_id文章分类
* *
* @return the mdDropOptionId FK ag_md_drop_options_id文章分类 * @return the mdDropOptionId FK ag_md_drop_options_id文章分类
......
...@@ -9,6 +9,8 @@ public class PractitionerFileSharingListRequestVO { ...@@ -9,6 +9,8 @@ public class PractitionerFileSharingListRequestVO {
private Long id; private Long id;
private String itemType;
private String shareCode; private String shareCode;
private String mdDropOptionId; private String mdDropOptionId;
...@@ -20,6 +22,20 @@ public class PractitionerFileSharingListRequestVO { ...@@ -20,6 +22,20 @@ public class PractitionerFileSharingListRequestVO {
private PageInfo<PractitionerFileSharing> practitionerFileShares; private PageInfo<PractitionerFileSharing> practitionerFileShares;
/** /**
* @return the itemType
*/
public String getItemType() {
return itemType;
}
/**
* @param itemType the itemType to set
*/
public void setItemType(String itemType) {
this.itemType = itemType;
}
/**
* 获取 * 获取
* *
* @return the mdDropOptionId * @return the mdDropOptionId
......
package com.yd.api.agms.vo.practitioner; package com.yd.api.agms.vo.practitioner;
import java.util.Date;
/** /**
* @author xxy * @author xxy
*/ */
...@@ -11,6 +9,8 @@ public class PractitionerFileSharingSaveRequestVO { ...@@ -11,6 +9,8 @@ public class PractitionerFileSharingSaveRequestVO {
*/ */
private Long id; private Long id;
private String itemType;
/** /**
* FK ag_md_drop_options_id文章分类 * FK ag_md_drop_options_id文章分类
*/ */
...@@ -68,6 +68,20 @@ public class PractitionerFileSharingSaveRequestVO { ...@@ -68,6 +68,20 @@ public class PractitionerFileSharingSaveRequestVO {
} }
/** /**
* @return the itemType
*/
public String getItemType() {
return itemType;
}
/**
* @param itemType the itemType to set
*/
public void setItemType(String itemType) {
this.itemType = itemType;
}
/**
* 获取 FK ag_md_drop_options_id文章分类 * 获取 FK ag_md_drop_options_id文章分类
* *
* @return the mdDropOptionId FK ag_md_drop_options_id文章分类 * @return the mdDropOptionId FK ag_md_drop_options_id文章分类
......
...@@ -13,6 +13,8 @@ public class AclPractitionerFileSharing { ...@@ -13,6 +13,8 @@ public class AclPractitionerFileSharing {
*/ */
private Long id; private Long id;
private String itemType;
/** /**
* FK ag_md_drop_options_id文章分类 * FK ag_md_drop_options_id文章分类
*/ */
......
...@@ -19,6 +19,7 @@ public interface AgmsPractitionerMapper { ...@@ -19,6 +19,7 @@ public interface AgmsPractitionerMapper {
*/ */
Page<PractitionerFileSharing> practitionerFileSharingList(@Param("id")Long id, Page<PractitionerFileSharing> practitionerFileSharingList(@Param("id")Long id,
@Param("practitionerId") Long practitionerId, @Param("practitionerId") Long practitionerId,
@Param("itemType") String itemType,
@Param("shareCode") String shareCode, @Param("shareCode") String shareCode,
@Param("mdDropOptionIds") Long[] mdDropOptionIds , @Param("mdDropOptionIds") Long[] mdDropOptionIds ,
@Param("isActive") Integer isActive); @Param("isActive") Integer isActive);
......
...@@ -18,7 +18,7 @@ public interface AgmsPractitionerDALService { ...@@ -18,7 +18,7 @@ public interface AgmsPractitionerDALService {
* @param size 每页的数量 * @param size 每页的数量
* @return 查询结果 * @return 查询结果
*/ */
PageInfo<PractitionerFileSharing> practitionerFileSharingList(Long id ,Long practitionerId,String shareCode,Long[] mdDropOptionId, Integer isActive, int pageNum, int size); PageInfo<PractitionerFileSharing> practitionerFileSharingList(Long id ,Long practitionerId, String itemType, String shareCode,Long[] mdDropOptionId, Integer isActive, int pageNum, int size);
SharePractitionerInfo findSharePractitioner(String shareCode); SharePractitionerInfo findSharePractitioner(String shareCode);
......
...@@ -22,9 +22,9 @@ public class AgmsPractitionerDALServiceImpl implements AgmsPractitionerDALServic ...@@ -22,9 +22,9 @@ public class AgmsPractitionerDALServiceImpl implements AgmsPractitionerDALServic
@Autowired @Autowired
private AgmsPractitionerMapper mapper; private AgmsPractitionerMapper mapper;
@Override @Override
public PageInfo<PractitionerFileSharing> practitionerFileSharingList(Long id ,Long practitionerId ,String shareCode,Long[] mdDropOptionIds, Integer isActive, int pageNum, int size) { public PageInfo<PractitionerFileSharing> practitionerFileSharingList(Long id ,Long practitionerId, String itemType,String shareCode,Long[] mdDropOptionIds, Integer isActive, int pageNum, int size) {
PageHelper.startPage(pageNum, size); PageHelper.startPage(pageNum, size);
Page<PractitionerFileSharing> practitionerFileShares = mapper.practitionerFileSharingList(id,practitionerId,shareCode,mdDropOptionIds,isActive); Page<PractitionerFileSharing> practitionerFileShares = mapper.practitionerFileSharingList(id,practitionerId,itemType,shareCode,mdDropOptionIds,isActive);
return new PageInfo<>(practitionerFileShares); return new PageInfo<>(practitionerFileShares);
} }
......
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
s.digest digest, s.digest digest,
s.author author, s.author author,
s.cover_url coverUrl, s.cover_url coverUrl,
count(ost.id) totalNum count(ost.id) totalNum,
s.item_type itemType
<if test="practitionerId != null"> <if test="practitionerId != null">
,(SELECT count(aost.id) ,(SELECT count(aost.id)
FROM ag_acl_customer_object_share_track aost FROM ag_acl_customer_object_share_track aost
...@@ -33,15 +34,17 @@ ...@@ -33,15 +34,17 @@
LEFT JOIN ag_md_drop_options o on o.id = s.md_drop_option_id LEFT JOIN ag_md_drop_options o on o.id = s.md_drop_option_id
LEFT JOIN ag_acl_user uc on uc.id = s.created_by LEFT JOIN ag_acl_user uc on uc.id = s.created_by
LEFT JOIN ag_acl_user uu on uu.id = s.created_by LEFT JOIN ag_acl_user uu on uu.id = s.created_by
LEFT JOIN ag_acl_customer_object_share os LEFT JOIN ag_acl_customer_object_share os ON os.item_id = s.id and os.item_type = 1
LEFT JOIN ag_acl_customer_object_share_track ost ON ost.share_id = os.id LEFT JOIN ag_acl_customer_object_share_track ost ON ost.share_id = os.id
ON os.item_id = s.id
<where> <where>
<if test="mdDropOptionIds != null"> <if test="mdDropOptionIds != null">
<foreach collection="mdDropOptionIds" item="mdDropOptionId" index="index" open="(" close=")" separator="or"> <foreach collection="mdDropOptionIds" item="mdDropOptionId" index="index" open="(" close=")" separator="or">
find_in_set (#{mdDropOptionId,jdbcType=BIGINT},s.md_drop_option_id) find_in_set (#{mdDropOptionId,jdbcType=BIGINT},s.md_drop_option_id)
</foreach> </foreach>
</if> </if>
<if test="itemType != null">
AND s.item_type = #{itemType,jdbcType=VARCHAR}
</if>
<if test="id != null"> <if test="id != null">
AND s.id = #{id,jdbcType=BIGINT} AND s.id = #{id,jdbcType=BIGINT}
</if> </if>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<!--@mbg.generated--> <!--@mbg.generated-->
<!--@Table ag_acl_practitioner_file_sharing--> <!--@Table ag_acl_practitioner_file_sharing-->
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="item_type" jdbcType="VARCHAR" property="itemType" />
<result column="md_drop_option_id" jdbcType="VARCHAR" property="mdDropOptionId" /> <result column="md_drop_option_id" jdbcType="VARCHAR" property="mdDropOptionId" />
<result column="file_content" jdbcType="LONGVARCHAR" property="fileContent" /> <result column="file_content" jdbcType="LONGVARCHAR" property="fileContent" />
<result column="is_active" jdbcType="INTEGER" property="isActive" /> <result column="is_active" jdbcType="INTEGER" property="isActive" />
...@@ -19,7 +20,7 @@ ...@@ -19,7 +20,7 @@
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!--@mbg.generated--> <!--@mbg.generated-->
id, md_drop_option_id, file_content, is_active, created_at, created_by, updated_at, id, item_type,md_drop_option_id, file_content, is_active, created_at, created_by, updated_at,
updated_by, title, digest, author, cover_url updated_by, title, digest, author, cover_url
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
...@@ -36,12 +37,12 @@ ...@@ -36,12 +37,12 @@
</delete> </delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerFileSharing" useGeneratedKeys="true"> <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.customer.AclPractitionerFileSharing" useGeneratedKeys="true">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into ag_acl_practitioner_file_sharing (md_drop_option_id, file_content, insert into ag_acl_practitioner_file_sharing (item_type,md_drop_option_id, file_content,
is_active, created_at, created_by, is_active, created_at, created_by,
updated_at, updated_by, title, updated_at, updated_by, title,
digest, author, cover_url digest, author, cover_url
) )
values (#{mdDropOptionId,jdbcType=VARCHAR}, #{fileContent,jdbcType=LONGVARCHAR}, values (#{itemType,jdbcType=VARCHAR},#{mdDropOptionId,jdbcType=VARCHAR}, #{fileContent,jdbcType=LONGVARCHAR},
#{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
#{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR},
#{digest,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, #{coverUrl,jdbcType=VARCHAR} #{digest,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, #{coverUrl,jdbcType=VARCHAR}
...@@ -51,6 +52,9 @@ ...@@ -51,6 +52,9 @@
<!--@mbg.generated--> <!--@mbg.generated-->
insert into ag_acl_practitioner_file_sharing insert into ag_acl_practitioner_file_sharing
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="itemType != null">
item_type,
</if>
<if test="mdDropOptionId != null"> <if test="mdDropOptionId != null">
md_drop_option_id, md_drop_option_id,
</if> </if>
...@@ -86,6 +90,9 @@ ...@@ -86,6 +90,9 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="itemType != null">
#{itemType,jdbcType=VARCHAR},
</if>
<if test="mdDropOptionId != null"> <if test="mdDropOptionId != null">
#{mdDropOptionId,jdbcType=VARCHAR}, #{mdDropOptionId,jdbcType=VARCHAR},
</if> </if>
...@@ -125,6 +132,9 @@ ...@@ -125,6 +132,9 @@
<!--@mbg.generated--> <!--@mbg.generated-->
update ag_acl_practitioner_file_sharing update ag_acl_practitioner_file_sharing
<set> <set>
<if test="itemType != null">
item_type = #{itemType,jdbcType=VARCHAR},
</if>
<if test="mdDropOptionId != null"> <if test="mdDropOptionId != null">
md_drop_option_id = #{mdDropOptionId,jdbcType=VARCHAR}, md_drop_option_id = #{mdDropOptionId,jdbcType=VARCHAR},
</if> </if>
...@@ -164,7 +174,8 @@ ...@@ -164,7 +174,8 @@
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.customer.AclPractitionerFileSharing"> <update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.customer.AclPractitionerFileSharing">
<!--@mbg.generated--> <!--@mbg.generated-->
update ag_acl_practitioner_file_sharing update ag_acl_practitioner_file_sharing
set md_drop_option_id = #{mdDropOptionId,jdbcType=VARCHAR}, set item_type = #{itemType,jdbcType=VARCHAR},
md_drop_option_id = #{mdDropOptionId,jdbcType=VARCHAR},
file_content = #{fileContent,jdbcType=LONGVARCHAR}, file_content = #{fileContent,jdbcType=LONGVARCHAR},
is_active = #{isActive,jdbcType=INTEGER}, is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP}, created_at = #{createdAt,jdbcType=TIMESTAMP},
...@@ -332,11 +343,11 @@ ...@@ -332,11 +343,11 @@
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true"> <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated--> <!--@mbg.generated-->
insert into ag_acl_practitioner_file_sharing insert into ag_acl_practitioner_file_sharing
(md_drop_option_id, file_content, is_active, created_at, created_by, updated_at, (item_type,md_drop_option_id, file_content, is_active, created_at, created_by, updated_at,
updated_by, title, digest, author, cover_url) updated_by, title, digest, author, cover_url)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.mdDropOptionId,jdbcType=VARCHAR}, #{item.fileContent,jdbcType=LONGVARCHAR}, (#{itemType,jdbcType=VARCHAR},#{item.mdDropOptionId,jdbcType=VARCHAR}, #{item.fileContent,jdbcType=LONGVARCHAR},
#{item.isActive,jdbcType=INTEGER}, #{item.createdAt,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=BIGINT}, #{item.isActive,jdbcType=INTEGER}, #{item.createdAt,jdbcType=TIMESTAMP}, #{item.createdBy,jdbcType=BIGINT},
#{item.updatedAt,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=BIGINT}, #{item.title,jdbcType=VARCHAR}, #{item.updatedAt,jdbcType=TIMESTAMP}, #{item.updatedBy,jdbcType=BIGINT}, #{item.title,jdbcType=VARCHAR},
#{item.digest,jdbcType=VARCHAR}, #{item.author,jdbcType=VARCHAR}, #{item.coverUrl,jdbcType=VARCHAR} #{item.digest,jdbcType=VARCHAR}, #{item.author,jdbcType=VARCHAR}, #{item.coverUrl,jdbcType=VARCHAR}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment