Commit 404840d5 by yao.xiao

增加-分享文章经纪人信息

parent 11a185c7
...@@ -50,6 +50,8 @@ public class AgmsPractitionerServiceImpl implements AgmsPractitionerService { ...@@ -50,6 +50,8 @@ public class AgmsPractitionerServiceImpl implements AgmsPractitionerService {
requestVO.getIsActive(), requestVO.getIsActive(),
requestVO.getPractitionerFileShares().getPageNum(), requestVO.getPractitionerFileShares().getPageNum(),
requestVO.getPractitionerFileShares().getPageSize()); requestVO.getPractitionerFileShares().getPageSize());
SharePractitionerInfo sharePractitionerInfo = agmsPractitionerDALService.findSharePractitioner(requestVO.getShareCode());
responseVO.setSharePractitionerInfo(sharePractitionerInfo);
responseVO.setPractitionerFileShares(practitionerFileShares); responseVO.setPractitionerFileShares(practitionerFileShares);
responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000"))); responseVO.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
return responseVO; return responseVO;
......
...@@ -10,6 +10,8 @@ import java.util.List; ...@@ -10,6 +10,8 @@ import java.util.List;
*/ */
public class PractitionerFileSharingListResponseVO { public class PractitionerFileSharingListResponseVO {
private SharePractitionerInfo sharePractitionerInfo;
private PageInfo<PractitionerFileSharing> practitionerFileShares; private PageInfo<PractitionerFileSharing> practitionerFileShares;
private CommonResult commonResult; private CommonResult commonResult;
...@@ -51,10 +53,19 @@ public class PractitionerFileSharingListResponseVO { ...@@ -51,10 +53,19 @@ public class PractitionerFileSharingListResponseVO {
this.commonResult = commonResult; this.commonResult = commonResult;
} }
public SharePractitionerInfo getSharePractitionerInfo() {
return sharePractitionerInfo;
}
public void setSharePractitionerInfo(SharePractitionerInfo sharePractitionerInfo) {
this.sharePractitionerInfo = sharePractitionerInfo;
}
@Override @Override
public String toString() { public String toString() {
return "PractitionerFileSharingListResponseVO{" + return "PractitionerFileSharingListResponseVO{" +
"practitionerFileShares=" + practitionerFileShares + "sharePractitionerInfo=" + sharePractitionerInfo +
", practitionerFileShares=" + practitionerFileShares +
", commonResult=" + commonResult + ", commonResult=" + commonResult +
'}'; '}';
} }
......
package com.yd.api.agms.vo.practitioner;
public class SharePractitionerInfo {
private Long customerId;
private Long practitionerId;
private String mobileNo;
private String headImagePath;
private String name;
private String qrCodePath;
private String insurerBranchName;
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Long getPractitionerId() {
return practitionerId;
}
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
public String getMobileNo() {
return mobileNo;
}
public void setMobileNo(String mobileNo) {
this.mobileNo = mobileNo;
}
public String getHeadImagePath() {
return headImagePath;
}
public void setHeadImagePath(String headImagePath) {
this.headImagePath = headImagePath;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getQrCodePath() {
return qrCodePath;
}
public void setQrCodePath(String qrCodePath) {
this.qrCodePath = qrCodePath;
}
public String getInsurerBranchName() {
return insurerBranchName;
}
public void setInsurerBranchName(String insurerBranchName) {
this.insurerBranchName = insurerBranchName;
}
@Override
public String toString() {
return "SharePractitionerInfo{" +
"customerId=" + customerId +
", practitionerId=" + practitionerId +
", mobileNo='" + mobileNo + '\'' +
", headImagePath='" + headImagePath + '\'' +
", name='" + name + '\'' +
", qrCodePath='" + qrCodePath + '\'' +
", insurerBranchName='" + insurerBranchName + '\'' +
'}';
}
}
...@@ -2,6 +2,7 @@ package com.yd.dal.mapper.agms; ...@@ -2,6 +2,7 @@ package com.yd.dal.mapper.agms;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.yd.api.agms.vo.practitioner.PractitionerFileSharing; import com.yd.api.agms.vo.practitioner.PractitionerFileSharing;
import com.yd.api.agms.vo.practitioner.SharePractitionerInfo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
/** /**
...@@ -15,4 +16,6 @@ public interface AgmsPractitionerMapper { ...@@ -15,4 +16,6 @@ public interface AgmsPractitionerMapper {
* @return * @return
*/ */
Page<PractitionerFileSharing> practitionerFileSharingList(@Param("id")Long id,@Param("shareCode") String shareCode,@Param("mdDropOptionIds") Long[] mdDropOptionIds ,@Param("isActive") Integer isActive); Page<PractitionerFileSharing> practitionerFileSharingList(@Param("id")Long id,@Param("shareCode") String shareCode,@Param("mdDropOptionIds") Long[] mdDropOptionIds ,@Param("isActive") Integer isActive);
SharePractitionerInfo findSharePractitioner(String shareCode);
} }
...@@ -2,6 +2,7 @@ package com.yd.dal.service.agms; ...@@ -2,6 +2,7 @@ package com.yd.dal.service.agms;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.yd.api.agms.vo.practitioner.PractitionerFileSharing; import com.yd.api.agms.vo.practitioner.PractitionerFileSharing;
import com.yd.api.agms.vo.practitioner.SharePractitionerInfo;
/** /**
* @author xxy * @author xxy
...@@ -16,4 +17,6 @@ public interface AgmsPractitionerDALService { ...@@ -16,4 +17,6 @@ public interface AgmsPractitionerDALService {
* @return 查询结果 * @return 查询结果
*/ */
PageInfo<PractitionerFileSharing> practitionerFileSharingList(Long id ,String shareCode,Long[] mdDropOptionId, Integer isActive, int pageNum, int size); PageInfo<PractitionerFileSharing> practitionerFileSharingList(Long id ,String shareCode,Long[] mdDropOptionId, Integer isActive, int pageNum, int size);
SharePractitionerInfo findSharePractitioner(String shareCode);
} }
...@@ -4,8 +4,10 @@ import com.github.pagehelper.Page; ...@@ -4,8 +4,10 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.yd.api.agms.vo.practitioner.PractitionerFileSharing; import com.yd.api.agms.vo.practitioner.PractitionerFileSharing;
import com.yd.api.agms.vo.practitioner.SharePractitionerInfo;
import com.yd.dal.mapper.agms.AgmsPractitionerMapper; import com.yd.dal.mapper.agms.AgmsPractitionerMapper;
import com.yd.dal.service.agms.AgmsPractitionerDALService; import com.yd.dal.service.agms.AgmsPractitionerDALService;
import com.yd.util.CommonUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -24,4 +26,12 @@ public class AgmsPractitionerDALServiceImpl implements AgmsPractitionerDALServic ...@@ -24,4 +26,12 @@ public class AgmsPractitionerDALServiceImpl implements AgmsPractitionerDALServic
PageInfo<PractitionerFileSharing> pageInfo = new PageInfo<>(practitionerFileShares); PageInfo<PractitionerFileSharing> pageInfo = new PageInfo<>(practitionerFileShares);
return pageInfo; return pageInfo;
} }
@Override
public SharePractitionerInfo findSharePractitioner(String shareCode) {
if (CommonUtil.isNullOrBlank(shareCode)){
return null;
}
return mapper.findSharePractitioner(shareCode);
}
} }
...@@ -42,4 +42,31 @@ ...@@ -42,4 +42,31 @@
group by s.id group by s.id
ORDER BY s.id desc ORDER BY s.id desc
</select> </select>
<resultMap id="BaseResultMap" type="com.yd.api.agms.vo.practitioner.SharePractitionerInfo">
<result column="customerId" jdbcType="BIGINT" property="customerId" />
<result column="practitionerId" jdbcType="BIGINT" property="practitionerId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="mobileNo" jdbcType="VARCHAR" property="mobileNo" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>
<result column="insurerBranchName" jdbcType="VARCHAR" property="insurerBranchName" />
<result column="headImagePath" jdbcType="VARCHAR" property="headImagePath" />
<result column="qrCodePath" jdbcType="VARCHAR" property="qrCodePath" />
</resultMap>
<select id="findSharePractitioner" resultMap="BaseResultMap">
SELECT p.customer_id customerId,
p.id practitionerId,
p.name name,
p.mobile_no mobileNo,
b.branch_name insurerBranchName,
uh.file_path headImagePath,
uw.file_path qrCodePath
FROM ag_acl_customer_object_share os
LEFT JOIN ag_acl_practitioner p
LEFT JOIN ag_acl_insurer_branch b ON b.id = p.insurer_branch_id
LEFT JOIN ag_acl_file_upload uh
ON uh.target_type = 1 AND uh.target_id = p.id AND uh.is_active = 1 AND uh.file_type = 1
LEFT JOIN ag_acl_file_upload uw
ON uh.target_type = 1 AND uh.target_id = p.id AND uh.is_active = 1 AND uh.file_type = 9
ON p.id = os.practitioner_id
WHERE os.share_code = #{shareCode,jdbcType=VARCHAR}
</select>
</mapper> </mapper>
\ No newline at end of file
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