Commit f6a2b490 by 徐高华

Merge branch 'feature/xgh/bug/0415' into 'master'

Feature/xgh/bug/0415

See merge request !1721
parents c29f528c 0e8b4e6a
......@@ -6,7 +6,7 @@ import java.util.Date;
public class MaidianLogDTO implements Serializable{
private Integer maidianId;
private Long maidianId;
private String staffId;
......@@ -64,11 +64,11 @@ public class MaidianLogDTO implements Serializable{
private static final long serialVersionUID = 1L;
public Integer getMaidianId() {
public Long getMaidianId() {
return maidianId;
}
public void setMaidianId(Integer maidianId) {
public void setMaidianId(Long maidianId) {
this.maidianId = maidianId;
}
......
......@@ -7,17 +7,8 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface TabHaobanMaidianLogMapper {
int deleteByPrimaryKey(Integer maidianId);
int insert(TabHaobanMaidianLog record);
int insertSelective(TabHaobanMaidianLog record);
TabHaobanMaidianLog selectByPrimaryKey(Integer maidianId);
int updateByPrimaryKeySelective(TabHaobanMaidianLog record);
int updateByPrimaryKey(TabHaobanMaidianLog record);
public List<TabHaobanMaidianLog> queryList(@Param("hbversion") String hbversion);
}
\ No newline at end of file
......@@ -144,4 +144,6 @@ public interface TabHaobanStaffClerkRelationMapper {
* @return
*/
List<String> taskoverClerkIdList(@Param("staffId")String staffId, @Param("delTime") Date delTime) ;
List<TabHaobanStaffClerkRelation> taskoverClerkIdListAll(@Param("staffId")String staffId) ;
}
\ No newline at end of file
......@@ -4,7 +4,7 @@ import java.io.Serializable;
import java.util.Date;
public class TabHaobanMaidianLog implements Serializable {
private Integer maidianId;
private Long maidianId;
private String staffId;
......@@ -62,11 +62,11 @@ public class TabHaobanMaidianLog implements Serializable {
private static final long serialVersionUID = 1L;
public Integer getMaidianId() {
public Long getMaidianId() {
return maidianId;
}
public void setMaidianId(Integer maidianId) {
public void setMaidianId(Long maidianId) {
this.maidianId = maidianId;
}
......
......@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service.impl;
import java.util.Date;
import java.util.List;
import com.gic.commons.util.UniqueIdUtils;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.PageUtil;
import com.github.pagehelper.Page;
......@@ -25,6 +26,7 @@ public class MaidianLogServiceImpl implements MaidianLogService{
@Override
public void insert(MaidianLogDTO maidianLogDTO) {
TabHaobanMaidianLog tab = EntityUtil.changeEntityByJSON(TabHaobanMaidianLog.class, maidianLogDTO);
tab.setMaidianId(UniqueIdUtils.uniqueLong());
tab.setCreateTime(new Date());
tab.setUpdateTime(tab.getCreateTime());
mapper.insert(tab);
......
......@@ -451,10 +451,12 @@ public class MaterialApiServiceImpl implements MaterialApiService {
materialDTO.setMaterialTitle(material.getMaterialTitle());
}
materialDTO.setImgUrl(one.getMediaUrl());
String mediaId = uploadMediaToWx(qwDTO.getThirdCorpid(), one.getMediaUrl(),qwDTO);
if (StringUtils.isNotEmpty(mediaId)) {
materialDTO.setWxLastUploadTime(new Date());
materialDTO.setMediaId(mediaId);
if(materialMediaList.size()<=15) {
String mediaId = uploadMediaToWx(qwDTO.getThirdCorpid(), one.getMediaUrl(), qwDTO);
if (StringUtils.isNotEmpty(mediaId)) {
materialDTO.setWxLastUploadTime(new Date());
materialDTO.setMediaId(mediaId);
}
}
return materialDTO;
}).collect(Collectors.toList());
......
......@@ -626,6 +626,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
return staffClerkRelationService.listManageBindByStaffId(staffId);
}
// 只用于离职继承的查询
@Override
public List<String> getTakeoverClerkIdList(List<String> staffIdList) {
List<String> takeoverClerkIdList = new ArrayList<>() ;
......@@ -639,6 +640,11 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
if(CollectionUtils.isNotEmpty(clerkIdList)) {
takeoverClerkIdList.addAll(clerkIdList);
}
}else if(null != staff) {
List<TabHaobanStaffClerkRelation> list = this.tabHaobanStaffClerkRelationMapper.taskoverClerkIdListAll(staffId) ;
if(CollectionUtils.isNotEmpty(list)) {
takeoverClerkIdList.add(list.get(0).getClerkId()) ;
}
}
}
}
......
......@@ -205,7 +205,7 @@
<include refid="Base_Column_List"/>
from tab_haoban_handover_transfer
where wx_enterprise_id=#{wxEnterpriseId}
and create_time > #{date}
and update_time > #{date}
and status_flag=1
</select>
......
......@@ -36,16 +36,6 @@
url, context, scene, platform, model, brand, hbversion, system, sdk_version, version,
system_info, stay_time, create_time, update_time,track_sign,store_id,store_status,clerk_code,clerk_id,enterprise_id,environment
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from tab_haoban_maidian_log
where maidian_id = #{maidianId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from tab_haoban_maidian_log
where maidian_id = #{maidianId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianLog" >
insert into tab_haoban_maidian_log (maidian_id, staff_id, wx_enterprise_id,
phone_number, device_date, options,
......@@ -65,254 +55,6 @@
#{storeStatus},#{clerkCode},#{storeId},#{clerkId},#{enterpriseId},#{environment}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianLog" >
insert into tab_haoban_maidian_log
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="maidianId != null" >
maidian_id,
</if>
<if test="staffId != null" >
staff_id,
</if>
<if test="wxEnterpriseId != null" >
wx_enterprise_id,
</if>
<if test="phoneNumber != null" >
phone_number,
</if>
<if test="deviceDate != null" >
device_date,
</if>
<if test="options != null" >
options,
</if>
<if test="event != null" >
event,
</if>
<if test="url != null" >
url,
</if>
<if test="context != null" >
context,
</if>
<if test="scene != null" >
scene,
</if>
<if test="platform != null" >
platform,
</if>
<if test="model != null" >
model,
</if>
<if test="brand != null" >
brand,
</if>
<if test="hbversion != null" >
hbversion,
</if>
<if test="system != null" >
system,
</if>
<if test="sdkVersion != null" >
sdk_version,
</if>
<if test="version != null" >
version,
</if>
<if test="systemInfo != null" >
system_info,
</if>
<if test="stayTime != null" >
stay_time,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="updateTime != null" >
update_time,
</if>
<if test="trackSign != null" >
track_sign,
</if>
<if test="clerkId != null" >
clerk_id,
</if>
<if test="enterpriseId != null" >
enterprise_id,
</if>
<if test="environment != null" >
environment,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="maidianId != null" >
#{maidianId,jdbcType=INTEGER},
</if>
<if test="staffId != null" >
#{staffId,jdbcType=VARCHAR},
</if>
<if test="wxEnterpriseId != null" >
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="phoneNumber != null" >
#{phoneNumber,jdbcType=VARCHAR},
</if>
<if test="deviceDate != null" >
#{deviceDate,jdbcType=TIMESTAMP},
</if>
<if test="options != null" >
#{options,jdbcType=VARCHAR},
</if>
<if test="event != null" >
#{event,jdbcType=VARCHAR},
</if>
<if test="url != null" >
#{url,jdbcType=VARCHAR},
</if>
<if test="context != null" >
#{context,jdbcType=VARCHAR},
</if>
<if test="scene != null" >
#{scene,jdbcType=VARCHAR},
</if>
<if test="platform != null" >
#{platform,jdbcType=VARCHAR},
</if>
<if test="model != null" >
#{model,jdbcType=VARCHAR},
</if>
<if test="brand != null" >
#{brand,jdbcType=VARCHAR},
</if>
<if test="hbversion != null" >
#{hbversion,jdbcType=VARCHAR},
</if>
<if test="system != null" >
#{system,jdbcType=VARCHAR},
</if>
<if test="sdkVersion != null" >
#{sdkVersion,jdbcType=VARCHAR},
</if>
<if test="version != null" >
#{version,jdbcType=VARCHAR},
</if>
<if test="systemInfo != null" >
#{systemInfo,jdbcType=VARCHAR},
</if>
<if test="stayTime != null" >
#{stayTime,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="trackSign != null" >
#{trackSign},
</if>
<if test="clerkId != null" >
#{clerkId},
</if>
<if test="enterpriseId != null" >
#{enterpriseId},
</if>
<if test="environment != null" >
#{environment},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianLog" >
update tab_haoban_maidian_log
<set >
<if test="staffId != null" >
staff_id = #{staffId,jdbcType=VARCHAR},
</if>
<if test="wxEnterpriseId != null" >
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="phoneNumber != null" >
phone_number = #{phoneNumber,jdbcType=VARCHAR},
</if>
<if test="deviceDate != null" >
device_date = #{deviceDate,jdbcType=TIMESTAMP},
</if>
<if test="options != null" >
options = #{options,jdbcType=VARCHAR},
</if>
<if test="event != null" >
event = #{event,jdbcType=VARCHAR},
</if>
<if test="url != null" >
url = #{url,jdbcType=VARCHAR},
</if>
<if test="context != null" >
context = #{context,jdbcType=VARCHAR},
</if>
<if test="scene != null" >
scene = #{scene,jdbcType=VARCHAR},
</if>
<if test="platform != null" >
platform = #{platform,jdbcType=VARCHAR},
</if>
<if test="model != null" >
model = #{model,jdbcType=VARCHAR},
</if>
<if test="brand != null" >
brand = #{brand,jdbcType=VARCHAR},
</if>
<if test="hbversion != null" >
hbversion = #{hbversion,jdbcType=VARCHAR},
</if>
<if test="system != null" >
system = #{system,jdbcType=VARCHAR},
</if>
<if test="sdkVersion != null" >
sdk_version = #{sdkVersion,jdbcType=VARCHAR},
</if>
<if test="version != null" >
version = #{version,jdbcType=VARCHAR},
</if>
<if test="systemInfo != null" >
system_info = #{systemInfo,jdbcType=VARCHAR},
</if>
<if test="stayTime != null" >
stay_time = #{stayTime,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where maidian_id = #{maidianId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanMaidianLog" >
update tab_haoban_maidian_log
set staff_id = #{staffId,jdbcType=VARCHAR},
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
phone_number = #{phoneNumber,jdbcType=VARCHAR},
device_date = #{deviceDate,jdbcType=TIMESTAMP},
options = #{options,jdbcType=VARCHAR},
event = #{event,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
context = #{context,jdbcType=VARCHAR},
scene = #{scene,jdbcType=VARCHAR},
platform = #{platform,jdbcType=VARCHAR},
model = #{model,jdbcType=VARCHAR},
brand = #{brand,jdbcType=VARCHAR},
hbversion = #{hbversion,jdbcType=VARCHAR},
system = #{system,jdbcType=VARCHAR},
sdk_version = #{sdkVersion,jdbcType=VARCHAR},
version = #{version,jdbcType=VARCHAR},
system_info = #{systemInfo,jdbcType=VARCHAR},
stay_time = #{stayTime,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where maidian_id = #{maidianId,jdbcType=INTEGER}
</update>
<select id="queryList" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
......
......@@ -487,4 +487,8 @@
select clerk_id from tab_haoban_staff_clerk_relation where staff_id =#{staffId} and status_flag = 0 and update_time >= #{delTime}
</select>
<select id="taskoverClerkIdListAll" resultMap="BaseResultMap" resultType="java.lang.String">
select <include refid="Base_Column_List"/> from tab_haoban_staff_clerk_relation where staff_id =#{staffId} order by update_time desc
</select>
</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