|
|
@@ -0,0 +1,37 @@
|
|
|
+package com.fs.his.task;
|
|
|
+
|
|
|
+
|
|
|
+import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
|
|
|
+import com.fs.hisStore.vo.FsStoreOrderScrmPhoneAndOrderNumVO;
|
|
|
+import com.fs.qw.mapper.FsCompanyCustomerMapper;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@Component("StoreTask")
|
|
|
+public class StoreTask {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private FsStoreOrderScrmMapper fsStoreOrderScrmMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private FsCompanyCustomerMapper fsCompanyCustomerMapper;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 同步客户信息表客户的有效下单数
|
|
|
+ * */
|
|
|
+ public void syncStoreCompanyUserOrderNum(){
|
|
|
+ log.info("同步客户信息表客户的有效下单数据");
|
|
|
+ //获取商城处方订单每个手机号的有效下单数列表
|
|
|
+ List<FsStoreOrderScrmPhoneAndOrderNumVO> fsStoreOrderScrmPhoneAndOrderNumVOS = fsStoreOrderScrmMapper.fetchPharmacyPrescribeOrderPhoneCountList();
|
|
|
+ if (CollectionUtils.isEmpty(fsStoreOrderScrmPhoneAndOrderNumVOS)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //根据手机号批量更新客户信息表客户有效下单数
|
|
|
+ int updateResult=fsCompanyCustomerMapper.updateCompanyUserBuyCountByUserPhone(fsStoreOrderScrmPhoneAndOrderNumVOS);
|
|
|
+ }
|
|
|
+}
|