| | |
| | | import com.zy.crm.manager.controller.CstmrController; |
| | | import com.zy.crm.manager.entity.Cstmr; |
| | | import com.zy.crm.manager.mapper.CstmrMapper; |
| | | import com.zy.crm.manager.service.CompanyMoneyService; |
| | | import com.zy.crm.manager.service.CstmrService; |
| | | import com.zy.crm.manager.task.AbstractHandler; |
| | | import com.zy.crm.manager.task.core.ReturnT; |
| | |
| | | private CstmrController cstmrController; |
| | | @Autowired |
| | | private CstmrMapper cstmrMapper; |
| | | @Autowired |
| | | private CompanyMoneyService companyMoneyService; |
| | | |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start() { |
| | | try { |
| | | Long hostId = 1L; |
| | | if (false){ |
| | | Long hostId = 1L; |
| | | // List<Cstmr> cstmrs = cstmrMapper.selectCopyList(); |
| | | List<Cstmr> cstmrs = new ArrayList<>(); |
| | | for (Cstmr cstmr33 : cstmrs){ |
| | | Cstmr cstmr13 = cstmrService.selectByName(hostId,cstmr33.getName()); |
| | | if (Cools.isEmpty(cstmr13)){ |
| | | Cstmr cstmr23 = cstmrService.selectById(186); |
| | | Cstmr cstmr = new Cstmr(cstmr23); |
| | | cstmr.setName(cstmr33.getName()); |
| | | cstmr.setUuid(cstmrService.getUuid(hostId)); |
| | | cstmrService.insert(cstmr); |
| | | List<Cstmr> cstmrs = new ArrayList<>(); |
| | | for (Cstmr cstmr33 : cstmrs){ |
| | | Cstmr cstmr13 = cstmrService.selectByName(hostId,cstmr33.getName()); |
| | | if (Cools.isEmpty(cstmr13)){ |
| | | Cstmr cstmr23 = cstmrService.selectById(186); |
| | | Cstmr cstmr = new Cstmr(cstmr23); |
| | | cstmr.setName(cstmr33.getName()); |
| | | cstmr.setUuid(cstmrService.getUuid(hostId)); |
| | | cstmrService.insert(cstmr); |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (true){ |
| | | |
| | | } |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |