Commit 9b8af942 by wenyang

电子报聘邀请链接1

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