Commit 5791b5bd by jianan

Merge branch 'dev_20221018' into dev

parents fee41887 c8985adb
......@@ -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")));
......@@ -65,9 +69,14 @@ public class AgmsPractitionerServiceImpl implements AgmsPractitionerService {
return responseVO;
}
}
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
*/
......@@ -10,6 +8,8 @@ public class PractitionerFileSharing {
* serial id
*/
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文章分类
......
......@@ -8,6 +8,8 @@ import com.github.pagehelper.PageInfo;
public class PractitionerFileSharingListRequestVO {
private Long id;
private String itemType;
private String shareCode;
......@@ -18,8 +20,22 @@ public class PractitionerFileSharingListRequestVO {
private Long practitionerId;
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
*/
......@@ -10,6 +8,8 @@ public class PractitionerFileSharingSaveRequestVO {
* serial id
*/
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文章分类
......
package com.yd.api.practitioner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yd.api.practitioner.service.PractitionerArticleService;
import com.yd.api.practitioner.vo.ArticleTrackSaveResponseVO;
import com.yd.api.practitioner.vo.article.ArticleShareCodeSaveRequestVO;
......@@ -7,11 +14,6 @@ import com.yd.api.practitioner.vo.article.ArticleShareCodeSaveResponseVO;
import com.yd.api.practitioner.vo.article.ArticleTrackQueryResponseVO;
import com.yd.api.practitioner.vo.article.ArticleTrackSaveRequestVO;
import com.yd.api.result.JsonResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController
@RequestMapping("/practitionerArticle")
......@@ -25,8 +27,8 @@ public class PractitionerArticleController {
@RequestMapping("/articleShareCodeSave")
public Object articleShareCodeSave(@RequestBody ArticleShareCodeSaveRequestVO requestVO){
JsonResult result = new JsonResult();
System.out.println("分享文章保存");
System.out.println(requestVO.toString());
// System.out.println("分享文章保存");
// System.out.println(requestVO.toString());
ArticleShareCodeSaveResponseVO responseVO = practitionerArticleService.articleShareCodeSave(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
......@@ -38,8 +40,8 @@ public class PractitionerArticleController {
*/
@RequestMapping("/articleTrackSave")
public Object articleTrackSave(@RequestBody ArticleTrackSaveRequestVO requestVO){
System.out.println("客户文章跟踪信息保存");
System.out.println(requestVO.toString());
// System.out.println("客户文章跟踪信息保存");
// System.out.println(requestVO.toString());
JsonResult result = new JsonResult();
ArticleTrackSaveResponseVO responseVO = practitionerArticleService.articleTrackSave(requestVO);
result.addResult(responseVO);
......@@ -53,7 +55,7 @@ public class PractitionerArticleController {
@RequestMapping(value = "/articleTrackQuery",method = RequestMethod.GET)
public Object articleTrackQuery(@RequestParam("practitionerId") Long practitionerId,
@RequestParam("sharingId") Long sharingId ){
System.out.println("客户文章跟踪信息查询");
// System.out.println("客户文章跟踪信息查询");
JsonResult result = new JsonResult();
ArticleTrackQueryResponseVO responseVO = practitionerArticleService.articleTrackQuery(practitionerId,sharingId);
result.addResult(responseVO);
......
package com.yd.api.practitioner;
import com.yd.api.practitioner.vo.QueryCanSeeResponseVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -13,6 +12,7 @@ import com.yd.api.practitioner.service.PractitionerBasicInfoService;
import com.yd.api.practitioner.service.PractitionerService;
import com.yd.api.practitioner.service.ScheduleTrackService;
import com.yd.api.practitioner.vo.PractitionerIdRequestVO;
import com.yd.api.practitioner.vo.QueryCanSeeResponseVO;
import com.yd.api.practitioner.vo.businessCard.PractitionerApplyEmailRequestVO;
import com.yd.api.practitioner.vo.businessCard.PractitionerBusinessCardRequestVO;
import com.yd.api.practitioner.vo.businessCard.PractitionerBusinessCardResponseVO;
......@@ -118,10 +118,8 @@ import com.yd.api.result.CommonResultIDResponseVO;
import com.yd.api.result.CommonResultResponseVO;
import com.yd.api.result.IDRequestVO;
import com.yd.api.result.JsonResult;
import com.yd.rmi.n22.policy.service.N22PolicyService;
import com.yd.rmi.n22.salary.pojo.searchstaffsalarydetails.SearchStaffSalaryDetailsRequestBody;
import com.yd.rmi.n22.salary.pojo.searchstaffsalarydetails.SearchStaffSalaryDetailsResponseBody;
import com.yd.rmi.n22.staff.service.N22StaffService;
@Controller
......@@ -135,10 +133,10 @@ public class PractitionerController {
private PractitionerBasicInfoService practitionerBasicInfoService;
@Autowired
private ScheduleTrackService scheduleTrackService;
@Autowired
private N22PolicyService n22PolicyService;
@Autowired
private N22StaffService n22StaffService;
// @Autowired
// private N22PolicyService n22PolicyService;
// @Autowired
// private N22StaffService n22StaffService;
/**
* 经纪人登录
* @param requestVO 请求数据
......@@ -261,7 +259,19 @@ public class PractitionerController {
result.setData(responseVO);
return result;
}
/**
* 微信链接邀请--新增增员
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping("/wxUrlRecruit")
public Object wxUrlRecruit(@RequestBody RecruitRequestVO requestVO){
JsonResult result = new JsonResult();
RecruitResponseVO responseVO = practitionerService.wxUrlRecruit(requestVO);
result.addResult(responseVO);
result.setData(responseVO);
return result;
}
/***
* 经纪人-经纪人查询自己的商机详情查询
* @param requestVO 请求数据
......
......@@ -95,6 +95,12 @@ public interface PractitionerService {
*/
RecruitResponseVO recruit(RecruitRequestVO requestVO);
/**
* 微信链接邀请--新增增员
* @param requestVO 请求信息
* @return responseVO
*/
RecruitResponseVO wxUrlRecruit(RecruitRequestVO requestVO);
/**
* 团队长--新增增员记录
* @param requestVO 请求信息
* @return responseVO
......
......@@ -12,6 +12,8 @@ public class AclPractitionerFileSharing {
* serial id
*/
private Long id;
private String itemType;
/**
* FK ag_md_drop_options_id文章分类
......
package com.yd.dal.entity.systemMessage;
import java.util.Date;
public class AclSystemMessage {
private static final long serialVersionUID = 1L;
private Long id;//serial idPRIauto_increment
private Long practitionerId;//practitioner_id
private Long customerId;//经纪人customerId
private Long userId;//cffp userid
private Integer systemType;//系统类型 0=银盾,1=cffp
private Integer type;//0=系统通知 1=银盾学院课程推送消息
private String title;
private String context;//消息内容
private Integer isRead;//0=未读 1=已读
private Integer isActive;//1=active 2=inactive
private String remark;//备注
private Date createdAt;//创建时间
private Long createdBy;//FK ag_acl_user.id
private Date updatedAt;//修改时间
private Long updatedBy;//FK ag_acl_user.id
/**
* @return the id
*/
public Long getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return the practitionerId
*/
public Long getPractitionerId() {
return practitionerId;
}
/**
* @param practitionerId the practitionerId to set
*/
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
/**
* @return the customerId
*/
public Long getCustomerId() {
return customerId;
}
/**
* @param customerId the customerId to set
*/
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
/**
* @return the userId
*/
public Long getUserId() {
return userId;
}
/**
* @param userId the userId to set
*/
public void setUserId(Long userId) {
this.userId = userId;
}
/**
* @return the systemType
*/
public Integer getSystemType() {
return systemType;
}
/**
* @param systemType the systemType to set
*/
public void setSystemType(Integer systemType) {
this.systemType = systemType;
}
/**
* @return the type
*/
public Integer getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(Integer type) {
this.type = type;
}
/**
* @return the title
*/
public String getTitle() {
return title;
}
/**
* @param title the title to set
*/
public void setTitle(String title) {
this.title = title;
}
/**
* @return the context
*/
public String getContext() {
return context;
}
/**
* @param context the context to set
*/
public void setContext(String context) {
this.context = context;
}
/**
* @return the isRead
*/
public Integer getIsRead() {
return isRead;
}
/**
* @param isRead the isRead to set
*/
public void setIsRead(Integer isRead) {
this.isRead = isRead;
}
/**
* @return the isActive
*/
public Integer getIsActive() {
return isActive;
}
/**
* @param isActive the isActive to set
*/
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
/**
* @return the remark
*/
public String getRemark() {
return remark;
}
/**
* @param remark the remark to set
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* @return the createdAt
*/
public Date getCreatedAt() {
return createdAt;
}
/**
* @param createdAt the createdAt to set
*/
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
/**
* @return the createdBy
*/
public Long getCreatedBy() {
return createdBy;
}
/**
* @param createdBy the createdBy to set
*/
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
/**
* @return the updatedAt
*/
public Date getUpdatedAt() {
return updatedAt;
}
/**
* @param updatedAt the updatedAt to set
*/
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
* @return the updatedBy
*/
public Long getUpdatedBy() {
return updatedBy;
}
/**
* @param updatedBy the updatedBy to set
*/
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
}
......@@ -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);
......
......@@ -160,4 +160,6 @@ public interface AclPractitionerMapper {
List<Certificate> findCertificate(List<Long> certIdList);
List<PractitionerInfo> findPractitionerInfoByIdList(List<Long> idList);
List<PractitionerInfo> findPractitionerInfoById(@Param("practitionerId")Long practitionerId);
}
package com.yd.dal.mapper.systemMessage;
import com.yd.dal.entity.systemMessage.AclSystemMessage;
public interface AclSystemMessageMapper {
int deleteByPrimaryKey(Long id);
int insert(AclSystemMessage aclSystemMessage);
AclSystemMessage selectByPrimaryKey(Long id);
int updateByPrimaryKey(AclSystemMessage aclSystemMessage);
}
\ No newline at end of file
......@@ -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);
}
......
......@@ -221,6 +221,8 @@ public interface AclPractitionerDALService {
List<PractitionerInfo> findPractitionerInfoByMobileList(List<String> mobileList);
List<PractitionerInfo> findPractitionerInfoByIdList(List<Long> idList);
List<PractitionerInfo> findPractitionerInfoById(Long practitionerId);
List<PayScaleInfo> queryEGHistorySalaryPDFByPractitionerId(Long practitionerId);
......
......@@ -273,6 +273,11 @@ public class AclPractitionerDALServiceImpl implements AclPractitionerDALService
}
@Override
public List<PractitionerInfo> findPractitionerInfoById(Long practitionerId) {
return aclPractitionerMapper.findPractitionerInfoById(practitionerId);
}
@Override
public List<PayScaleInfo> queryEGHistorySalaryPDFByPractitionerId(Long practitionerId) {
return aclPractitionerMapper.queryEGHistorySalaryPDFByPractitionerId(practitionerId);
}
......
package com.yd.dal.service.systemMessage;
import com.yd.dal.entity.systemMessage.AclSystemMessage;
public interface AclSystemMessageService {
AclSystemMessage findById(Long id);
void save(AclSystemMessage aclSystemMessage);
void update(AclSystemMessage aclSystemMessage);
}
package com.yd.dal.service.systemMessage.Impl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.yd.dal.entity.systemMessage.AclSystemMessage;
import com.yd.dal.mapper.systemMessage.AclSystemMessageMapper;
import com.yd.dal.service.systemMessage.AclSystemMessageService;
@Service("aclSystemMessageService")
public class AclSystemMessageServiceImpl implements AclSystemMessageService {
@Resource
private AclSystemMessageMapper aclSystemMessageMapper;
@Override
public AclSystemMessage findById(Long id) {
return aclSystemMessageMapper.selectByPrimaryKey(id);
}
public void save(AclSystemMessage aclSystemMessage) {
if(aclSystemMessage.getId() == null){
aclSystemMessageMapper.insert(aclSystemMessage);
}else{
aclSystemMessageMapper.updateByPrimaryKey(aclSystemMessage);
}
}
@Override
public void update(AclSystemMessage aclSystemMessage) {
aclSystemMessageMapper.updateByPrimaryKey(aclSystemMessage);
}
}
......@@ -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_track ost ON ost.share_id = os.id
ON os.item_id = s.id
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
<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}
......
......@@ -2161,4 +2161,23 @@
and t.is_active = 1
</select>
<select id="findPractitionerInfoById" resultMap="practitioner_info_map">
select
p.customer_id as customerId,
p.id as practitionerId,
p.name as name,
p.gender as gender,
p.subordinate_system_id as subordinateId,
p.wechat_id as weChatId,
p.qq_id as qqId,
p.practitioner_reg_no as practitionerRegNo,
p.mobile_no,
p.mentor_id mentorId,
c.yd_wechat_openid
from ag_acl_practitioner p
left join ag_acl_customer c on c.id = p.customer_id
where p.id = #{practitionerId}
and p.is_active = 1
</select>
</mapper>
<?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.yd.dal.mapper.systemMessage.AclSystemMessageMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.systemMessage.AclSystemMessage">
<!--@mbg.generated-->
<!--@Table ag_acl_system_message-->
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="practitioner_id" jdbcType="BIGINT" property="practitionerId"/>
<result column="customer_id" jdbcType="BIGINT" property="customerId"/>
<result column="user_id" jdbcType="BIGINT" property="userId"/>
<result column="system_type" jdbcType="INTEGER" property="systemType"/>
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="title" jdbcType="VARCHAR" property="title"/>
<result column="context" jdbcType="VARCHAR" property="context"/>
<result column="is_read" jdbcType="INTEGER" property="isRead"/>
<result column="is_active" jdbcType="INTEGER" property="isActive" />
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt"/>
<result column="created_by" jdbcType="BIGINT" property="createdBy"/>
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt"/>
<result column="updated_by" jdbcType="BIGINT" property="updatedBy"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, practitioner_id, customer_id, user_id, system_type, type, title, context,
is_read, is_active, remark,
created_at, created_by, updated_at, updated_by
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List"/>
from ag_acl_system_message
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from ag_acl_system_message
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.systemMessage.AclSystemMessage"
useGeneratedKeys="true">
<!--@mbg.generated-->
insert into ag_acl_system_message (practitioner_id, customer_id, user_id, system_type, type, title, context,
is_read, is_active, remark,
created_at, created_by, updated_at, updated_by)
values (#{practitionerId,jdbcType=BIGINT}, #{customerId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
#{systemType,jdbcType=INTEGER},#{type,jdbcType=INTEGER},
#{title,jdbcType=VARCHAR}, #{context,jdbcType=VARCHAR},
#{isRead,jdbcType=INTEGER},#{isActive,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR},
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP},
#{updatedBy,jdbcType=BIGINT})
</insert>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.systemMessage.AclSystemMessage">
<!--@mbg.generated-->
update ag_acl_system_message
set practitioner_id = #{practitionerId,jdbcType=BIGINT},
customer_id = #{customerId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
system_type = #{systemType,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
context= #{context,jdbcType=VARCHAR},
is_read = #{isRead,jdbcType=INTEGER},
is_active = #{isActive,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</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