对于cost_center_code列中的重复数据我该怎么办?
这是我的疑问:
@Controller
public class TrafficController {
....
@Autowired
private ApplicationContext context;
@Autowired
public UserService userService;
public TrafficService trafficService;
....
@RequestMapping(value="/api/traffic/stations")
public List<....> getNearStations(HttpServerletRequest req) {
String userId = SessionAttrs.getUserId(req.getSession());
User user = userSerivce.getUser(userId);
trafficService = (TrafficService) context.getBean(Class.forName("com.myservice.service.impl.TrafficService_"+user.house.apt.address.area_code + "_Impl"));
return trafficService.getStations(user.house.apt.latitude, user.house.apt.longitude, 300, 2);
}
}