|
@@ -41,19 +41,20 @@ public class WeComStaffDataJob {
|
|
|
public ReturnT<String> insertStaff(String param) {
|
|
|
try {
|
|
|
List<String> carrierIdList = getCarrierIdList();
|
|
|
- for (String carrierId: carrierIdList){
|
|
|
+ for (String carrierId : carrierIdList) {
|
|
|
StaffExample example = new StaffExample();
|
|
|
example.createCriteria().andCarrierIdEqualTo(carrierId);
|
|
|
List<Staff> staffList = staffMapper.selectByExample(example);
|
|
|
- if(CollectionUtils.isEmpty(staffList)){
|
|
|
+ if (CollectionUtils.isEmpty(staffList)) {
|
|
|
Staff staff = new Staff();
|
|
|
staff.setCarrierId(carrierId);
|
|
|
staff.setRemark("");
|
|
|
+ staffMapper.insert(staff);
|
|
|
}
|
|
|
}
|
|
|
- }catch (Exception e){
|
|
|
+ } catch (Exception e) {
|
|
|
LarkRobotUtil.sendMessage("更新员工失败");
|
|
|
- log.error("insertStaff error",e);
|
|
|
+ log.error("insertStaff error", e);
|
|
|
}
|
|
|
return ReturnT.SUCCESS;
|
|
|
}
|