Commit 576deb4c by qwmqiuwenmin

fix

parent 527e6edc
......@@ -14,6 +14,7 @@ import com.gic.enterprise.api.service.StoreGroupService;
import com.gic.haoban.common.utils.UuidUtil;
import com.gic.haoban.manage.api.dto.EnterpriseDetailDTO;
import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService;
import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseRelatedMapper;
import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated;
......@@ -35,6 +36,8 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
private DepartmentService departmentService;
@Autowired
private StaffService staffService;
@Autowired
private StaffMapper staffMapper;
@Override
public List<EnterpriseDetailDTO> listEnterpriseByWxEnterpriseId(
String wxEnterpriseId) {
......@@ -88,11 +91,14 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
tab.setWxEnterpriseRelatedId(UuidUtil.randomUUID());
wxEnterpriseRelatedMapper.insertSelective(tab);
TabHaobanStaff staff = new TabHaobanStaff();
staff.setStaffName("超级管理员");
staff.setWxEnterpriseId(wxEnterpriseId);
staff.setSuperManagerFlag(1);
staffService.add(staff);
TabHaobanStaff sStaff = staffMapper.selectSuperByWxEnterpriseId(wxEnterpriseId);
if(sStaff == null){
TabHaobanStaff staff = new TabHaobanStaff();
staff.setStaffName("超级管理员");
staff.setWxEnterpriseId(wxEnterpriseId);
staff.setSuperManagerFlag(1);
staffService.add(staff);
}
}
return 0;
}
......
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