Commit 38175b57 by yao.xiao

修改-文章客户跟踪保存

parent 404840d5
...@@ -48,10 +48,13 @@ public class PractitionerArticleServiceImpl implements PractitionerArticleServic ...@@ -48,10 +48,13 @@ public class PractitionerArticleServiceImpl implements PractitionerArticleServic
shareTrack.setCreatedBy(-1L); shareTrack.setCreatedBy(-1L);
Long id = requestVO.getId(); Long id = requestVO.getId();
if (CommonUtil.isNullOrZero(id)){ if (CommonUtil.isNullOrZero(id)){
shareTrack.setTrackInTime(CommonUtil.stringParseDate(requestVO.getTrackInTime(),"yyyy-MM-dd HH:mm:ss")); String shareCode = shareTrack.getShareCode();
Long shareCodeId = aclCustomerObjectShareDALService.findIdByShareCode(shareCode);
shareTrack.setShareId(shareCodeId);
shareTrack.setTrackInTime(new Date());
id = aclCustomerObjectShareTrackDALService.save(shareTrack); id = aclCustomerObjectShareTrackDALService.save(shareTrack);
}else { }else {
shareTrack.setTrackOutTime(CommonUtil.stringParseDate(requestVO.getTrackOutTime(),"yyyy-MM-dd HH:mm:ss")); shareTrack.setTrackOutTime(new Date());
aclCustomerObjectShareTrackDALService.update(shareTrack); aclCustomerObjectShareTrackDALService.update(shareTrack);
} }
responseVO.setId(id); responseVO.setId(id);
......
...@@ -34,16 +34,6 @@ public class ArticleTrackSaveRequestVO { ...@@ -34,16 +34,6 @@ public class ArticleTrackSaveRequestVO {
private String imagePath; private String imagePath;
/** /**
* 跟踪开始时间
*/
private String trackInTime;
/**
* 跟踪结束时间
*/
private String trackOutTime;
/**
* 地域 * 地域
*/ */
private String region; private String region;
...@@ -131,22 +121,6 @@ public class ArticleTrackSaveRequestVO { ...@@ -131,22 +121,6 @@ public class ArticleTrackSaveRequestVO {
this.imagePath = imagePath; this.imagePath = imagePath;
} }
public String getTrackInTime() {
return trackInTime;
}
public void setTrackInTime(String trackInTime) {
this.trackInTime = trackInTime;
}
public String getTrackOutTime() {
return trackOutTime;
}
public void setTrackOutTime(String trackOutTime) {
this.trackOutTime = trackOutTime;
}
public String getRegion() { public String getRegion() {
return region; return region;
} }
......
package com.yd.dal.mapper.customer; package com.yd.dal.mapper.customer;
import com.yd.dal.entity.customer.AclCustomerObjectShare; import com.yd.dal.entity.customer.AclCustomerObjectShare;
import org.apache.ibatis.annotations.Param;
public interface AclCustomerObjectShareMapper { public interface AclCustomerObjectShareMapper {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
...@@ -14,4 +15,6 @@ public interface AclCustomerObjectShareMapper { ...@@ -14,4 +15,6 @@ public interface AclCustomerObjectShareMapper {
int updateByPrimaryKeySelective(AclCustomerObjectShare record); int updateByPrimaryKeySelective(AclCustomerObjectShare record);
int updateByPrimaryKey(AclCustomerObjectShare record); int updateByPrimaryKey(AclCustomerObjectShare record);
Long findIdByShareCode(@Param("shareCode") String shareCode);
} }
\ No newline at end of file
...@@ -4,4 +4,6 @@ import com.yd.dal.entity.customer.AclCustomerObjectShare; ...@@ -4,4 +4,6 @@ import com.yd.dal.entity.customer.AclCustomerObjectShare;
public interface AclCustomerObjectShareDALService { public interface AclCustomerObjectShareDALService {
Long save(AclCustomerObjectShare objectShare); Long save(AclCustomerObjectShare objectShare);
Long findIdByShareCode(String shareCode);
} }
...@@ -18,4 +18,9 @@ public class AclCustomerObjectShareDALServiceImpl implements AclCustomerObjectSh ...@@ -18,4 +18,9 @@ public class AclCustomerObjectShareDALServiceImpl implements AclCustomerObjectSh
mapper.insertSelective(objectShare); mapper.insertSelective(objectShare);
return objectShare.getId(); return objectShare.getId();
} }
@Override
public Long findIdByShareCode(String shareCode) {
return mapper.findIdByShareCode(shareCode);
}
} }
...@@ -212,4 +212,10 @@ ...@@ -212,4 +212,10 @@
updated_by = #{updatedBy,jdbcType=BIGINT} updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="findIdByShareCode" resultType="java.lang.Long">
select
id
from ag_acl_customer_object_share
where 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