Commit 5bc5d914 by 徐高华

转移自动创建活码

parent 1a484ef7
......@@ -17,11 +17,13 @@ import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.manage.api.dto.*;
import com.gic.haoban.manage.api.dto.qdto.ClerkSyncQDTO;
import com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO;
import com.gic.haoban.manage.api.enums.AuditType;
import com.gic.haoban.manage.api.enums.BindTypeEnum;
import com.gic.haoban.manage.api.enums.ChannelCodeEnum;
import com.gic.haoban.manage.api.service.AuditApiService;
import com.gic.haoban.manage.api.service.StaffClerkRelationApiService;
import com.gic.haoban.manage.api.service.hm.HmQrcodeApiService;
import com.gic.haoban.manage.service.config.Config;
import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper;
......@@ -80,6 +82,8 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
private StoreRangeService storeRangeService;
@Autowired
private StaffMapper staffMapper ;
@Autowired
private HmQrcodeApiService hmQrcodeApiService;
@Override
public void bindLogMq(String params) {
......@@ -583,6 +587,18 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
List<StaffClerkRelationDTO> relationList = this.listByStaffId(oldRelationDTO.getWxEnterpriseId(), oldRelationDTO.getStaffId()) ;
List<String> storeIdList = relationList.stream().map(o->o.getStoreId()).collect(Collectors.toList()) ;
this.clerkMainStoreRelatedService.getMainStoreByStaffId(oldRelationDTO.getStaffId(), oldRelationDTO.getWxEnterpriseId(), storeIdList) ;
// 新增活码
HmQrcodeQDTO hmQrcodeQDTO = new HmQrcodeQDTO();
hmQrcodeQDTO.setHmType(1);
hmQrcodeQDTO.setWxEnterpriseId(oldRelationDTO.getWxEnterpriseId());
hmQrcodeQDTO.setEnterpriseId(oldRelationDTO.getEnterpriseId());
TabHaobanStaff staff = this.staffMapper.selectByPrimaryKey(oldRelationDTO.getStaffId()) ;
hmQrcodeQDTO.setName(staff.getStaffName());
hmQrcodeQDTO.setPassFlag(1);
hmQrcodeQDTO.setStoreId(clerkSyncQDTO.getStoreId());
hmQrcodeQDTO.setClerkIdList(Collections.singletonList(clerkSyncQDTO.getClerkId()));
this.hmQrcodeApiService.add(hmQrcodeQDTO);
}
/*} else {
String oldClerkId = oldRelationDTO.getClerkId();
......
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